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

Unified Diff: Source/core/rendering/RenderLayerModelObject.cpp

Issue 659493005: Don't add subpixel accumulations for squashed layers when invalidating them. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed. Created 6 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
Index: Source/core/rendering/RenderLayerModelObject.cpp
diff --git a/Source/core/rendering/RenderLayerModelObject.cpp b/Source/core/rendering/RenderLayerModelObject.cpp
index 8beeaee4297dfce2b3081332979a6358d719322c..5bca94802ee9ff358cfe0a60643b2af6f77808aa 100644
--- a/Source/core/rendering/RenderLayerModelObject.cpp
+++ b/Source/core/rendering/RenderLayerModelObject.cpp
@@ -201,9 +201,11 @@ void RenderLayerModelObject::setBackingNeedsPaintInvalidationInRect(const Layout
// FIXME: generalize accessors to backing GraphicsLayers so that this code is squashing-agnostic.
if (layer()->groupedMapping()) {
LayoutRect paintInvalidationRect = r;
- paintInvalidationRect.move(layer()->subpixelAccumulation());
- if (GraphicsLayer* squashingLayer = layer()->groupedMapping()->squashingLayer())
- squashingLayer->setNeedsDisplayInRect(pixelSnappedIntRect(paintInvalidationRect), invalidationReason);
+ if (GraphicsLayer* squashingLayer = layer()->groupedMapping()->squashingLayer()) {
+ // Note: the subpixel accumulation of layer() does not need
leviw_travelin_and_unemployed 2014/10/14 21:49:09 Nit: Did you not finish writing this comment?
chrishtr 2014/10/14 21:54:32 Done
+ IntRect snappedRect = pixelSnappedIntRect(paintInvalidationRect);
leviw_travelin_and_unemployed 2014/10/14 21:49:09 Why bother with adding the local variable?
chrishtr 2014/10/14 21:54:32 Done.
+ squashingLayer->setNeedsDisplayInRect(snappedRect, invalidationReason);
+ }
} else {
layer()->compositedLayerMapping()->setContentsNeedDisplayInRect(r, invalidationReason);
}

Powered by Google App Engine
This is Rietveld 408576698