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

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

Issue 1026823002: [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
« no previous file with comments | « Source/core/layout/LayoutBlock.h ('k') | Source/core/layout/LayoutBox.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) 2007 David Smith (catfish.man@gmail.com) 4 * (C) 2007 David Smith (catfish.man@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 // If the style has unloaded images, want to notify the ResourceLoadPriority Optimizer so that 356 // If the style has unloaded images, want to notify the ResourceLoadPriority Optimizer so that
357 // network priorities can be set. 357 // network priorities can be set.
358 Vector<ImageResource*> images; 358 Vector<ImageResource*> images;
359 appendImagesFromStyle(images, newStyle); 359 appendImagesFromStyle(images, newStyle);
360 if (images.isEmpty()) 360 if (images.isEmpty())
361 ResourceLoadPriorityOptimizer::resourceLoadPriorityOptimizer()->removeLa youtObject(this); 361 ResourceLoadPriorityOptimizer::resourceLoadPriorityOptimizer()->removeLa youtObject(this);
362 else 362 else
363 ResourceLoadPriorityOptimizer::resourceLoadPriorityOptimizer()->addLayou tObject(this); 363 ResourceLoadPriorityOptimizer::resourceLoadPriorityOptimizer()->addLayou tObject(this);
364 } 364 }
365 365
366 void LayoutBlock::invalidatePaintOfSubtreesIfNeeded(const PaintInvalidationState & childPaintInvalidationState) 366 void LayoutBlock::invalidatePaintOfSubtreesIfNeeded(PaintInvalidationState& chil dPaintInvalidationState)
367 { 367 {
368 LayoutBox::invalidatePaintOfSubtreesIfNeeded(childPaintInvalidationState); 368 LayoutBox::invalidatePaintOfSubtreesIfNeeded(childPaintInvalidationState);
369 369
370 // Take care of positioned objects. This is required as PaintInvalidationSta te keeps a single clip rect. 370 // Take care of positioned objects. This is required as PaintInvalidationSta te keeps a single clip rect.
371 if (TrackedRendererListHashSet* positionedObjects = this->positionedObjects( )) { 371 if (TrackedRendererListHashSet* positionedObjects = this->positionedObjects( )) {
372 TrackedRendererListHashSet::iterator end = positionedObjects->end(); 372 TrackedRendererListHashSet::iterator end = positionedObjects->end();
373 for (TrackedRendererListHashSet::iterator it = positionedObjects->begin( ); it != end; ++it) { 373 for (TrackedRendererListHashSet::iterator it = positionedObjects->begin( ); it != end; ++it) {
374 LayoutBox* box = *it; 374 LayoutBox* box = *it;
375 375
376 // One of the renderers we're skipping over here may be the child's paint invalidation container, 376 // One of the renderers we're skipping over here may be the child's paint invalidation container,
(...skipping 3547 matching lines...) Expand 10 before | Expand all | Expand 10 after
3924 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout Object* obj) const 3924 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout Object* obj) const
3925 { 3925 {
3926 showLayoutObject(); 3926 showLayoutObject();
3927 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) 3927 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box())
3928 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); 3928 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1);
3929 } 3929 }
3930 3930
3931 #endif 3931 #endif
3932 3932
3933 } // namespace blink 3933 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutBlock.h ('k') | Source/core/layout/LayoutBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698