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

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
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 2431 matching lines...) Expand 10 before | Expand all | Expand 10 after
2442 LayoutRect childLocalRect(localRect); 2442 LayoutRect childLocalRect(localRect);
2443 childLayer->convertToLayerCoords(this, childOffset); 2443 childLayer->convertToLayerCoords(this, childOffset);
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::isSelfPaintingLayerForIntrinsicOrScrollingReasons() const
2453 {
2454 return m_layerType == NormalPaintLayer
2455 || (m_scrollableArea && m_scrollableArea->hasOverlayScrollbars())
2456 || needsCompositedScrolling();
2457 }
2458
2452 bool PaintLayer::shouldBeSelfPaintingLayer() const 2459 bool PaintLayer::shouldBeSelfPaintingLayer() const
2453 { 2460 {
2454 if (layoutObject()->isLayoutPart() && toLayoutPart(layoutObject())->requires AcceleratedCompositing()) 2461 if (layoutObject()->isLayoutPart() && toLayoutPart(layoutObject())->requires AcceleratedCompositing())
2455 return true; 2462 return true;
2456 return m_layerType == NormalPaintLayer 2463 return isSelfPaintingLayerForIntrinsicOrScrollingReasons();
2457 || (m_scrollableArea && m_scrollableArea->hasOverlayScrollbars()) 2464 }
2458 || needsCompositedScrolling(); 2465
2466 bool PaintLayer::isSelfPaintingOnlyBecauseIsCompositedPart() const
2467 {
2468 return shouldBeSelfPaintingLayer() && !isSelfPaintingLayerForIntrinsicOrScro llingReasons();
2459 } 2469 }
2460 2470
2461 void PaintLayer::updateSelfPaintingLayer() 2471 void PaintLayer::updateSelfPaintingLayer()
2462 { 2472 {
2463 bool isSelfPaintingLayer = shouldBeSelfPaintingLayer(); 2473 bool isSelfPaintingLayer = shouldBeSelfPaintingLayer();
2464 if (this->isSelfPaintingLayer() == isSelfPaintingLayer) 2474 if (this->isSelfPaintingLayer() == isSelfPaintingLayer)
2465 return; 2475 return;
2466 2476
2467 m_isSelfPaintingLayer = isSelfPaintingLayer; 2477 m_isSelfPaintingLayer = isSelfPaintingLayer;
2468 2478
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
2913 2923
2914 void showLayerTree(const blink::LayoutObject* layoutObject) 2924 void showLayerTree(const blink::LayoutObject* layoutObject)
2915 { 2925 {
2916 if (!layoutObject) { 2926 if (!layoutObject) {
2917 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); 2927 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n");
2918 return; 2928 return;
2919 } 2929 }
2920 showLayerTree(layoutObject->enclosingLayer()); 2930 showLayerTree(layoutObject->enclosingLayer());
2921 } 2931 }
2922 #endif 2932 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698