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

Side by Side Diff: Source/core/rendering/RenderLayer.cpp

Issue 398343003: Use unified invalidation path for repaint-only style changes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Also handle layers Created 6 years, 4 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/rendering/RenderLayer.h ('k') | Source/core/rendering/RenderLayerModelObject.cpp » ('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) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 3754 matching lines...) Expand 10 before | Expand all | Expand 10 after
3765 iter->value.append(physicalBoundingBox(parentLayer)); 3765 iter->value.append(physicalBoundingBox(parentLayer));
3766 } 3766 }
3767 } 3767 }
3768 } else { 3768 } else {
3769 rect.append(logicalBoundingBox()); 3769 rect.append(logicalBoundingBox());
3770 rects.set(this, rect); 3770 rects.set(this, rect);
3771 } 3771 }
3772 } 3772 }
3773 } 3773 }
3774 3774
3775 void RenderLayer::setShouldDoFullPaintInvalidationIncludingNonCompositingDescend ants()
3776 {
3777 // FIXME: For objects whose invalidateTreeIfNeeded won't invalidate themselv es,
3778 // we still need to invalidate now. crbug.com/394133.
3779 if (renderer()->canSelfInvalidateDuringTreeInvalidation())
3780 renderer()->setShouldDoFullPaintInvalidation(true);
3781 else
3782 renderer()->paintInvalidationForWholeRenderer();
3783
3784 for (RenderLayer* child = firstChild(); child; child = child->nextSibling()) {
3785 if (child->compositingState() != PaintsIntoOwnBacking && child->composit ingState() != PaintsIntoGroupedBacking)
3786 child->setShouldDoFullPaintInvalidationIncludingNonCompositingDescen dants();
3787 }
3788 }
3789
3775 DisableCompositingQueryAsserts::DisableCompositingQueryAsserts() 3790 DisableCompositingQueryAsserts::DisableCompositingQueryAsserts()
3776 : m_disabler(gCompositingQueryMode, CompositingQueriesAreAllowed) { } 3791 : m_disabler(gCompositingQueryMode, CompositingQueriesAreAllowed) { }
3777 3792
3778 COMPILE_ASSERT(1 << RenderLayer::ViewportConstrainedNotCompositedReasonBits >= R enderLayer::NumNotCompositedReasons, too_many_viewport_constrained_not_compositi ng_reasons); 3793 COMPILE_ASSERT(1 << RenderLayer::ViewportConstrainedNotCompositedReasonBits >= R enderLayer::NumNotCompositedReasons, too_many_viewport_constrained_not_compositi ng_reasons);
3779 3794
3780 } // namespace blink 3795 } // namespace blink
3781 3796
3782 #ifndef NDEBUG 3797 #ifndef NDEBUG
3783 void showLayerTree(const blink::RenderLayer* layer) 3798 void showLayerTree(const blink::RenderLayer* layer)
3784 { 3799 {
3785 if (!layer) 3800 if (!layer)
3786 return; 3801 return;
3787 3802
3788 if (blink::LocalFrame* frame = layer->renderer()->frame()) { 3803 if (blink::LocalFrame* frame = layer->renderer()->frame()) {
3789 WTF::String output = externalRepresentation(frame, blink::RenderAsTextSh owAllLayers | blink::RenderAsTextShowLayerNesting | blink::RenderAsTextShowCompo sitedLayers | blink::RenderAsTextShowAddresses | blink::RenderAsTextShowIDAndCla ss | blink::RenderAsTextDontUpdateLayout | blink::RenderAsTextShowLayoutState); 3804 WTF::String output = externalRepresentation(frame, blink::RenderAsTextSh owAllLayers | blink::RenderAsTextShowLayerNesting | blink::RenderAsTextShowCompo sitedLayers | blink::RenderAsTextShowAddresses | blink::RenderAsTextShowIDAndCla ss | blink::RenderAsTextDontUpdateLayout | blink::RenderAsTextShowLayoutState);
3790 fprintf(stderr, "%s\n", output.utf8().data()); 3805 fprintf(stderr, "%s\n", output.utf8().data());
3791 } 3806 }
3792 } 3807 }
3793 3808
3794 void showLayerTree(const blink::RenderObject* renderer) 3809 void showLayerTree(const blink::RenderObject* renderer)
3795 { 3810 {
3796 if (!renderer) 3811 if (!renderer)
3797 return; 3812 return;
3798 showLayerTree(renderer->enclosingLayer()); 3813 showLayerTree(renderer->enclosingLayer());
3799 } 3814 }
3800 #endif 3815 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderLayer.h ('k') | Source/core/rendering/RenderLayerModelObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698