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

Unified Diff: cc/damage_tracker.cc

Issue 11276060: Pass accurate contentsScale to LayerImpl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 years, 2 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 | « 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/damage_tracker.cc
diff --git a/cc/damage_tracker.cc b/cc/damage_tracker.cc
index 4c27d4d559e30607e45741e232aabd8879e75ee1..400fe5fefbdef7292550e1d2613406fbd0953f0f 100644
--- a/cc/damage_tracker.cc
+++ b/cc/damage_tracker.cc
@@ -265,13 +265,9 @@ void DamageTracker::extendDamageForLayer(LayerImpl* layer, FloatRect& targetDama
// Note oldRectInTargetSpace is already in target space.
targetDamageRect.uniteIfNonZero(oldRectInTargetSpace);
} else if (!layer->updateRect().isEmpty()) {
- // If the layer properties havent changed, then the the target surface is only
+ // If the layer properties haven't changed, then the the target surface is only
// affected by the layer's update area, which could be empty.
- FloatRect updateContentRect = layer->updateRect();
- float widthScale = layer->contentBounds().width() / static_cast<float>(layer->bounds().width());
- float heightScale = layer->contentBounds().height() / static_cast<float>(layer->bounds().height());
- updateContentRect.scale(widthScale, heightScale);
-
+ FloatRect updateContentRect = layer->layerRectToContentRect(layer->updateRect());
FloatRect updateRectInTargetSpace = MathUtil::mapClippedRect(layer->drawTransform(), updateContentRect);
targetDamageRect.uniteIfNonZero(updateRectInTargetSpace);
}
« 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