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

Unified Diff: content/renderer/pepper/pepper_graphics_2d_host.h

Issue 1964423003: Apply viewport to dip scale to Graphics2D, Compositor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments Created 4 years, 7 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: content/renderer/pepper/pepper_graphics_2d_host.h
diff --git a/content/renderer/pepper/pepper_graphics_2d_host.h b/content/renderer/pepper/pepper_graphics_2d_host.h
index 32b59ab10cf50b6b9d0e1c85f1dd413b3144e103..6fb01c29e8f483d7cda51956ad680540b8310191 100644
--- a/content/renderer/pepper/pepper_graphics_2d_host.h
+++ b/content/renderer/pepper/pepper_graphics_2d_host.h
@@ -94,6 +94,11 @@ class CONTENT_EXPORT PepperGraphics2DHost
void ClearCache();
+ void set_viewport_to_dip_scale(float viewport_to_dip_scale) {
+ DCHECK_LT(0, viewport_to_dip_scale_);
+ viewport_to_dip_scale_ = viewport_to_dip_scale;
+ }
+
private:
PepperGraphics2DHost(RendererPpapiHost* host,
PP_Instance instance,
@@ -203,6 +208,9 @@ class CONTENT_EXPORT PepperGraphics2DHost
// DIP
float scale_;
+ // The scale between the viewport and dip.
+ float viewport_to_dip_scale_ = 1.0f;
+
ppapi::host::ReplyMessageContext flush_reply_context_;
bool is_running_in_process_;
« no previous file with comments | « content/renderer/pepper/pepper_compositor_host.cc ('k') | content/renderer/pepper/pepper_graphics_2d_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698