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); |