Chromium Code Reviews| Index: cc/damage_tracker.cc |
| diff --git a/cc/damage_tracker.cc b/cc/damage_tracker.cc |
| index 4c27d4d559e30607e45741e232aabd8879e75ee1..d36cbc00b02553cceb667c56e9a3a3ae29c812d4 100644 |
| --- a/cc/damage_tracker.cc |
| +++ b/cc/damage_tracker.cc |
| @@ -268,9 +268,7 @@ void DamageTracker::extendDamageForLayer(LayerImpl* layer, FloatRect& targetDama |
| // If the layer properties havent 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); |
| + updateContentRect.scale(layer->contentsScaleX(), layer->contentsScaleY()); |
|
danakj
2012/10/29 20:06:51
Can we use Layer::layerRectToContentRect() here? T
wangxianzhu
2012/10/30 02:14:21
Done. However, I'm wondering if enclosingIntRect()
danakj
2012/10/30 15:56:19
Right, but part of a pixel can't be invalid, so I
|
| FloatRect updateRectInTargetSpace = MathUtil::mapClippedRect(layer->drawTransform(), updateContentRect); |
| targetDamageRect.uniteIfNonZero(updateRectInTargetSpace); |