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

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

Issue 794323004: Emit dummy display item when recorded picture is empty (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years 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
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 ClipDisplayItem_h 5 #ifndef ClipDisplayItem_h
6 #define ClipDisplayItem_h 6 #define ClipDisplayItem_h
7 7
8 #include "platform/PlatformExport.h" 8 #include "platform/PlatformExport.h"
9 #include "platform/geometry/IntRect.h" 9 #include "platform/geometry/IntRect.h"
10 #include "platform/graphics/paint/DisplayItem.h" 10 #include "platform/graphics/paint/DisplayItem.h"
(...skipping 12 matching lines...) Expand all
23 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override; 23 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override;
24 24
25 Vector<RoundedRect>& roundedRectClips() { return m_roundedRectClips; } 25 Vector<RoundedRect>& roundedRectClips() { return m_roundedRectClips; }
26 26
27 protected: 27 protected:
28 ClipDisplayItem(DisplayItemClient client, Type type, const IntRect& clipRect ) 28 ClipDisplayItem(DisplayItemClient client, Type type, const IntRect& clipRect )
29 : DisplayItem(client, type), m_clipRect(clipRect) { } 29 : DisplayItem(client, type), m_clipRect(clipRect) { }
30 30
31 private: 31 private:
32 #ifndef NDEBUG 32 #ifndef NDEBUG
33 virtual const char* name() const override { return "Clip"; }
33 virtual void dumpPropertiesAsDebugString(WTF::StringBuilder&) const override ; 34 virtual void dumpPropertiesAsDebugString(WTF::StringBuilder&) const override ;
34 #endif 35 #endif
35 IntRect m_clipRect; 36 IntRect m_clipRect;
36 Vector<RoundedRect> m_roundedRectClips; 37 Vector<RoundedRect> m_roundedRectClips;
37 }; 38 };
38 39
39 class PLATFORM_EXPORT EndClipDisplayItem : public DisplayItem { 40 class PLATFORM_EXPORT EndClipDisplayItem : public DisplayItem {
40 public: 41 public:
41 static PassOwnPtr<EndClipDisplayItem> create(DisplayItemClient client) { ret urn adoptPtr(new EndClipDisplayItem(client)); } 42 static PassOwnPtr<EndClipDisplayItem> create(DisplayItemClient client) { ret urn adoptPtr(new EndClipDisplayItem(client)); }
42 43
43 virtual void replay(GraphicsContext*) override; 44 virtual void replay(GraphicsContext*) override;
44 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override; 45 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override;
45 46
46 protected: 47 protected:
47 EndClipDisplayItem(DisplayItemClient client) : DisplayItem(client, EndClip) { } 48 EndClipDisplayItem(DisplayItemClient client) : DisplayItem(client, EndClip) { }
49
50 private:
51 #ifndef NDEBUG
52 virtual const char* name() const override { return "EndClip"; }
53 #endif
48 }; 54 };
49 55
50 } // namespace blink 56 } // namespace blink
51 57
52 #endif // ClipDisplayItem_h 58 #endif // ClipDisplayItem_h
OLDNEW
« no previous file with comments | « Source/platform/graphics/paint/CachedDisplayItem.h ('k') | Source/platform/graphics/paint/DisplayItem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698