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

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

Issue 10544168: Implement HiDPI support in Pepper dev interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add comments to Graphics2DDev C++ header Created 8 years, 6 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 3b8ce9a87162113dfe7a1ff48072889c53b9a3a2..42b99c6e4df283507df6ab9dd3cc913938bd679a 100644
--- a/webkit/plugins/ppapi/ppb_graphics_2d_impl.h
+++ b/webkit/plugins/ppapi/ppb_graphics_2d_impl.h
@@ -50,6 +50,8 @@ class PPB_Graphics2D_Impl : public ::ppapi::Resource,
const PP_Point* amount) OVERRIDE;
virtual void ReplaceContents(PP_Resource image_data) OVERRIDE;
virtual int32_t Flush(PP_CompletionCallback callback) OVERRIDE;
+ virtual bool SetScale(float scale) OVERRIDE;
+ virtual float GetScale() OVERRIDE { return scale_; }
brettw 2012/06/19 20:21:27 No inline virtual functions. This should throw an
Josh Horwich 2012/06/19 23:56:15 Done. (Clang didn't complain, FWIW, but I moved i
bool ReadImageData(PP_Resource image, const PP_Point* top_left);
@@ -184,6 +186,10 @@ class PPB_Graphics2D_Impl : public ::ppapi::Resource,
// This allows us to do more optimized painting in some cases.
bool is_always_opaque_;
+ // Set to the scale between what the plugin considers to be one pixel and one
+ // DIP
+ float scale_;
+
base::WeakPtrFactory<PPB_Graphics2D_Impl> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(PPB_Graphics2D_Impl);

Powered by Google App Engine
This is Rietveld 408576698