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

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

Issue 2164813002: Revert "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, 5 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 2439 matching lines...) Expand 10 before | Expand all | Expand 10 after
2450 LayoutRect childLocalRect(localRect); 2450 LayoutRect childLocalRect(localRect);
2451 childLayer->convertToLayerCoords(this, childOffset); 2451 childLayer->convertToLayerCoords(this, childOffset);
2452 childLocalRect.moveBy(-childOffset); 2452 childLocalRect.moveBy(-childOffset);
2453 2453
2454 if (childLayer->backgroundIsKnownToBeOpaqueInRect(childLocalRect)) 2454 if (childLayer->backgroundIsKnownToBeOpaqueInRect(childLocalRect))
2455 return true; 2455 return true;
2456 } 2456 }
2457 return false; 2457 return false;
2458 } 2458 }
2459 2459
2460 bool PaintLayer::isSelfPaintingLayerForIntrinsicOrScrollingReasons() const
2461 {
2462 return layoutObject()->layerTypeRequired() == NormalPaintLayer
2463 || (m_scrollableArea && m_scrollableArea->hasOverlayScrollbars())
2464 || needsCompositedScrolling();
2465 }
2466
2467 bool PaintLayer::shouldBeSelfPaintingLayer() const 2460 bool PaintLayer::shouldBeSelfPaintingLayer() const
2468 { 2461 {
2469 if (layoutObject()->isLayoutPart() && toLayoutPart(layoutObject())->requires AcceleratedCompositing()) 2462 if (layoutObject()->isLayoutPart() && toLayoutPart(layoutObject())->requires AcceleratedCompositing())
2470 return true; 2463 return true;
2471 return isSelfPaintingLayerForIntrinsicOrScrollingReasons(); 2464 return layoutObject()->layerTypeRequired() == NormalPaintLayer
2472 } 2465 || (m_scrollableArea && m_scrollableArea->hasOverlayScrollbars())
2473 2466 || needsCompositedScrolling();
2474 bool PaintLayer::isSelfPaintingOnlyBecauseIsCompositedPart() const
2475 {
2476 return shouldBeSelfPaintingLayer() && !isSelfPaintingLayerForIntrinsicOrScro llingReasons();
2477 } 2467 }
2478 2468
2479 void PaintLayer::updateSelfPaintingLayer() 2469 void PaintLayer::updateSelfPaintingLayer()
2480 { 2470 {
2481 bool isSelfPaintingLayer = shouldBeSelfPaintingLayer(); 2471 bool isSelfPaintingLayer = shouldBeSelfPaintingLayer();
2482 if (this->isSelfPaintingLayer() == isSelfPaintingLayer) 2472 if (this->isSelfPaintingLayer() == isSelfPaintingLayer)
2483 return; 2473 return;
2484 2474
2485 m_isSelfPaintingLayer = isSelfPaintingLayer; 2475 m_isSelfPaintingLayer = isSelfPaintingLayer;
2486 2476
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
2948 2938
2949 void showLayerTree(const blink::LayoutObject* layoutObject) 2939 void showLayerTree(const blink::LayoutObject* layoutObject)
2950 { 2940 {
2951 if (!layoutObject) { 2941 if (!layoutObject) {
2952 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); 2942 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n");
2953 return; 2943 return;
2954 } 2944 }
2955 showLayerTree(layoutObject->enclosingLayer()); 2945 showLayerTree(layoutObject->enclosingLayer());
2956 } 2946 }
2957 #endif 2947 #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