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

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: 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..a4fda98d49696ce9ae2e0685216588b1e503ef8d 100644
--- a/webkit/plugins/ppapi/ppb_graphics_2d_impl.h
+++ b/webkit/plugins/ppapi/ppb_graphics_2d_impl.h
@@ -33,7 +33,8 @@ class PPB_Graphics2D_Impl : public ::ppapi::Resource,
static PP_Resource Create(PP_Instance instance,
const PP_Size& size,
- PP_Bool is_always_opaque);
+ PP_Bool is_always_opaque,
+ float scale);
bool is_always_opaque() const { return is_always_opaque_; }
@@ -75,7 +76,7 @@ class PPB_Graphics2D_Impl : public ::ppapi::Resource,
private:
explicit PPB_Graphics2D_Impl(PP_Instance instance);
- bool Init(int width, int height, bool is_always_opaque);
+ bool Init(int width, int height, bool is_always_opaque, float scale);
// Tracks a call to flush that requires a callback.
class FlushCallbackData {
@@ -184,6 +185,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