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

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

Issue 1394313002: Make DisplayItem::replay const. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 11 matching lines...) Expand all
22 : PairedBeginDisplayItem(client, BeginCompositing, sizeof(*this)) 22 : PairedBeginDisplayItem(client, BeginCompositing, sizeof(*this))
23 , m_xferMode(xferMode) 23 , m_xferMode(xferMode)
24 , m_opacity(opacity) 24 , m_opacity(opacity)
25 , m_hasBounds(bounds) 25 , m_hasBounds(bounds)
26 , m_colorFilter(colorFilter) 26 , m_colorFilter(colorFilter)
27 { 27 {
28 if (bounds) 28 if (bounds)
29 m_bounds = FloatRect(*bounds); 29 m_bounds = FloatRect(*bounds);
30 } 30 }
31 31
32 void replay(GraphicsContext&) override; 32 void replay(GraphicsContext&) const override;
33 void appendToWebDisplayItemList(WebDisplayItemList*) const override; 33 void appendToWebDisplayItemList(WebDisplayItemList*) const override;
34 34
35 private: 35 private:
36 #ifndef NDEBUG 36 #ifndef NDEBUG
37 void dumpPropertiesAsDebugString(WTF::StringBuilder&) const override; 37 void dumpPropertiesAsDebugString(WTF::StringBuilder&) const override;
38 #endif 38 #endif
39 #if ENABLE(ASSERT) 39 #if ENABLE(ASSERT)
40 bool equals(const DisplayItem& other) const final 40 bool equals(const DisplayItem& other) const final
41 { 41 {
42 return DisplayItem::equals(other) 42 return DisplayItem::equals(other)
(...skipping 10 matching lines...) Expand all
53 bool m_hasBounds; 53 bool m_hasBounds;
54 FloatRect m_bounds; 54 FloatRect m_bounds;
55 ColorFilter m_colorFilter; 55 ColorFilter m_colorFilter;
56 }; 56 };
57 57
58 class PLATFORM_EXPORT EndCompositingDisplayItem final : public PairedEndDisplayI tem { 58 class PLATFORM_EXPORT EndCompositingDisplayItem final : public PairedEndDisplayI tem {
59 public: 59 public:
60 EndCompositingDisplayItem(const DisplayItemClientWrapper& client) 60 EndCompositingDisplayItem(const DisplayItemClientWrapper& client)
61 : PairedEndDisplayItem(client, EndCompositing, sizeof(*this)) { } 61 : PairedEndDisplayItem(client, EndCompositing, sizeof(*this)) { }
62 62
63 void replay(GraphicsContext&) override; 63 void replay(GraphicsContext&) const override;
64 void appendToWebDisplayItemList(WebDisplayItemList*) const override; 64 void appendToWebDisplayItemList(WebDisplayItemList*) const override;
65 65
66 private: 66 private:
67 #if ENABLE(ASSERT) 67 #if ENABLE(ASSERT)
68 bool isEndAndPairedWith(DisplayItem::Type otherType) const final { return ot herType == BeginCompositing; } 68 bool isEndAndPairedWith(DisplayItem::Type otherType) const final { return ot herType == BeginCompositing; }
69 #endif 69 #endif
70 }; 70 };
71 71
72 } // namespace blink 72 } // namespace blink
73 73
74 #endif // CompositingDisplayItem_h 74 #endif // CompositingDisplayItem_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698