| Index: ppapi/thunk/ppb_graphics_2d_thunk.cc
|
| diff --git a/ppapi/thunk/ppb_graphics_2d_thunk.cc b/ppapi/thunk/ppb_graphics_2d_thunk.cc
|
| index 1d76bba317bf140e4371b1370a30dbc327c2fa67..4deabc1a45246ccfc3cde1520b108c262307a503 100644
|
| --- a/ppapi/thunk/ppb_graphics_2d_thunk.cc
|
| +++ b/ppapi/thunk/ppb_graphics_2d_thunk.cc
|
| @@ -2,6 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| +#include "ppapi/c/dev/ppb_graphics_2d_dev.h"
|
| #include "ppapi/c/pp_completion_callback.h"
|
| #include "ppapi/c/pp_errors.h"
|
| #include "ppapi/c/ppb_graphics_2d.h"
|
| @@ -78,6 +79,20 @@ int32_t Flush(PP_Resource graphics_2d, PP_CompletionCallback callback) {
|
| return enter.SetResult(enter.object()->Flush(enter.callback()));
|
| }
|
|
|
| +PP_Bool SetScale(PP_Resource graphics_2d, float scale) {
|
| + EnterGraphics2D enter(graphics_2d, true);
|
| + if (enter.failed())
|
| + return PP_FALSE;
|
| + return PP_FromBool(enter.object()->SetScale(scale));
|
| +}
|
| +
|
| +float GetScale(PP_Resource graphics_2d) {
|
| + EnterGraphics2D enter(graphics_2d, true);
|
| + if (enter.failed())
|
| + return 0.0f;
|
| + return enter.object()->GetScale();
|
| +}
|
| +
|
| const PPB_Graphics2D g_ppb_graphics_2d_thunk = {
|
| &Create,
|
| &IsGraphics2D,
|
| @@ -88,11 +103,20 @@ const PPB_Graphics2D g_ppb_graphics_2d_thunk = {
|
| &Flush
|
| };
|
|
|
| +const PPB_Graphics2D_Dev g_ppb_graphics_2d_dev_thunk = {
|
| + &SetScale,
|
| + &GetScale
|
| +};
|
| +
|
| } // namespace
|
|
|
| const PPB_Graphics2D_1_0* GetPPB_Graphics2D_1_0_Thunk() {
|
| return &g_ppb_graphics_2d_thunk;
|
| }
|
|
|
| +const PPB_Graphics2D_Dev_0_1* GetPPB_Graphics2D_Dev_0_1_Thunk() {
|
| + return &g_ppb_graphics_2d_dev_thunk;
|
| +}
|
| +
|
| } // namespace thunk
|
| } // namespace ppapi
|
|
|