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

Unified Diff: content/renderer/pepper/pepper_compositor_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
« no previous file with comments | « no previous file | content/renderer/pepper/pepper_compositor_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/pepper_compositor_host.h
diff --git a/content/renderer/pepper/pepper_compositor_host.h b/content/renderer/pepper/pepper_compositor_host.h
index 9168e7d11138d4ee96c73d36177c3acf2ca8be32..0163a74f80ea089aa365bd8357842154487d6ad2 100644
--- a/content/renderer/pepper/pepper_compositor_host.h
+++ b/content/renderer/pepper/pepper_compositor_host.h
@@ -51,6 +51,11 @@ class PepperCompositorHost : public ppapi::host::ResourceHost {
void ViewInitiatedPaint();
+ 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:
void ImageReleased(int32_t id,
std::unique_ptr<base::SharedMemory> shared_memory,
@@ -102,6 +107,10 @@ class PepperCompositorHost : public ppapi::host::ResourceHost {
ppapi::host::ReplyMessageContext commit_layers_reply_context_;
+ // The scale between the viewport and dip. This differs in
+ // use-zoom-for-dsf mode where the content is scaled by zooming.
+ float viewport_to_dip_scale_ = 1.0f;
+
base::WeakPtrFactory<PepperCompositorHost> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(PepperCompositorHost);
« no previous file with comments | « no previous file | content/renderer/pepper/pepper_compositor_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698