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

Unified Diff: ppapi/cpp/graphics_2d.cc

Issue 1881603002: Added SetLayerTransform to PPAPI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added Graphics2D 1.2 to histograms Created 4 years, 8 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/cpp/graphics_2d.h ('k') | ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/graphics_2d.cc
diff --git a/ppapi/cpp/graphics_2d.cc b/ppapi/cpp/graphics_2d.cc
index 3a766c83546ef224f9a437bcf156f497d3aba534..d196cabd583cec251dfed8c43d372ece574b6cb8 100644
--- a/ppapi/cpp/graphics_2d.cc
+++ b/ppapi/cpp/graphics_2d.cc
@@ -26,6 +26,11 @@ template <> const char* interface_name<PPB_Graphics2D_1_1>() {
return PPB_GRAPHICS_2D_INTERFACE_1_1;
}
+template <> const char* interface_name<PPB_Graphics2D_1_2>() {
+ return PPB_GRAPHICS_2D_INTERFACE_1_2;
+}
+
+
} // namespace
Graphics2D::Graphics2D() : Resource() {
@@ -152,4 +157,14 @@ float Graphics2D::GetScale() {
return get_interface<PPB_Graphics2D_1_1>()->GetScale(pp_resource());
}
+bool Graphics2D::SetLayerTransform(float scale,
+ const Point& origin,
+ const Point& translate) {
+ if (!has_interface<PPB_Graphics2D_1_2>())
+ return false;
+ return PP_ToBool(get_interface<PPB_Graphics2D_1_2>()->SetLayerTransform(
+ pp_resource(), scale, &origin.pp_point(), &translate.pp_point()));
+}
+
+
} // namespace pp
« no previous file with comments | « ppapi/cpp/graphics_2d.h ('k') | ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698