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

Unified Diff: cc/trees/layer_tree_host_common.cc

Issue 338453003: cc: Avoid needless Rect->RectF->Rect conversion in CalcDrawProps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_common.cc
diff --git a/cc/trees/layer_tree_host_common.cc b/cc/trees/layer_tree_host_common.cc
index 2335f4e0315b29726af6279526ed3c26955ca29f..439391964d1faaab02a341f6798246ad156742ac 100644
--- a/cc/trees/layer_tree_host_common.cc
+++ b/cc/trees/layer_tree_host_common.cc
@@ -1770,7 +1770,7 @@ static void CalculateDrawPropertiesInternal(
layer_draw_properties.target_space_transform.
IsIdentityOrIntegerTranslation();
- gfx::RectF content_rect(layer->content_bounds());
+ gfx::Rect content_rect(layer->content_bounds());
// full_hierarchy_matrix is the matrix that transforms objects between screen
// space (except projection matrix) and the most recent RenderSurfaceImpl's
@@ -2003,8 +2003,8 @@ static void CalculateDrawPropertiesInternal(
if (adjust_text_aa)
layer_draw_properties.can_use_lcd_text = layer_can_use_lcd_text;
- gfx::Rect rect_in_target_space = ToEnclosingRect(
- MathUtil::MapClippedRect(layer->draw_transform(), content_rect));
+ gfx::Rect rect_in_target_space =
+ MathUtil::MapEnclosingClippedRect(layer->draw_transform(), content_rect);
if (LayerClipsSubtree(layer)) {
layer_or_ancestor_clips_descendants = true;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698