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

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

Issue 2009353003: Add a hack to set shouldPaint to true for force-composited iframes. (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 | « third_party/WebKit/Source/core/paint/PaintLayer.h ('k') | 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 2423 matching lines...) Expand 10 before | Expand all | Expand 10 after
2434 LayoutRect childLocalRect(localRect); 2434 LayoutRect childLocalRect(localRect);
2435 childLayer->convertToLayerCoords(this, childOffset); 2435 childLayer->convertToLayerCoords(this, childOffset);
2436 childLocalRect.moveBy(-childOffset); 2436 childLocalRect.moveBy(-childOffset);
2437 2437
2438 if (childLayer->backgroundIsKnownToBeOpaqueInRect(childLocalRect)) 2438 if (childLayer->backgroundIsKnownToBeOpaqueInRect(childLocalRect))
2439 return true; 2439 return true;
2440 } 2440 }
2441 return false; 2441 return false;
2442 } 2442 }
2443 2443
2444 bool PaintLayer::isSelfPaintingLayerForIntrinsicOrScrollingReasons() const
2445 {
2446 return layoutObject()->layerTypeRequired() == NormalPaintLayer
2447 || (m_scrollableArea && m_scrollableArea->hasOverlayScrollbars())
2448 || needsCompositedScrolling();
2449 }
2450
2444 bool PaintLayer::shouldBeSelfPaintingLayer() const 2451 bool PaintLayer::shouldBeSelfPaintingLayer() const
2445 { 2452 {
2446 if (layoutObject()->isLayoutPart() && toLayoutPart(layoutObject())->requires AcceleratedCompositing()) 2453 if (layoutObject()->isLayoutPart() && toLayoutPart(layoutObject())->requires AcceleratedCompositing())
2447 return true; 2454 return true;
2448 return layoutObject()->layerTypeRequired() == NormalPaintLayer 2455 return isSelfPaintingLayerForIntrinsicOrScrollingReasons();
2449 || (m_scrollableArea && m_scrollableArea->hasOverlayScrollbars()) 2456 }
2450 || needsCompositedScrolling(); 2457
2458 bool PaintLayer::isSelfPaintingOnlyBecauseIsCompositedPart() const
2459 {
2460 return shouldBeSelfPaintingLayer() && !isSelfPaintingLayerForIntrinsicOrScro llingReasons();
2451 } 2461 }
2452 2462
2453 void PaintLayer::updateSelfPaintingLayer() 2463 void PaintLayer::updateSelfPaintingLayer()
2454 { 2464 {
2455 bool isSelfPaintingLayer = shouldBeSelfPaintingLayer(); 2465 bool isSelfPaintingLayer = shouldBeSelfPaintingLayer();
2456 if (this->isSelfPaintingLayer() == isSelfPaintingLayer) 2466 if (this->isSelfPaintingLayer() == isSelfPaintingLayer)
2457 return; 2467 return;
2458 2468
2459 m_isSelfPaintingLayer = isSelfPaintingLayer; 2469 m_isSelfPaintingLayer = isSelfPaintingLayer;
2460 2470
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
2905 2915
2906 void showLayerTree(const blink::LayoutObject* layoutObject) 2916 void showLayerTree(const blink::LayoutObject* layoutObject)
2907 { 2917 {
2908 if (!layoutObject) { 2918 if (!layoutObject) {
2909 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); 2919 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n");
2910 return; 2920 return;
2911 } 2921 }
2912 showLayerTree(layoutObject->enclosingLayer()); 2922 showLayerTree(layoutObject->enclosingLayer());
2913 } 2923 }
2914 #endif 2924 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698