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

Side by Side Diff: Source/core/layout/LayoutBoxModelObject.cpp

Issue 1008043002: [S.P.] Don't draw frames of animated images that are offscreen. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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 Google Inc. All rights reserved. 7 * Copyright (C) 2010 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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 243
244 if (!shouldCheckForPaintInvalidation(paintInvalidationState)) 244 if (!shouldCheckForPaintInvalidation(paintInvalidationState))
245 return; 245 return;
246 246
247 bool establishesNewPaintInvalidationContainer = isPaintInvalidationContainer (); 247 bool establishesNewPaintInvalidationContainer = isPaintInvalidationContainer ();
248 const LayoutBoxModelObject& newPaintInvalidationContainer = *adjustComposite dContainerForSpecialAncestors(establishesNewPaintInvalidationContainer ? this : &paintInvalidationState.paintInvalidationContainer()); 248 const LayoutBoxModelObject& newPaintInvalidationContainer = *adjustComposite dContainerForSpecialAncestors(establishesNewPaintInvalidationContainer ? this : &paintInvalidationState.paintInvalidationContainer());
249 // FIXME: This assert should be re-enabled when we move paint invalidation t o after compositing update. crbug.com/360286 249 // FIXME: This assert should be re-enabled when we move paint invalidation t o after compositing update. crbug.com/360286
250 // ASSERT(&newPaintInvalidationContainer == containerForPaintInvalidation()) ; 250 // ASSERT(&newPaintInvalidationContainer == containerForPaintInvalidation()) ;
251 251
252 PaintInvalidationReason reason = invalidatePaintIfNeeded(paintInvalidationSt ate, newPaintInvalidationContainer); 252 PaintInvalidationReason reason = invalidatePaintIfNeeded(paintInvalidationSt ate, newPaintInvalidationContainer);
253 clearPaintInvalidationState(paintInvalidationState); 253 if (reason != PaintInvalidationDelayedFull) {
254 clearPaintInvalidationState(paintInvalidationState);
255 } else {
256 // Mark this object as needing paint invalidation again in the next fram e, due to the request for delayed paint invalidation.
257 setShouldDoFullPaintInvalidation();
258 }
254 259
255 PaintInvalidationState childTreeWalkState(paintInvalidationState, *this, new PaintInvalidationContainer); 260 PaintInvalidationState childTreeWalkState(paintInvalidationState, *this, new PaintInvalidationContainer);
256 if (reason == PaintInvalidationLocationChange) 261 if (reason == PaintInvalidationLocationChange)
257 childTreeWalkState.setForceCheckForPaintInvalidation(); 262 childTreeWalkState.setForceCheckForPaintInvalidation();
258 invalidatePaintOfSubtreesIfNeeded(childTreeWalkState); 263 invalidatePaintOfSubtreesIfNeeded(childTreeWalkState);
259 } 264 }
260 265
261 void LayoutBoxModelObject::setBackingNeedsPaintInvalidationInRect(const LayoutRe ct& r, PaintInvalidationReason invalidationReason) const 266 void LayoutBoxModelObject::setBackingNeedsPaintInvalidationInRect(const LayoutRe ct& r, PaintInvalidationReason invalidationReason) const
262 { 267 {
263 // https://bugs.webkit.org/show_bug.cgi?id=61159 describes an unreproducible crash here, 268 // https://bugs.webkit.org/show_bug.cgi?id=61159 describes an unreproducible crash here,
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); 867 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent());
863 for (LayoutObject* child = startChild; child && child != endChild; ) { 868 for (LayoutObject* child = startChild; child && child != endChild; ) {
864 // Save our next sibling as moveChildTo will clear it. 869 // Save our next sibling as moveChildTo will clear it.
865 LayoutObject* nextSibling = child->nextSibling(); 870 LayoutObject* nextSibling = child->nextSibling();
866 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert); 871 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert);
867 child = nextSibling; 872 child = nextSibling;
868 } 873 }
869 } 874 }
870 875
871 } // namespace blink 876 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698