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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 172 // to marking entire layers instead. This may sometimes mark more th an necessary (when | 172 // to marking entire layers instead. This may sometimes mark more th an necessary (when |
| 173 // a layer is made of disjoint objects) but in practice is a signifi cant performance | 173 // a layer is made of disjoint objects) but in practice is a signifi cant performance |
| 174 // savings. | 174 // savings. |
| 175 layer()->addLayerHitTestRects(rects); | 175 layer()->addLayerHitTestRects(rects); |
| 176 } | 176 } |
| 177 } else { | 177 } else { |
| 178 RenderObject::addLayerHitTestRects(rects, currentLayer, layerOffset, con tainerRect); | 178 RenderObject::addLayerHitTestRects(rects, currentLayer, layerOffset, con tainerRect); |
| 179 } | 179 } |
| 180 } | 180 } |
| 181 | 181 |
| 182 void RenderLayerModelObject::invalidatePaintIfNeeded(const PaintInvalidationStat e& paintInvalidationState, const RenderLayerModelObject& newPaintInvalidationCon tainer) | |
| 183 { | |
| 184 const LayoutRect oldPaintInvalidationRect = previousPaintInvalidationRect(); | |
| 185 const LayoutPoint oldPositionFromPaintInvalidationContainer = previousPositi onFromPaintInvalidationContainer(); | |
| 186 setPreviousPaintInvalidationRect(boundsRectForPaintInvalidation(&newPaintInv alidationContainer, &paintInvalidationState)); | |
| 187 setPreviousPositionFromPaintInvalidationContainer(RenderLayer::positionFromP aintInvalidationContainer(this, &newPaintInvalidationContainer, &paintInvalidati onState)); | |
| 188 | |
| 189 // If we are set to do a full paint invalidation that means the RenderView w ill be | |
|
dsinclair
2014/08/05 15:09:48
s/will be/will/
leviw_travelin_and_unemployed
2014/08/05 22:34:44
Done.
| |
| 190 // issue paint invalidations. We can then skip issuing of paint invalidation s for the child | |
| 191 // renderers as they'll be covered by the RenderView. | |
| 192 if (view()->doingFullPaintInvalidation()) | |
| 193 return; | |
| 194 | |
| 195 RenderObject::invalidatePaintIfNeeded(newPaintInvalidationContainer, oldPain tInvalidationRect, oldPositionFromPaintInvalidationContainer, paintInvalidationS tate); | |
| 196 } | |
| 197 | |
| 198 void RenderLayerModelObject::invalidateTreeIfNeeded(const PaintInvalidationState & paintInvalidationState) | |
| 199 { | |
| 200 // FIXME: SVG should probably also go through this unified paint invalidatio n system. | |
|
dsinclair
2014/07/31 17:49:42
Should we make a bug for this and track why SVG do
| |
| 201 ASSERT(!needsLayout()); | |
| 202 | |
| 203 if (!shouldCheckForPaintInvalidation()) | |
| 204 return; | |
| 205 | |
| 206 bool establishesNewPaintInvalidationContainer = isPaintInvalidationContainer (); | |
| 207 const RenderLayerModelObject& newPaintInvalidationContainer = *adjustComposi tedContainerForSpecialAncestors(establishesNewPaintInvalidationContainer ? this : &paintInvalidationState.paintInvalidationContainer()); | |
| 208 ASSERT(&newPaintInvalidationContainer == containerForPaintInvalidation()); | |
| 209 | |
| 210 invalidatePaintIfNeeded(paintInvalidationState, newPaintInvalidationContaine r); | |
| 211 | |
| 212 PaintInvalidationState childTreeWalkState(paintInvalidationState, *this, new PaintInvalidationContainer); | |
| 213 RenderObject::invalidateTreeIfNeeded(childTreeWalkState); | |
| 214 } | |
| 215 | |
| 182 } // namespace blink | 216 } // namespace blink |
| 183 | 217 |
| OLD | NEW |