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

Unified Diff: content/renderer/pepper/pepper_graphics_2d_host.h

Issue 1881603002: Added SetLayerTransform to PPAPI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed indentation 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
Index: content/renderer/pepper/pepper_graphics_2d_host.h
diff --git a/content/renderer/pepper/pepper_graphics_2d_host.h b/content/renderer/pepper/pepper_graphics_2d_host.h
index 03b97e7eb8f4c9676043c57cbc70f32319a3db13..c9b70c14076a26a0b3b68afbacf400a4ea999233 100644
--- a/content/renderer/pepper/pepper_graphics_2d_host.h
+++ b/content/renderer/pepper/pepper_graphics_2d_host.h
@@ -19,6 +19,7 @@
#include "third_party/WebKit/public/platform/WebCanvas.h"
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/geometry/size.h"
+#include "ui/gfx/transform.h"
namespace cc {
class SharedBitmap;
@@ -86,6 +87,9 @@ class CONTENT_EXPORT PepperGraphics2DHost
void SetScale(float scale);
float GetScale() const;
+ void SetLayerTransform(float Scale,
+ const PP_Point& Origin,
+ const PP_Point& Transform);
bool IsAlwaysOpaque() const;
PPB_ImageData_Impl* ImageData();
gfx::Size Size() const;
@@ -116,12 +120,16 @@ class CONTENT_EXPORT PepperGraphics2DHost
int32_t OnHostMsgFlush(ppapi::host::HostMessageContext* context);
int32_t OnHostMsgSetScale(ppapi::host::HostMessageContext* context,
float scale);
+ int32_t OnHostMsgSetLayerTransform(ppapi::host::HostMessageContext* context,
+ float Scale,
bokan 2016/04/14 21:45:00 Line up indent with the first parameter.
alessandroa 2016/04/21 15:39:22 Done.
alessandroa 2016/04/21 15:39:22 Done.
+ const PP_Point& Origin,
+ const PP_Point& Transform);
int32_t OnHostMsgReadImageData(ppapi::host::HostMessageContext* context,
PP_Resource image,
const PP_Point& top_left);
// If |old_image_data| is not NULL, a previous used ImageData object will be
- // reused. This is used by ReplaceContents.
+ // reused. Tis is used by ReplaceContents.
int32_t Flush(PP_Resource* old_image_data);
// Called internally to execute the different queued commands. The
@@ -129,6 +137,7 @@ class CONTENT_EXPORT PepperGraphics2DHost
// rect argument will be filled by each function with the area affected by
// the update that requires invalidation. If there were no pixels changed,
// this rect can be untouched.
+ void ExecuteTransform(gfx::Transform transform);
bokan 2016/04/14 21:45:00 pass by const reference (i.e. const gfx::Transform
alessandroa 2016/04/21 15:39:22 Done.
alessandroa 2016/04/21 15:39:22 Done.
void ExecutePaintImageData(PPB_ImageData_Impl* image,
int x,
int y,
@@ -197,6 +206,8 @@ class CONTENT_EXPORT PepperGraphics2DHost
// DIP
float scale_;
+ // This is the transform that will be applied to the layer.
+ gfx::Transform transform_;
ppapi::host::ReplyMessageContext flush_reply_context_;
bool is_running_in_process_;

Powered by Google App Engine
This is Rietveld 408576698