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

Unified Diff: ui/compositor/layer.h

Issue 10411086: Makes the browser send pixels to the GPU process where it should (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | « content/public/browser/render_widget_host_view.h ('k') | ui/compositor/layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer.h
diff --git a/ui/compositor/layer.h b/ui/compositor/layer.h
index a0a6cc1a5535c57f851db8fb4eeacca7583ec26a..d19fe073e9d86c3690b17db99d151d4f7a849532 100644
--- a/ui/compositor/layer.h
+++ b/ui/compositor/layer.h
@@ -198,10 +198,12 @@ class COMPOSITOR_EXPORT Layer :
// Notifies the layer that the device scale factor has changed.
void OnDeviceScaleFactorChanged(float device_scale_factor);
- // Sets if the layer should scale the canvas before passing to
- // |LayerDelegate::OnLayerPaint|. Set to false if the delegate
- // handles scaling.
- void set_scale_canvas(bool scale_canvas) { scale_canvas_ = scale_canvas; }
+ // Sets whether the layer should scale its content. If true, the canvas will
+ // be scaled in software rendering mode before it is passed to
+ // |LayerDelegate::OnPaint| and the texture will be scaled in accelerated
+ // mode. Set to false if the delegate handles scaling and the texture is
+ // the correct pixel size.
+ void set_scale_content(bool scale_content) { scale_content_ = scale_content; }
// Sometimes the Layer is being updated by something other than SetCanvas
// (e.g. the GPU process on UI_COMPOSITOR_IMAGE_TRANSPORT).
@@ -299,9 +301,9 @@ class COMPOSITOR_EXPORT Layer :
bool web_layer_is_accelerated_;
bool show_debug_borders_;
- // If true, the layer scales the canvas using device scale factor
- // before passing to LayerDelegate::OnLayerPaint.
- bool scale_canvas_;
+ // If true, the layer scales the canvas and the texture with the device scale
+ // factor as appropriate. When true, the texture size is in DIP.
+ bool scale_content_;
// A cached copy of |Compositor::device_scale_factor()|.
float device_scale_factor_;
« no previous file with comments | « content/public/browser/render_widget_host_view.h ('k') | ui/compositor/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698