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

Unified Diff: webkit/plugins/ppapi/ppb_graphics_2d_impl.h

Issue 10704198: Scale to DIPs in ppb_graphics2d_impl for proper invalidation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix shared_lib build, simplify based on feedback and fix nits Created 8 years, 5 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: webkit/plugins/ppapi/ppb_graphics_2d_impl.h
diff --git a/webkit/plugins/ppapi/ppb_graphics_2d_impl.h b/webkit/plugins/ppapi/ppb_graphics_2d_impl.h
index cec39c61e5e24785525c456a9a8fe03adfd980d7..12a4c44d5bcecd571cd94b5e990524f1d6a9c43b 100644
--- a/webkit/plugins/ppapi/ppb_graphics_2d_impl.h
+++ b/webkit/plugins/ppapi/ppb_graphics_2d_impl.h
@@ -15,6 +15,7 @@
#include "ppapi/shared_impl/tracked_callback.h"
#include "ppapi/thunk/ppb_graphics_2d_api.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCanvas.h"
+#include "webkit/plugins/webkit_plugins_export.h"
namespace gfx {
class Rect;
@@ -75,6 +76,12 @@ class PPB_Graphics2D_Impl : public ::ppapi::Resource,
PPB_ImageData_Impl* image_data() { return image_data_.get(); }
+ // Scale the rectangle, taking care to round coordinates outward so a
+ // rectangle scaled down then scaled back up by the inverse scale would
+ // fully contain the entire area affected by the original rectangle.
+ WEBKIT_PLUGINS_EXPORT static gfx::Rect ScaleRectBounds(const gfx::Rect& rect,
+ float scale);
+
private:
explicit PPB_Graphics2D_Impl(PP_Instance instance);
« no previous file with comments | « no previous file | webkit/plugins/ppapi/ppb_graphics_2d_impl.cc » ('j') | webkit/plugins/ppapi/ppb_graphics_2d_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698