blob: 02dd1dd35bac4d285d0bb962955aabd2934e5265 [file] [log] [blame]
[email protected]256513872012-01-05 15:41:521// Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]ceadc392011-06-15 23:04:242// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
raymes40bb88ad2016-03-22 23:45:325// From ppb_instance.idl modified Wed Jan 27 17:10:16 2016.
6
7#include <stdint.h>
[email protected]f1e929e12012-12-26 18:38:498
9#include "ppapi/c/pp_errors.h"
10#include "ppapi/c/ppb_instance.h"
11#include "ppapi/shared_impl/tracked_callback.h"
[email protected]ceadc392011-06-15 23:04:2412#include "ppapi/thunk/enter.h"
[email protected]b3fcc412014-01-16 04:34:3713#include "ppapi/thunk/ppapi_thunk_export.h"
[email protected]ceadc392011-06-15 23:04:2414
15namespace ppapi {
16namespace thunk {
17
18namespace {
19
[email protected]f1e929e12012-12-26 18:38:4920PP_Bool BindGraphics(PP_Instance instance, PP_Resource device) {
[email protected]03f8b542013-04-02 17:57:5021 VLOG(4) << "PPB_Instance::BindGraphics()";
[email protected]03460232011-10-10 17:23:5722 EnterInstance enter(instance);
[email protected]ceadc392011-06-15 23:04:2423 if (enter.failed())
24 return PP_FALSE;
[email protected]f1e929e12012-12-26 18:38:4925 return enter.functions()->BindGraphics(instance, device);
[email protected]ceadc392011-06-15 23:04:2426}
27
28PP_Bool IsFullFrame(PP_Instance instance) {
[email protected]03f8b542013-04-02 17:57:5029 VLOG(4) << "PPB_Instance::IsFullFrame()";
[email protected]03460232011-10-10 17:23:5730 EnterInstance enter(instance);
[email protected]ceadc392011-06-15 23:04:2431 if (enter.failed())
32 return PP_FALSE;
33 return enter.functions()->IsFullFrame(instance);
34}
35
Dave Michaelffb1cc02014-11-07 22:17:3136const PPB_Instance_1_0 g_ppb_instance_thunk_1_0 = {&BindGraphics, &IsFullFrame};
[email protected]ceadc392011-06-15 23:04:2437
38} // namespace
39
[email protected]b3fcc412014-01-16 04:34:3740PPAPI_THUNK_EXPORT const PPB_Instance_1_0* GetPPB_Instance_1_0_Thunk() {
[email protected]f1e929e12012-12-26 18:38:4941 return &g_ppb_instance_thunk_1_0;
[email protected]ceadc392011-06-15 23:04:2442}
43
44} // namespace thunk
45} // namespace ppapi