Chromium Code Reviews| 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 |
|
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
| |
| 206 squashingLayer->setNeedsDisplayInRect(pixelSnappedIntRect(paintInval idationRect), invalidationReason); | 206 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.
| |
| 207 squashingLayer->setNeedsDisplayInRect(snappedRect, invalidationReaso n); | |
| 208 } | |
| 207 } else { | 209 } else { |
| 208 layer()->compositedLayerMapping()->setContentsNeedDisplayInRect(r, inval idationReason); | 210 layer()->compositedLayerMapping()->setContentsNeedDisplayInRect(r, inval idationReason); |
| 209 } | 211 } |
| 210 } | 212 } |
| 211 | 213 |
| 212 } // namespace blink | 214 } // namespace blink |
| 213 | 215 |
| OLD | NEW |