Index: cc/picture_layer.cc |
diff --git a/cc/picture_layer.cc b/cc/picture_layer.cc |
index 4f192da7e180fdb51eaa7071aaad1d5107143fce..15a61705f177e2ed1f7bfadb6930c7dc922736f3 100644 |
--- a/cc/picture_layer.cc |
+++ b/cc/picture_layer.cc |
@@ -51,7 +51,11 @@ void PictureLayer::setLayerTreeHost(LayerTreeHost* host) { |
void PictureLayer::setNeedsDisplayRect(const gfx::RectF& layer_rect) { |
gfx::Rect rect = gfx::ToEnclosedRect(layer_rect); |
- pending_invalidation_.Union(rect); |
+ if (!rect.IsEmpty()) { |
danakj
2013/01/09 01:00:05
i think this if() is kinda surplus too, everything
vangelis
2013/01/09 01:50:36
it is indeed a no-op but still goes though a surpr
danakj
2013/01/09 01:51:48
If it's an issue, maybe we should add it to cc::Re
|
+ // Clamp invalidation to the layer bounds. |
+ rect.Intersect(gfx::Rect(contentBounds())); |
danakj
2013/01/09 01:00:05
Sorry to miss this last round: You want bounds() h
vangelis
2013/01/09 01:50:36
Done.
|
+ pending_invalidation_.Union(rect); |
+ } |
Layer::setNeedsDisplayRect(layer_rect); |
} |