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

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

Issue 2033513003: (NOT FOR COMMIT) Testing layer invalidation speedups. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 2278 matching lines...) Expand 10 before | Expand all | Expand 10 after
2289 return PaintsIntoOwnBacking; 2289 return PaintsIntoOwnBacking;
2290 } 2290 }
2291 2291
2292 bool PaintLayer::isAllowedToQueryCompositingState() const 2292 bool PaintLayer::isAllowedToQueryCompositingState() const
2293 { 2293 {
2294 if (gCompositingQueryMode == CompositingQueriesAreAllowed || RuntimeEnabledF eatures::slimmingPaintV2Enabled()) 2294 if (gCompositingQueryMode == CompositingQueriesAreAllowed || RuntimeEnabledF eatures::slimmingPaintV2Enabled())
2295 return true; 2295 return true;
2296 return layoutObject()->document().lifecycle().state() >= DocumentLifecycle:: InCompositingUpdate; 2296 return layoutObject()->document().lifecycle().state() >= DocumentLifecycle:: InCompositingUpdate;
2297 } 2297 }
2298 2298
2299 void PaintLayer::finalizeInvalidations()
2300 {
2301 if (compositedLayerMapping())
2302 compositedLayerMapping()->finalizeInvalidations();
2303 }
2304
2299 CompositedLayerMapping* PaintLayer::compositedLayerMapping() const 2305 CompositedLayerMapping* PaintLayer::compositedLayerMapping() const
2300 { 2306 {
2301 ASSERT(isAllowedToQueryCompositingState()); 2307 ASSERT(isAllowedToQueryCompositingState());
2302 return m_rareData ? m_rareData->compositedLayerMapping.get() : nullptr; 2308 return m_rareData ? m_rareData->compositedLayerMapping.get() : nullptr;
2303 } 2309 }
2304 2310
2305 GraphicsLayer* PaintLayer::graphicsLayerBacking() const 2311 GraphicsLayer* PaintLayer::graphicsLayerBacking() const
2306 { 2312 {
2307 switch (compositingState()) { 2313 switch (compositingState()) {
2308 case NotComposited: 2314 case NotComposited:
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
2913 2919
2914 void showLayerTree(const blink::LayoutObject* layoutObject) 2920 void showLayerTree(const blink::LayoutObject* layoutObject)
2915 { 2921 {
2916 if (!layoutObject) { 2922 if (!layoutObject) {
2917 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); 2923 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n");
2918 return; 2924 return;
2919 } 2925 }
2920 showLayerTree(layoutObject->enclosingLayer()); 2926 showLayerTree(layoutObject->enclosingLayer());
2921 } 2927 }
2922 #endif 2928 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayer.h ('k') | third_party/WebKit/Source/platform/graphics/GraphicsLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698