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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayer.cpp

Issue 2810503002: Only store previous clip rects for PaintLayers that support subsequences. (Closed)
Patch Set: none Created 3 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * 4 *
5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
6 * 6 *
7 * Other contributors: 7 * Other contributors:
8 * Robert O'Callahan <roc+@cs.cmu.edu> 8 * Robert O'Callahan <roc+@cs.cmu.edu>
9 * David Baron <dbaron@fas.harvard.edu> 9 * David Baron <dbaron@fas.harvard.edu>
10 * Christian Biesinger <cbiesinger@web.de> 10 * Christian Biesinger <cbiesinger@web.de>
(...skipping 2730 matching lines...) Expand 10 before | Expand all | Expand 10 after
2741 ((global_paint_flags & kGlobalPaintFlattenCompositingLayers) || 2741 ((global_paint_flags & kGlobalPaintFlattenCompositingLayers) ||
2742 GetCompositingState() != kPaintsIntoOwnBacking); 2742 GetCompositingState() != kPaintsIntoOwnBacking);
2743 } 2743 }
2744 2744
2745 return (Transform() || 2745 return (Transform() ||
2746 GetLayoutObject().Style()->GetPosition() == EPosition::kFixed) && 2746 GetLayoutObject().Style()->GetPosition() == EPosition::kFixed) &&
2747 ((global_paint_flags & kGlobalPaintFlattenCompositingLayers) || 2747 ((global_paint_flags & kGlobalPaintFlattenCompositingLayers) ||
2748 GetCompositingState() != kPaintsIntoOwnBacking); 2748 GetCompositingState() != kPaintsIntoOwnBacking);
2749 } 2749 }
2750 2750
2751 bool PaintLayer::SupportsSubsequenceCaching() const {
2752 // SVG paints atomically.
2753 if (GetLayoutObject().IsSVGRoot())
2754 return true;
2755
2756 // Create subsequence for only stacking contexts whose painting are atomic.
2757 if (!StackingNode()->IsStackingContext())
2758 return false;
2759
2760 // The layer doesn't have children. Subsequence caching is not worth it,
2761 // because normally the actual painting will be cheap.
2762 // SVG is also painted atomically.
2763 if (!PaintLayerStackingNodeIterator(*StackingNode(), kAllChildren).Next())
2764 return false;
2765
2766 return true;
2767 }
2768
2751 ScrollingCoordinator* PaintLayer::GetScrollingCoordinator() { 2769 ScrollingCoordinator* PaintLayer::GetScrollingCoordinator() {
2752 Page* page = GetLayoutObject().GetFrame()->GetPage(); 2770 Page* page = GetLayoutObject().GetFrame()->GetPage();
2753 return (!page) ? nullptr : page->GetScrollingCoordinator(); 2771 return (!page) ? nullptr : page->GetScrollingCoordinator();
2754 } 2772 }
2755 2773
2756 bool PaintLayer::CompositesWithTransform() const { 2774 bool PaintLayer::CompositesWithTransform() const {
2757 return TransformAncestor() || Transform(); 2775 return TransformAncestor() || Transform();
2758 } 2776 }
2759 2777
2760 bool PaintLayer::CompositesWithOpacity() const { 2778 bool PaintLayer::CompositesWithOpacity() const {
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
3283 } 3301 }
3284 3302
3285 void showLayerTree(const blink::LayoutObject* layoutObject) { 3303 void showLayerTree(const blink::LayoutObject* layoutObject) {
3286 if (!layoutObject) { 3304 if (!layoutObject) {
3287 LOG(INFO) << "Cannot showLayerTree. Root is (nil)"; 3305 LOG(INFO) << "Cannot showLayerTree. Root is (nil)";
3288 return; 3306 return;
3289 } 3307 }
3290 showLayerTree(layoutObject->EnclosingLayer()); 3308 showLayerTree(layoutObject->EnclosingLayer());
3291 } 3309 }
3292 #endif 3310 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayer.h ('k') | third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698