Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1828)

Unified Diff: ppapi/thunk/ppb_compositor_layer_thunk.cc

Issue 475123003: [PPAPI] Add target param for CompositorLayer::SetTexture(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review issues Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/thunk/ppb_compositor_layer_api.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/thunk/ppb_compositor_layer_thunk.cc
diff --git a/ppapi/thunk/ppb_compositor_layer_thunk.cc b/ppapi/thunk/ppb_compositor_layer_thunk.cc
index 4923feab600af7d83e6eeb084937eccef200fbe1..f0a98df596895be699dbb7d1534e23777e12522b 100644
--- a/ppapi/thunk/ppb_compositor_layer_thunk.cc
+++ b/ppapi/thunk/ppb_compositor_layer_thunk.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// From ppb_compositor_layer.idl modified Wed Jun 4 11:17:54 2014.
+// From ppb_compositor_layer.idl modified Thu Aug 14 18:06:33 2014.
#include "ppapi/c/pp_completion_callback.h"
#include "ppapi/c/pp_errors.h"
@@ -36,8 +36,24 @@ int32_t SetColor(PP_Resource layer,
return enter.object()->SetColor(red, green, blue, alpha, size);
}
+int32_t SetTexture_0_1(PP_Resource layer,
+ PP_Resource context,
+ uint32_t texture,
+ const struct PP_Size* size,
+ struct PP_CompletionCallback cc) {
+ VLOG(4) << "PPB_CompositorLayer::SetTexture()";
+ EnterResource<PPB_CompositorLayer_API> enter(layer, cc, true);
+ if (enter.failed())
+ return enter.retval();
+ return enter.SetResult(enter.object()->SetTexture0_1(context,
+ texture,
+ size,
+ enter.callback()));
+}
+
int32_t SetTexture(PP_Resource layer,
PP_Resource context,
+ uint32_t target,
uint32_t texture,
const struct PP_Size* size,
struct PP_CompletionCallback cc) {
@@ -46,6 +62,7 @@ int32_t SetTexture(PP_Resource layer,
if (enter.failed())
return enter.retval();
return enter.SetResult(enter.object()->SetTexture(context,
+ target,
texture,
size,
enter.callback()));
@@ -115,6 +132,19 @@ int32_t SetPremultipliedAlpha(PP_Resource layer, PP_Bool premult) {
const PPB_CompositorLayer_0_1 g_ppb_compositorlayer_thunk_0_1 = {
&IsCompositorLayer,
&SetColor,
+ &SetTexture_0_1,
+ &SetImage,
+ &SetClipRect,
+ &SetTransform,
+ &SetOpacity,
+ &SetBlendMode,
+ &SetSourceRect,
+ &SetPremultipliedAlpha
+};
+
+const PPB_CompositorLayer_0_2 g_ppb_compositorlayer_thunk_0_2 = {
+ &IsCompositorLayer,
+ &SetColor,
&SetTexture,
&SetImage,
&SetClipRect,
@@ -132,5 +162,10 @@ PPAPI_THUNK_EXPORT const PPB_CompositorLayer_0_1*
return &g_ppb_compositorlayer_thunk_0_1;
}
+PPAPI_THUNK_EXPORT const PPB_CompositorLayer_0_2*
+ GetPPB_CompositorLayer_0_2_Thunk() {
+ return &g_ppb_compositorlayer_thunk_0_2;
+}
+
} // namespace thunk
} // namespace ppapi
« no previous file with comments | « ppapi/thunk/ppb_compositor_layer_api.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698