OLD | NEW |
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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 | 185 |
186 PaintInvalidationReason reason = invalidatePaintIfNeeded(paintInvalidationSt
ate, newPaintInvalidationContainer); | 186 PaintInvalidationReason reason = invalidatePaintIfNeeded(paintInvalidationSt
ate, newPaintInvalidationContainer); |
187 clearPaintInvalidationState(paintInvalidationState); | 187 clearPaintInvalidationState(paintInvalidationState); |
188 | 188 |
189 PaintInvalidationState childTreeWalkState(paintInvalidationState, *this, new
PaintInvalidationContainer); | 189 PaintInvalidationState childTreeWalkState(paintInvalidationState, *this, new
PaintInvalidationContainer); |
190 if (reason == PaintInvalidationLocationChange) | 190 if (reason == PaintInvalidationLocationChange) |
191 childTreeWalkState.setForceCheckForPaintInvalidation(); | 191 childTreeWalkState.setForceCheckForPaintInvalidation(); |
192 invalidatePaintOfSubtreesIfNeeded(childTreeWalkState); | 192 invalidatePaintOfSubtreesIfNeeded(childTreeWalkState); |
193 } | 193 } |
194 | 194 |
195 void RenderLayerModelObject::setBackingNeedsPaintInvalidationInRect(const Layout
Rect& r, PaintInvalidationReason invalidationReason, const RenderObject& forRend
erer) 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 if (GraphicsLayer* squashingLayer = layer()->groupedMapping()->squashing
Layer()) { | 204 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. | 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 } |
208 } else if (this != forRenderer && isBox() && toRenderBox(this)->usesComposit
edScrolling()) { | |
209 layer()->compositedLayerMapping()->setScrollingContentsNeedDisplayInRect
(r, invalidationReason); | |
210 } else { | 208 } else { |
211 layer()->compositedLayerMapping()->setContentsNeedDisplayInRect(r, inval
idationReason); | 209 layer()->compositedLayerMapping()->setContentsNeedDisplayInRect(r, inval
idationReason); |
212 } | 210 } |
213 } | 211 } |
214 | 212 |
215 } // namespace blink | 213 } // namespace blink |
216 | 214 |
OLD | NEW |