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

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

Issue 2915013004: Make all PaintLayers that scroll overflow self-painting. (Closed)
Patch Set: none Created 3 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 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * 4 *
5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
6 * 6 *
7 * Other contributors: 7 * Other contributors:
8 * Robert O'Callahan <roc+@cs.cmu.edu> 8 * Robert O'Callahan <roc+@cs.cmu.edu>
9 * David Baron <dbaron@fas.harvard.edu> 9 * David Baron <dbaron@fas.harvard.edu>
10 * Christian Biesinger <cbiesinger@web.de> 10 * Christian Biesinger <cbiesinger@web.de>
(...skipping 2885 matching lines...) Expand 10 before | Expand all | Expand 10 after
2896 return false; 2896 return false;
2897 } 2897 }
2898 2898
2899 bool PaintLayer::ShouldBeSelfPaintingLayer() const { 2899 bool PaintLayer::ShouldBeSelfPaintingLayer() const {
2900 if (GetLayoutObject().IsLayoutPart() && 2900 if (GetLayoutObject().IsLayoutPart() &&
2901 ToLayoutPart(GetLayoutObject()).RequiresAcceleratedCompositing()) 2901 ToLayoutPart(GetLayoutObject()).RequiresAcceleratedCompositing())
2902 return true; 2902 return true;
2903 2903
2904 return GetLayoutObject().LayerTypeRequired() == kNormalPaintLayer || 2904 return GetLayoutObject().LayerTypeRequired() == kNormalPaintLayer ||
2905 (scrollable_area_ && scrollable_area_->HasOverlayScrollbars()) || 2905 (scrollable_area_ && scrollable_area_->HasOverlayScrollbars()) ||
2906 NeedsCompositedScrolling(); 2906 ScrollsOverflow();
Xianzhu 2017/06/03 04:10:21 Was there anything preventing us from letting all
2907 } 2907 }
2908 2908
2909 void PaintLayer::UpdateSelfPaintingLayer() { 2909 void PaintLayer::UpdateSelfPaintingLayer() {
2910 bool is_self_painting_layer = ShouldBeSelfPaintingLayer(); 2910 bool is_self_painting_layer = ShouldBeSelfPaintingLayer();
2911 if (this->IsSelfPaintingLayer() == is_self_painting_layer) 2911 if (this->IsSelfPaintingLayer() == is_self_painting_layer)
2912 return; 2912 return;
2913 2913
2914 is_self_painting_layer_ = is_self_painting_layer; 2914 is_self_painting_layer_ = is_self_painting_layer;
2915 self_painting_status_changed_ = true; 2915 self_painting_status_changed_ = true;
2916 2916
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
3348 } 3348 }
3349 3349
3350 void showLayerTree(const blink::LayoutObject* layoutObject) { 3350 void showLayerTree(const blink::LayoutObject* layoutObject) {
3351 if (!layoutObject) { 3351 if (!layoutObject) {
3352 LOG(INFO) << "Cannot showLayerTree. Root is (nil)"; 3352 LOG(INFO) << "Cannot showLayerTree. Root is (nil)";
3353 return; 3353 return;
3354 } 3354 }
3355 showLayerTree(layoutObject->EnclosingLayer()); 3355 showLayerTree(layoutObject->EnclosingLayer());
3356 } 3356 }
3357 #endif 3357 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698