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

Unified Diff: cc/draw_properties.h

Issue 11503005: cc: Refactor content scale/bounds into draw properties (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years 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 | « cc/contents_scaling_layer_unittest.cc ('k') | cc/image_layer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/draw_properties.h
diff --git a/cc/draw_properties.h b/cc/draw_properties.h
index 3895ef0720ab675044c7f7f9d63142261ac8e3ed..e5bf8136ed2f498c0acb31725bac4d1b8c452782 100644
--- a/cc/draw_properties.h
+++ b/cc/draw_properties.h
@@ -24,6 +24,8 @@ struct CC_EXPORT DrawProperties {
, can_use_lcd_text(false)
, is_clipped(false)
, render_target(0)
+ , contents_scale_x(1)
+ , contents_scale_y(1)
, num_descendants_that_draw_content(0)
{
}
@@ -75,6 +77,14 @@ struct CC_EXPORT DrawProperties {
// state.
gfx::Rect clip_rect;
+ // The scale used to move between layer space and content space, and bounds
+ // of the space. One is always a function of the other, but which one
+ // depends on the layer type. For picture layers, this is an ideal scale,
+ // and not always the one used.
+ float contents_scale_x;
+ float contents_scale_y;
+ gfx::Size content_bounds;
+
// Does not include this layer itself, only its children and descendants.
int num_descendants_that_draw_content;
};
« no previous file with comments | « cc/contents_scaling_layer_unittest.cc ('k') | cc/image_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698