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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/paint/CompositingDisplayItem.h

Issue 2299223002: Compile under-invalidation checking in all builds (Closed)
Patch Set: Resolve conflict Created 4 years, 3 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CompositingDisplayItem_h 5 #ifndef CompositingDisplayItem_h
6 #define CompositingDisplayItem_h 6 #define CompositingDisplayItem_h
7 7
8 #include "platform/geometry/FloatRect.h" 8 #include "platform/geometry/FloatRect.h"
9 #include "platform/graphics/GraphicsTypes.h" 9 #include "platform/graphics/GraphicsTypes.h"
10 #include "platform/graphics/paint/DisplayItem.h" 10 #include "platform/graphics/paint/DisplayItem.h"
(...skipping 17 matching lines...) Expand all
28 m_bounds = FloatRect(*bounds); 28 m_bounds = FloatRect(*bounds);
29 } 29 }
30 30
31 void replay(GraphicsContext&) const override; 31 void replay(GraphicsContext&) const override;
32 void appendToWebDisplayItemList(const IntRect&, WebDisplayItemList*) const o verride; 32 void appendToWebDisplayItemList(const IntRect&, WebDisplayItemList*) const o verride;
33 33
34 private: 34 private:
35 #ifndef NDEBUG 35 #ifndef NDEBUG
36 void dumpPropertiesAsDebugString(WTF::StringBuilder&) const override; 36 void dumpPropertiesAsDebugString(WTF::StringBuilder&) const override;
37 #endif 37 #endif
38 #if ENABLE(ASSERT)
39 bool equals(const DisplayItem& other) const final 38 bool equals(const DisplayItem& other) const final
40 { 39 {
41 return DisplayItem::equals(other) 40 return DisplayItem::equals(other)
42 && m_xferMode == static_cast<const BeginCompositingDisplayItem&>(oth er).m_xferMode 41 && m_xferMode == static_cast<const BeginCompositingDisplayItem&>(oth er).m_xferMode
43 && m_opacity == static_cast<const BeginCompositingDisplayItem&>(othe r).m_opacity 42 && m_opacity == static_cast<const BeginCompositingDisplayItem&>(othe r).m_opacity
44 && m_hasBounds == static_cast<const BeginCompositingDisplayItem&>(ot her).m_hasBounds 43 && m_hasBounds == static_cast<const BeginCompositingDisplayItem&>(ot her).m_hasBounds
45 && m_bounds == static_cast<const BeginCompositingDisplayItem&>(other ).m_bounds 44 && m_bounds == static_cast<const BeginCompositingDisplayItem&>(other ).m_bounds
46 && m_colorFilter == static_cast<const BeginCompositingDisplayItem&>( other).m_colorFilter; 45 && m_colorFilter == static_cast<const BeginCompositingDisplayItem&>( other).m_colorFilter;
47 } 46 }
48 #endif
49 47
50 const SkXfermode::Mode m_xferMode; 48 const SkXfermode::Mode m_xferMode;
51 const float m_opacity; 49 const float m_opacity;
52 bool m_hasBounds; 50 bool m_hasBounds;
53 FloatRect m_bounds; 51 FloatRect m_bounds;
54 ColorFilter m_colorFilter; 52 ColorFilter m_colorFilter;
55 }; 53 };
56 54
57 class PLATFORM_EXPORT EndCompositingDisplayItem final : public PairedEndDisplayI tem { 55 class PLATFORM_EXPORT EndCompositingDisplayItem final : public PairedEndDisplayI tem {
58 public: 56 public:
59 EndCompositingDisplayItem(const DisplayItemClient& client) 57 EndCompositingDisplayItem(const DisplayItemClient& client)
60 : PairedEndDisplayItem(client, kEndCompositing, sizeof(*this)) { } 58 : PairedEndDisplayItem(client, kEndCompositing, sizeof(*this)) { }
61 59
62 void replay(GraphicsContext&) const override; 60 void replay(GraphicsContext&) const override;
63 void appendToWebDisplayItemList(const IntRect&, WebDisplayItemList*) const o verride; 61 void appendToWebDisplayItemList(const IntRect&, WebDisplayItemList*) const o verride;
64 62
65 private: 63 private:
66 #if ENABLE(ASSERT) 64 #if ENABLE(ASSERT)
67 bool isEndAndPairedWith(DisplayItem::Type otherType) const final { return ot herType == kBeginCompositing; } 65 bool isEndAndPairedWith(DisplayItem::Type otherType) const final { return ot herType == kBeginCompositing; }
68 #endif 66 #endif
69 }; 67 };
70 68
71 } // namespace blink 69 } // namespace blink
72 70
73 #endif // CompositingDisplayItem_h 71 #endif // CompositingDisplayItem_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698