| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ppapi/c/pp_errors.h" | 5 #include "ppapi/c/pp_errors.h" |
| 6 #include "ppapi/c/dev/ppb_layer_compositor_dev.h" | 6 #include "ppapi/c/dev/ppb_layer_compositor_dev.h" |
| 7 #include "ppapi/thunk/common.h" |
| 8 #include "ppapi/thunk/enter.h" |
| 7 #include "ppapi/thunk/thunk.h" | 9 #include "ppapi/thunk/thunk.h" |
| 8 #include "ppapi/thunk/enter.h" | |
| 9 #include "ppapi/thunk/ppb_layer_compositor_api.h" | 10 #include "ppapi/thunk/ppb_layer_compositor_api.h" |
| 10 #include "ppapi/thunk/resource_creation_api.h" | 11 #include "ppapi/thunk/resource_creation_api.h" |
| 11 | 12 |
| 12 namespace ppapi { | 13 namespace ppapi { |
| 13 namespace thunk { | 14 namespace thunk { |
| 14 | 15 |
| 15 namespace { | 16 namespace { |
| 16 | 17 |
| 17 PP_Resource Create(PP_Instance instance) { | 18 PP_Resource Create(PP_Instance instance) { |
| 18 return 0; | 19 return 0; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 38 | 39 |
| 39 void SetDisplay(PP_Resource compositor, PP_Resource layer, | 40 void SetDisplay(PP_Resource compositor, PP_Resource layer, |
| 40 PP_Bool is_displayed) { | 41 PP_Bool is_displayed) { |
| 41 } | 42 } |
| 42 | 43 |
| 43 void MarkAsDirty(PP_Resource compositor, PP_Resource layer) { | 44 void MarkAsDirty(PP_Resource compositor, PP_Resource layer) { |
| 44 } | 45 } |
| 45 | 46 |
| 46 int32_t SwapBuffers(PP_Resource compositor, | 47 int32_t SwapBuffers(PP_Resource compositor, |
| 47 struct PP_CompletionCallback callback) { | 48 struct PP_CompletionCallback callback) { |
| 48 return PP_ERROR_FAILED; | 49 return MayForceCallback(callback, PP_ERROR_FAILED); |
| 49 } | 50 } |
| 50 | 51 |
| 51 const PPB_LayerCompositor_Dev g_ppb_layer_compositor_thunk = { | 52 const PPB_LayerCompositor_Dev g_ppb_layer_compositor_thunk = { |
| 52 &Create, | 53 &Create, |
| 53 &IsLayerCompositor, | 54 &IsLayerCompositor, |
| 54 &AddLayer, | 55 &AddLayer, |
| 55 &RemoveLayer, | 56 &RemoveLayer, |
| 56 &SetZIndex, | 57 &SetZIndex, |
| 57 &SetRect, | 58 &SetRect, |
| 58 &SetDisplay, | 59 &SetDisplay, |
| 59 &MarkAsDirty, | 60 &MarkAsDirty, |
| 60 &SwapBuffers, | 61 &SwapBuffers, |
| 61 }; | 62 }; |
| 62 | 63 |
| 63 } // namespace | 64 } // namespace |
| 64 | 65 |
| 65 const PPB_LayerCompositor_Dev* GetPPB_LayerCompositor_Thunk() { | 66 const PPB_LayerCompositor_Dev* GetPPB_LayerCompositor_Thunk() { |
| 66 return &g_ppb_layer_compositor_thunk; | 67 return &g_ppb_layer_compositor_thunk; |
| 67 } | 68 } |
| 68 | 69 |
| 69 } // namespace thunk | 70 } // namespace thunk |
| 70 } // namespace ppapi | 71 } // namespace ppapi |
| OLD | NEW |