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

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: Rebase 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
« no previous file with comments | « webkit/plugins/ppapi/ppapi_plugin_instance.cc ('k') | webkit/plugins/ppapi/ppb_graphics_2d_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 69e0f96fa9b9dfb99ae235e9a9816acc01889744..cec39c61e5e24785525c456a9a8fe03adfd980d7 100644
--- a/webkit/plugins/ppapi/ppb_graphics_2d_impl.h
+++ b/webkit/plugins/ppapi/ppb_graphics_2d_impl.h
@@ -51,6 +51,8 @@ class PPB_Graphics2D_Impl : public ::ppapi::Resource,
virtual void ReplaceContents(PP_Resource image_data) OVERRIDE;
virtual int32_t Flush(
scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE;
+ virtual bool SetScale(float scale) OVERRIDE;
+ virtual float GetScale() OVERRIDE;
bool ReadImageData(PP_Resource image, const PP_Point* top_left);
@@ -185,6 +187,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);
« no previous file with comments | « webkit/plugins/ppapi/ppapi_plugin_instance.cc ('k') | webkit/plugins/ppapi/ppb_graphics_2d_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698