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

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

Issue 2013633002: Don't force LayoutParts to be self-painting if composited. (Closed) 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
« no previous file with comments | « no previous file | no next file » | 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 2433 matching lines...) Expand 10 before | Expand all | Expand 10 after
2444 childLocalRect.moveBy(-childOffset); 2444 childLocalRect.moveBy(-childOffset);
2445 2445
2446 if (childLayer->backgroundIsKnownToBeOpaqueInRect(childLocalRect)) 2446 if (childLayer->backgroundIsKnownToBeOpaqueInRect(childLocalRect))
2447 return true; 2447 return true;
2448 } 2448 }
2449 return false; 2449 return false;
2450 } 2450 }
2451 2451
2452 bool PaintLayer::shouldBeSelfPaintingLayer() const 2452 bool PaintLayer::shouldBeSelfPaintingLayer() const
2453 { 2453 {
2454 if (layoutObject()->isLayoutPart() && toLayoutPart(layoutObject())->requires AcceleratedCompositing())
2455 return true;
2456 return m_layerType == NormalPaintLayer 2454 return m_layerType == NormalPaintLayer
2457 || (m_scrollableArea && m_scrollableArea->hasOverlayScrollbars()) 2455 || (m_scrollableArea && m_scrollableArea->hasOverlayScrollbars())
2458 || needsCompositedScrolling(); 2456 || needsCompositedScrolling();
2459 } 2457 }
2460 2458
2461 void PaintLayer::updateSelfPaintingLayer() 2459 void PaintLayer::updateSelfPaintingLayer()
2462 { 2460 {
2463 bool isSelfPaintingLayer = shouldBeSelfPaintingLayer(); 2461 bool isSelfPaintingLayer = shouldBeSelfPaintingLayer();
2464 if (this->isSelfPaintingLayer() == isSelfPaintingLayer) 2462 if (this->isSelfPaintingLayer() == isSelfPaintingLayer)
2465 return; 2463 return;
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
2913 2911
2914 void showLayerTree(const blink::LayoutObject* layoutObject) 2912 void showLayerTree(const blink::LayoutObject* layoutObject)
2915 { 2913 {
2916 if (!layoutObject) { 2914 if (!layoutObject) {
2917 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); 2915 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n");
2918 return; 2916 return;
2919 } 2917 }
2920 showLayerTree(layoutObject->enclosingLayer()); 2918 showLayerTree(layoutObject->enclosingLayer());
2921 } 2919 }
2922 #endif 2920 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698