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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2010, 2012 Google Inc. All rights reserved. 7 * Copyright (C) 2010, 2012 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 194
195 void RenderLayerModelObject::setBackingNeedsPaintInvalidationInRect(const Layout Rect& r, PaintInvalidationReason invalidationReason) const 195 void RenderLayerModelObject::setBackingNeedsPaintInvalidationInRect(const Layout Rect& r, PaintInvalidationReason invalidationReason) const
196 { 196 {
197 // https://bugs.webkit.org/show_bug.cgi?id=61159 describes an unreproducible crash here, 197 // https://bugs.webkit.org/show_bug.cgi?id=61159 describes an unreproducible crash here,
198 // so assert but check that the layer is composited. 198 // so assert but check that the layer is composited.
199 ASSERT(compositingState() != NotComposited); 199 ASSERT(compositingState() != NotComposited);
200 200
201 // FIXME: generalize accessors to backing GraphicsLayers so that this code i s squashing-agnostic. 201 // FIXME: generalize accessors to backing GraphicsLayers so that this code i s squashing-agnostic.
202 if (layer()->groupedMapping()) { 202 if (layer()->groupedMapping()) {
203 LayoutRect paintInvalidationRect = r; 203 LayoutRect paintInvalidationRect = r;
204 paintInvalidationRect.move(layer()->subpixelAccumulation()); 204 if (GraphicsLayer* squashingLayer = layer()->groupedMapping()->squashing Layer()) {
205 if (GraphicsLayer* squashingLayer = layer()->groupedMapping()->squashing Layer()) 205 // Note: the subpixel accumulation of layer() does not need to be ad ded here. It is already taken into account.
206 squashingLayer->setNeedsDisplayInRect(pixelSnappedIntRect(paintInval idationRect), invalidationReason); 206 squashingLayer->setNeedsDisplayInRect(pixelSnappedIntRect(paintInval idationRect), invalidationReason);
207 }
207 } else { 208 } else {
208 layer()->compositedLayerMapping()->setContentsNeedDisplayInRect(r, inval idationReason); 209 layer()->compositedLayerMapping()->setContentsNeedDisplayInRect(r, inval idationReason);
209 } 210 }
210 } 211 }
211 212
212 } // namespace blink 213 } // namespace blink
213 214
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698