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

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

Issue 1651153003: [SPv2] Adds pre-computed paint property context to PaintLayer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 #include "core/layout/LayoutBox.h" 50 #include "core/layout/LayoutBox.h"
51 #include "core/paint/PaintLayerClipper.h" 51 #include "core/paint/PaintLayerClipper.h"
52 #include "core/paint/PaintLayerFilterInfo.h" 52 #include "core/paint/PaintLayerFilterInfo.h"
53 #include "core/paint/PaintLayerFragment.h" 53 #include "core/paint/PaintLayerFragment.h"
54 #include "core/paint/PaintLayerPainter.h" 54 #include "core/paint/PaintLayerPainter.h"
55 #include "core/paint/PaintLayerReflectionInfo.h" 55 #include "core/paint/PaintLayerReflectionInfo.h"
56 #include "core/paint/PaintLayerScrollableArea.h" 56 #include "core/paint/PaintLayerScrollableArea.h"
57 #include "core/paint/PaintLayerStackingNode.h" 57 #include "core/paint/PaintLayerStackingNode.h"
58 #include "core/paint/PaintLayerStackingNodeIterator.h" 58 #include "core/paint/PaintLayerStackingNodeIterator.h"
59 #include "platform/graphics/CompositingReasons.h" 59 #include "platform/graphics/CompositingReasons.h"
60 #include "platform/graphics/paint/PaintChunkProperties.h"
60 #include "public/platform/WebBlendMode.h" 61 #include "public/platform/WebBlendMode.h"
61 #include "wtf/Allocator.h" 62 #include "wtf/Allocator.h"
62 #include "wtf/OwnPtr.h" 63 #include "wtf/OwnPtr.h"
63 64
64 namespace blink { 65 namespace blink {
65 66
66 class CompositedLayerMapping; 67 class CompositedLayerMapping;
67 class ComputedStyle; 68 class ComputedStyle;
68 class FilterEffectBuilder; 69 class FilterEffectBuilder;
69 class FilterOperations; 70 class FilterOperations;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 124
124 // If the layer paints into grouped backing (i.e. squashed), this points to the 125 // If the layer paints into grouped backing (i.e. squashed), this points to the
125 // grouped CompositedLayerMapping. It's null if the layer is not composited or 126 // grouped CompositedLayerMapping. It's null if the layer is not composited or
126 // paints into its own backing. 127 // paints into its own backing.
127 CompositedLayerMapping* groupedMapping; 128 CompositedLayerMapping* groupedMapping;
128 129
129 OwnPtr<PaintLayerReflectionInfo> reflectionInfo; 130 OwnPtr<PaintLayerReflectionInfo> reflectionInfo;
130 131
131 // The accumulated subpixel offset of a composited layer's composited bounds compared to absolute coordinates. 132 // The accumulated subpixel offset of a composited layer's composited bounds compared to absolute coordinates.
132 LayoutSize subpixelAccumulation; 133 LayoutSize subpixelAccumulation;
134
135 struct CachedSPv2PaintParameters {
136 LayoutPoint paintOffset;
137 PaintChunkProperties properties;
138 } cachedSPv2PaintParameters;
pdr. 2016/02/02 06:18:20 Is this data actually rare or is it just on rareda
trchen 2016/02/02 21:48:53 It will be no longer rare once SPv2 ships. :)
133 }; 139 };
134 140
135 // PaintLayer is an old object that handles lots of unrelated operations. 141 // PaintLayer is an old object that handles lots of unrelated operations.
136 // 142 //
137 // We want it to die at some point and be replaced by more focused objects, 143 // We want it to die at some point and be replaced by more focused objects,
138 // which would remove (or at least compartimentalize) a lot of complexity. 144 // which would remove (or at least compartimentalize) a lot of complexity.
139 // See the STATUS OF PAINTLAYER section below. 145 // See the STATUS OF PAINTLAYER section below.
140 // 146 //
141 // The class is central to painting and hit-testing. That's because it handles 147 // The class is central to painting and hit-testing. That's because it handles
142 // a lot of tasks (we included ones done by associated satellite objects for 148 // a lot of tasks (we included ones done by associated satellite objects for
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
672 678
673 ClipRectsCache* clipRectsCache() const { return m_clipRectsCache.get(); } 679 ClipRectsCache* clipRectsCache() const { return m_clipRectsCache.get(); }
674 ClipRectsCache& ensureClipRectsCache() const 680 ClipRectsCache& ensureClipRectsCache() const
675 { 681 {
676 if (!m_clipRectsCache) 682 if (!m_clipRectsCache)
677 m_clipRectsCache = adoptPtr(new ClipRectsCache); 683 m_clipRectsCache = adoptPtr(new ClipRectsCache);
678 return *m_clipRectsCache; 684 return *m_clipRectsCache;
679 } 685 }
680 void clearClipRectsCache() const { m_clipRectsCache.clear(); } 686 void clearClipRectsCache() const { m_clipRectsCache.clear(); }
681 687
688 const PaintLayerRareData::CachedSPv2PaintParameters& cachedSPv2PaintParamete rs() const { ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled()); ASSERT(m_ rareData); return m_rareData->cachedSPv2PaintParameters; }
pdr. 2016/02/02 06:18:20 WDYT about some lifecycle asserts here? For the a
trchen 2016/02/02 21:48:53 Acknowledged. Hey, fantastic idea!
689 PaintLayerRareData::CachedSPv2PaintParameters& accessCachedSPv2PaintParamete rs() { ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled()); return ensureRa reData().cachedSPv2PaintParameters; }
690
682 private: 691 private:
683 // Bounding box in the coordinates of this layer. 692 // Bounding box in the coordinates of this layer.
684 LayoutRect logicalBoundingBox() const; 693 LayoutRect logicalBoundingBox() const;
685 694
686 bool hasOverflowControls() const; 695 bool hasOverflowControls() const;
687 696
688 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus(); 697 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus();
689 698
690 // Returns true if the position changed. 699 // Returns true if the position changed.
691 bool updateLayerPosition(); 700 bool updateLayerPosition();
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 871
863 } // namespace blink 872 } // namespace blink
864 873
865 #ifndef NDEBUG 874 #ifndef NDEBUG
866 // Outside the WebCore namespace for ease of invocation from gdb. 875 // Outside the WebCore namespace for ease of invocation from gdb.
867 void showLayerTree(const blink::PaintLayer*); 876 void showLayerTree(const blink::PaintLayer*);
868 void showLayerTree(const blink::LayoutObject*); 877 void showLayerTree(const blink::LayoutObject*);
869 #endif 878 #endif
870 879
871 #endif // Layer_h 880 #endif // Layer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698