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

Side by Side Diff: Source/core/paint/DeprecatedPaintLayer.cpp

Issue 1164713010: Invalidate non-composited subtree on needsPaintInvalidationLayer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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) 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 1267 matching lines...) Expand 10 before | Expand all | Expand 10 after
1278 { 1278 {
1279 if (!m_parent) 1279 if (!m_parent)
1280 return; 1280 return;
1281 1281
1282 { 1282 {
1283 DisableCompositingQueryAsserts disabler; // We need the current composit ing status. 1283 DisableCompositingQueryAsserts disabler; // We need the current composit ing status.
1284 if (isPaintInvalidationContainer()) { 1284 if (isPaintInvalidationContainer()) {
1285 // Our children will be reparented and contained by a new paint inva lidation container, 1285 // Our children will be reparented and contained by a new paint inva lidation container,
1286 // so need paint invalidation. CompositingUpdate can't see this laye r (which has been 1286 // so need paint invalidation. CompositingUpdate can't see this laye r (which has been
1287 // removed) so won't do this for us. 1287 // removed) so won't do this for us.
1288 setShouldDoFullPaintInvalidationIncludingNonCompositingDescendants() ; 1288 layoutObject()->setShouldDoFullPaintInvalidationIncludingNonComposit ingDescendants();
1289 } 1289 }
1290 } 1290 }
1291 1291
1292 m_clipper.clearClipRectsIncludingDescendants(); 1292 m_clipper.clearClipRectsIncludingDescendants();
1293 1293
1294 DeprecatedPaintLayer* nextSib = nextSibling(); 1294 DeprecatedPaintLayer* nextSib = nextSibling();
1295 1295
1296 // Remove the child reflection layer before moving other child layers. 1296 // Remove the child reflection layer before moving other child layers.
1297 // The reflection layer should not be moved to the parent. 1297 // The reflection layer should not be moved to the parent.
1298 if (m_reflectionInfo) 1298 if (m_reflectionInfo)
(...skipping 1624 matching lines...) Expand 10 before | Expand all | Expand 10 after
2923 iter->value.append(physicalBoundingBox(parentLayer)); 2923 iter->value.append(physicalBoundingBox(parentLayer));
2924 } 2924 }
2925 } 2925 }
2926 } else { 2926 } else {
2927 rect.append(logicalBoundingBox()); 2927 rect.append(logicalBoundingBox());
2928 rects.set(this, rect); 2928 rects.set(this, rect);
2929 } 2929 }
2930 } 2930 }
2931 } 2931 }
2932 2932
2933 void DeprecatedPaintLayer::setShouldDoFullPaintInvalidationIncludingNonCompositi ngDescendants()
2934 {
2935 layoutObject()->setShouldDoFullPaintInvalidation();
2936
2937 // Disable for reading compositingState() in isPaintInvalidationContainer() below.
2938 DisableCompositingQueryAsserts disabler;
2939
2940 for (DeprecatedPaintLayer* child = firstChild(); child; child = child->nextS ibling()) {
2941 if (!child->isPaintInvalidationContainer())
2942 child->setShouldDoFullPaintInvalidationIncludingNonCompositingDescen dants();
2943 }
2944 }
2945
2946 DisableCompositingQueryAsserts::DisableCompositingQueryAsserts() 2933 DisableCompositingQueryAsserts::DisableCompositingQueryAsserts()
2947 : m_disabler(gCompositingQueryMode, CompositingQueriesAreAllowed) { } 2934 : m_disabler(gCompositingQueryMode, CompositingQueriesAreAllowed) { }
2948 2935
2949 } // namespace blink 2936 } // namespace blink
2950 2937
2951 #ifndef NDEBUG 2938 #ifndef NDEBUG
2952 // FIXME: Rename? 2939 // FIXME: Rename?
2953 void showLayerTree(const blink::DeprecatedPaintLayer* layer) 2940 void showLayerTree(const blink::DeprecatedPaintLayer* layer)
2954 { 2941 {
2955 if (!layer) { 2942 if (!layer) {
2956 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); 2943 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n");
2957 return; 2944 return;
2958 } 2945 }
2959 2946
2960 if (blink::LocalFrame* frame = layer->layoutObject()->frame()) { 2947 if (blink::LocalFrame* frame = layer->layoutObject()->frame()) {
2961 WTF::String output = externalRepresentation(frame, blink::LayoutAsTextSh owAllLayers | blink::LayoutAsTextShowLayerNesting | blink::LayoutAsTextShowCompo sitedLayers | blink::LayoutAsTextShowAddresses | blink::LayoutAsTextShowIDAndCla ss | blink::LayoutAsTextDontUpdateLayout | blink::LayoutAsTextShowLayoutState); 2948 WTF::String output = externalRepresentation(frame, blink::LayoutAsTextSh owAllLayers | blink::LayoutAsTextShowLayerNesting | blink::LayoutAsTextShowCompo sitedLayers | blink::LayoutAsTextShowAddresses | blink::LayoutAsTextShowIDAndCla ss | blink::LayoutAsTextDontUpdateLayout | blink::LayoutAsTextShowLayoutState);
2962 fprintf(stderr, "%s\n", output.utf8().data()); 2949 fprintf(stderr, "%s\n", output.utf8().data());
2963 } 2950 }
2964 } 2951 }
2965 2952
2966 void showLayerTree(const blink::LayoutObject* layoutObject) 2953 void showLayerTree(const blink::LayoutObject* layoutObject)
2967 { 2954 {
2968 if (!layoutObject) { 2955 if (!layoutObject) {
2969 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); 2956 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n");
2970 return; 2957 return;
2971 } 2958 }
2972 showLayerTree(layoutObject->enclosingLayer()); 2959 showLayerTree(layoutObject->enclosingLayer());
2973 } 2960 }
2974 #endif 2961 #endif
OLDNEW
« Source/core/frame/FrameView.cpp ('K') | « Source/core/paint/DeprecatedPaintLayer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698