[email protected] | 25651387 | 2012-01-05 15:41:52 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
[email protected] | ceadc39 | 2011-06-15 23:04:24 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
3 | // found in the LICENSE file. | ||||
4 | |||||
raymes | 40bb88ad | 2016-03-22 23:45:32 | [diff] [blame] | 5 | // From ppb_instance.idl modified Wed Jan 27 17:10:16 2016. |
6 | |||||
7 | #include <stdint.h> | ||||
[email protected] | f1e929e1 | 2012-12-26 18:38:49 | [diff] [blame] | 8 | |
9 | #include "ppapi/c/pp_errors.h" | ||||
10 | #include "ppapi/c/ppb_instance.h" | ||||
11 | #include "ppapi/shared_impl/tracked_callback.h" | ||||
[email protected] | ceadc39 | 2011-06-15 23:04:24 | [diff] [blame] | 12 | #include "ppapi/thunk/enter.h" |
[email protected] | b3fcc41 | 2014-01-16 04:34:37 | [diff] [blame] | 13 | #include "ppapi/thunk/ppapi_thunk_export.h" |
[email protected] | ceadc39 | 2011-06-15 23:04:24 | [diff] [blame] | 14 | |
15 | namespace ppapi { | ||||
16 | namespace thunk { | ||||
17 | |||||
18 | namespace { | ||||
19 | |||||
[email protected] | f1e929e1 | 2012-12-26 18:38:49 | [diff] [blame] | 20 | PP_Bool BindGraphics(PP_Instance instance, PP_Resource device) { |
[email protected] | 03f8b54 | 2013-04-02 17:57:50 | [diff] [blame] | 21 | VLOG(4) << "PPB_Instance::BindGraphics()"; |
[email protected] | 0346023 | 2011-10-10 17:23:57 | [diff] [blame] | 22 | EnterInstance enter(instance); |
[email protected] | ceadc39 | 2011-06-15 23:04:24 | [diff] [blame] | 23 | if (enter.failed()) |
24 | return PP_FALSE; | ||||
[email protected] | f1e929e1 | 2012-12-26 18:38:49 | [diff] [blame] | 25 | return enter.functions()->BindGraphics(instance, device); |
[email protected] | ceadc39 | 2011-06-15 23:04:24 | [diff] [blame] | 26 | } |
27 | |||||
28 | PP_Bool IsFullFrame(PP_Instance instance) { | ||||
[email protected] | 03f8b54 | 2013-04-02 17:57:50 | [diff] [blame] | 29 | VLOG(4) << "PPB_Instance::IsFullFrame()"; |
[email protected] | 0346023 | 2011-10-10 17:23:57 | [diff] [blame] | 30 | EnterInstance enter(instance); |
[email protected] | ceadc39 | 2011-06-15 23:04:24 | [diff] [blame] | 31 | if (enter.failed()) |
32 | return PP_FALSE; | ||||
33 | return enter.functions()->IsFullFrame(instance); | ||||
34 | } | ||||
35 | |||||
Dave Michael | ffb1cc0 | 2014-11-07 22:17:31 | [diff] [blame] | 36 | const PPB_Instance_1_0 g_ppb_instance_thunk_1_0 = {&BindGraphics, &IsFullFrame}; |
[email protected] | ceadc39 | 2011-06-15 23:04:24 | [diff] [blame] | 37 | |
38 | } // namespace | ||||
39 | |||||
[email protected] | b3fcc41 | 2014-01-16 04:34:37 | [diff] [blame] | 40 | PPAPI_THUNK_EXPORT const PPB_Instance_1_0* GetPPB_Instance_1_0_Thunk() { |
[email protected] | f1e929e1 | 2012-12-26 18:38:49 | [diff] [blame] | 41 | return &g_ppb_instance_thunk_1_0; |
[email protected] | ceadc39 | 2011-06-15 23:04:24 | [diff] [blame] | 42 | } |
43 | |||||
44 | } // namespace thunk | ||||
45 | } // namespace ppapi |