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

Side by Side Diff: Source/core/paint/ClipRecorder.h

Issue 702633002: Move ViewDisplayList to GraphicsLayer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: copy & pasted test expectation from the wrong window. sorry. :( Created 6 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/paint/ClipRecorder.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ClipRecorder_h 5 #ifndef ClipRecorder_h
6 #define ClipRecorder_h 6 #define ClipRecorder_h
7 7
8 #include "core/paint/ViewDisplayList.h" 8 #include "platform/graphics/paint/DisplayItem.h"
9 #include "core/rendering/PaintPhase.h"
10 #include "platform/geometry/RoundedRect.h"
11 #include "wtf/Vector.h"
12 9
13 namespace blink { 10 namespace blink {
14 11
12 class ClipDisplayItem;
15 class ClipRect; 13 class ClipRect;
16 class GraphicsContext; 14 class GraphicsContext;
17 class RenderObject;
18 class RenderLayer; 15 class RenderLayer;
19 16 class RoundedRect;
20 class ClipDisplayItem : public DisplayItem {
21 public:
22 ClipDisplayItem(RenderObject* renderer, RenderLayer*, Type type, IntRect cli pRect)
23 : DisplayItem(renderer, type), m_clipRect(clipRect) { }
24
25 Vector<RoundedRect>& roundedRectClips() { return m_roundedRectClips; }
26
27 private:
28 virtual void replay(GraphicsContext*) override;
29
30 IntRect m_clipRect;
31 Vector<RoundedRect> m_roundedRectClips;
32 #ifndef NDEBUG
33 virtual WTF::String asDebugString() const override;
34 #endif
35 };
36
37 class EndClipDisplayItem : public DisplayItem {
38 public:
39 EndClipDisplayItem() : DisplayItem(0, EndClip) { }
40
41 private:
42 virtual void replay(GraphicsContext*) override;
43 };
44 17
45 class ClipRecorder { 18 class ClipRecorder {
46 public: 19 public:
47 explicit ClipRecorder(RenderLayer*, GraphicsContext*, DisplayItem::Type, con st ClipRect&); 20 explicit ClipRecorder(RenderLayer*, GraphicsContext*, DisplayItem::Type, con st ClipRect&);
48 void addRoundedRectClip(const RoundedRect&); 21 void addRoundedRectClip(const RoundedRect&);
49 22
50 ~ClipRecorder(); 23 ~ClipRecorder();
51 24
52 private: 25 private:
53 ClipDisplayItem* m_clipDisplayItem; 26 ClipDisplayItem* m_clipDisplayItem;
54 GraphicsContext* m_graphicsContext; 27 GraphicsContext* m_graphicsContext;
55 RenderLayer* m_renderLayer; 28 RenderLayer* m_renderLayer;
56 }; 29 };
57 30
58 } // namespace blink 31 } // namespace blink
59 32
60 #endif // ViewDisplayList_h 33 #endif // ClipRecorder_h
OLDNEW
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/paint/ClipRecorder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698