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

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

Issue 2833883003: Skip paint chunks with effectively invisible opacity. (Closed)
Patch Set: Created 3 years, 8 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) 2003, 2009, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Intel Corporation. All rights reserved. 3 * Copyright (C) 2013 Intel Corporation. All rights 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 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 559
560 // Adjusts the given rect (in the coordinate space of the LayoutObject) to the 560 // Adjusts the given rect (in the coordinate space of the LayoutObject) to the
561 // coordinate space of |paintInvalidationContainer|'s GraphicsLayer backing. 561 // coordinate space of |paintInvalidationContainer|'s GraphicsLayer backing.
562 // Should use PaintInvalidationState::mapRectToPaintInvalidationBacking() 562 // Should use PaintInvalidationState::mapRectToPaintInvalidationBacking()
563 // instead if PaintInvalidationState is available. 563 // instead if PaintInvalidationState is available.
564 static void MapRectToPaintInvalidationBacking( 564 static void MapRectToPaintInvalidationBacking(
565 const LayoutObject&, 565 const LayoutObject&,
566 const LayoutBoxModelObject& paint_invalidation_container, 566 const LayoutBoxModelObject& paint_invalidation_container,
567 LayoutRect&); 567 LayoutRect&);
568 568
569 bool PaintsWithTransparency(GlobalPaintFlags global_paint_flags) const { 569 bool PaintsWithTransparency(GlobalPaintFlags) const;
570 return IsTransparent() &&
wkorman 2017/04/24 19:49:37 After this change nothing seems to use the kPaintL
571 ((global_paint_flags & kGlobalPaintFlattenCompositingLayers) ||
572 GetCompositingState() != kPaintsIntoOwnBacking);
573 }
574 570
575 // Returns the ScrollingCoordinator associated with this layer, if 571 // Returns the ScrollingCoordinator associated with this layer, if
576 // any. Otherwise nullptr. 572 // any. Otherwise nullptr.
577 ScrollingCoordinator* GetScrollingCoordinator(); 573 ScrollingCoordinator* GetScrollingCoordinator();
578 574
579 // Returns true if the element or any ancestor is transformed. 575 // Returns true if the element or any ancestor is transformed.
580 bool CompositesWithTransform() const; 576 bool CompositesWithTransform() const;
581 577
582 // Returns true if the element or any ancestor has non 1 opacity. 578 // Returns true if the element or any ancestor has non 1 opacity.
583 bool CompositesWithOpacity() const; 579 bool CompositesWithOpacity() const;
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
1016 void ClearSelfPaintingStatusChanged() { 1012 void ClearSelfPaintingStatusChanged() {
1017 DCHECK(!RuntimeEnabledFeatures::slimmingPaintV2Enabled()); 1013 DCHECK(!RuntimeEnabledFeatures::slimmingPaintV2Enabled());
1018 self_painting_status_changed_ = false; 1014 self_painting_status_changed_ = false;
1019 } 1015 }
1020 1016
1021 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS 1017 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS
1022 void EndShouldKeepAliveAllClientsRecursive(); 1018 void EndShouldKeepAliveAllClientsRecursive();
1023 #endif 1019 #endif
1024 1020
1025 private: 1021 private:
1022 bool IsComposited() const;
1023
1026 void SetNeedsCompositingInputsUpdateInternal(); 1024 void SetNeedsCompositingInputsUpdateInternal();
1027 1025
1028 void Update3DTransformedDescendantStatus(); 1026 void Update3DTransformedDescendantStatus();
1029 1027
1030 // Bounding box in the coordinates of this layer. 1028 // Bounding box in the coordinates of this layer.
1031 LayoutRect LogicalBoundingBox() const; 1029 LayoutRect LogicalBoundingBox() const;
1032 1030
1033 bool HasOverflowControls() const; 1031 bool HasOverflowControls() const;
1034 1032
1035 void DirtyAncestorChainHasSelfPaintingLayerDescendantStatus(); 1033 void DirtyAncestorChainHasSelfPaintingLayerDescendantStatus();
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
1277 1275
1278 } // namespace blink 1276 } // namespace blink
1279 1277
1280 #ifndef NDEBUG 1278 #ifndef NDEBUG
1281 // Outside the WebCore namespace for ease of invocation from gdb. 1279 // Outside the WebCore namespace for ease of invocation from gdb.
1282 CORE_EXPORT void showLayerTree(const blink::PaintLayer*); 1280 CORE_EXPORT void showLayerTree(const blink::PaintLayer*);
1283 CORE_EXPORT void showLayerTree(const blink::LayoutObject*); 1281 CORE_EXPORT void showLayerTree(const blink::LayoutObject*);
1284 #endif 1282 #endif
1285 1283
1286 #endif // Layer_h 1284 #endif // Layer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698