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

Side by Side Diff: Source/platform/graphics/paint/DrawingDisplayItem.h

Issue 947893002: Implement SVG masking with slimming paint (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add a mask debug print string Created 5 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
« no previous file with comments | « Source/platform/graphics/paint/DisplayItem.cpp ('k') | public/platform/WebDisplayItemList.h » ('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 DrawingDisplayItem_h 5 #ifndef DrawingDisplayItem_h
6 #define DrawingDisplayItem_h 6 #define DrawingDisplayItem_h
7 7
8 #include "platform/PlatformExport.h" 8 #include "platform/PlatformExport.h"
9 #include "platform/geometry/FloatPoint.h" 9 #include "platform/geometry/FloatPoint.h"
10 #include "platform/graphics/paint/DisplayItem.h" 10 #include "platform/graphics/paint/DisplayItem.h"
11 #include "third_party/skia/include/core/SkPicture.h" 11 #include "third_party/skia/include/core/SkPicture.h"
12 #include "wtf/PassOwnPtr.h" 12 #include "wtf/PassOwnPtr.h"
13 13
14 namespace blink { 14 namespace blink {
15 15
16 class PLATFORM_EXPORT DrawingDisplayItem : public DisplayItem { 16 class PLATFORM_EXPORT DrawingDisplayItem : public DisplayItem {
17 public: 17 public:
18 static PassOwnPtr<DrawingDisplayItem> create(DisplayItemClient client, Type type, PassRefPtr<const SkPicture> picture) 18 static PassOwnPtr<DrawingDisplayItem> create(DisplayItemClient client, Type type, PassRefPtr<const SkPicture> picture)
19 { 19 {
20 return adoptPtr(new DrawingDisplayItem(client, type, picture)); 20 return adoptPtr(new DrawingDisplayItem(client, type, picture));
21 } 21 }
22 22
23 virtual void replay(GraphicsContext*); 23 virtual void replay(GraphicsContext*);
24 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override; 24 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override;
25 virtual bool drawsContent() const override; 25 virtual bool drawsContent() const override;
26 26
27 PassRefPtr<const SkPicture> picture() const { return m_picture; } 27 PassRefPtr<const SkPicture> picture() const { return m_picture; }
28 28
29 protected:
30 DrawingDisplayItem(DisplayItemClient client, Type type, PassRefPtr<const SkP icture> picture) 29 DrawingDisplayItem(DisplayItemClient client, Type type, PassRefPtr<const SkP icture> picture)
31 : DisplayItem(client, type), m_picture(picture) 30 : DisplayItem(client, type), m_picture(picture)
32 { 31 {
33 ASSERT(m_picture); 32 ASSERT(m_picture);
34 ASSERT(isDrawingType(type)); 33 ASSERT(isDrawingType(type));
35 } 34 }
36 35
37 private: 36 private:
38 #ifndef NDEBUG 37 #ifndef NDEBUG
39 virtual void dumpPropertiesAsDebugString(WTF::StringBuilder&) const override ; 38 virtual void dumpPropertiesAsDebugString(WTF::StringBuilder&) const override ;
40 #endif 39 #endif
41 40
42 RefPtr<const SkPicture> m_picture; 41 RefPtr<const SkPicture> m_picture;
43 }; 42 };
44 43
45 } // namespace blink 44 } // namespace blink
46 45
47 #endif // DrawingDisplayItem_h 46 #endif // DrawingDisplayItem_h
OLDNEW
« no previous file with comments | « Source/platform/graphics/paint/DisplayItem.cpp ('k') | public/platform/WebDisplayItemList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698