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

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

Issue 794323004: Emit dummy display item when recorded picture is empty (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add a missed "override" 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 TransformDisplayItem_h 5 #ifndef TransformDisplayItem_h
6 #define TransformDisplayItem_h 6 #define TransformDisplayItem_h
7 7
8 #include "platform/graphics/paint/DisplayItem.h" 8 #include "platform/graphics/paint/DisplayItem.h"
9 #include "platform/transforms/TransformationMatrix.h" 9 #include "platform/transforms/TransformationMatrix.h"
10 #include "wtf/PassOwnPtr.h" 10 #include "wtf/PassOwnPtr.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class TransformationMatrix; 14 class TransformationMatrix;
15 15
16 class PLATFORM_EXPORT BeginTransformDisplayItem : public DisplayItem { 16 class PLATFORM_EXPORT BeginTransformDisplayItem : public DisplayItem {
17 public: 17 public:
18 static PassOwnPtr<BeginTransformDisplayItem> create(DisplayItemClient client , const TransformationMatrix& matrix) { return adoptPtr(new BeginTransformDispla yItem(client, matrix)); } 18 static PassOwnPtr<BeginTransformDisplayItem> create(DisplayItemClient client , const TransformationMatrix& matrix) { return adoptPtr(new BeginTransformDispla yItem(client, matrix)); }
19 19
20 virtual void replay(GraphicsContext*) override; 20 virtual void replay(GraphicsContext*) override;
21 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override; 21 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override;
22 22
23 protected: 23 protected:
24 BeginTransformDisplayItem(DisplayItemClient, const TransformationMatrix&); 24 BeginTransformDisplayItem(DisplayItemClient, const TransformationMatrix&);
25 25
26 private: 26 private:
27 #ifndef NDEBUG
28 virtual const char* name() const override { return "BeginTransform"; }
29 #endif
30
27 const TransformationMatrix m_transform; 31 const TransformationMatrix m_transform;
28 }; 32 };
29 33
30 class PLATFORM_EXPORT EndTransformDisplayItem : public DisplayItem { 34 class PLATFORM_EXPORT EndTransformDisplayItem : public DisplayItem {
31 public: 35 public:
32 static PassOwnPtr<EndTransformDisplayItem> create(DisplayItemClient client) { return adoptPtr(new EndTransformDisplayItem(client)); } 36 static PassOwnPtr<EndTransformDisplayItem> create(DisplayItemClient client) { return adoptPtr(new EndTransformDisplayItem(client)); }
33 37
34 virtual void replay(GraphicsContext*) override; 38 virtual void replay(GraphicsContext*) override;
35 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override; 39 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override;
36 40
37 protected: 41 protected:
38 EndTransformDisplayItem(DisplayItemClient client) 42 EndTransformDisplayItem(DisplayItemClient client)
39 : DisplayItem(client, EndTransform) { } 43 : DisplayItem(client, EndTransform) { }
44
45 private:
46 #ifndef NDEBUG
47 virtual const char* name() const override { return "EndTransform"; }
48 #endif
40 }; 49 };
41 50
42 } // namespace blink 51 } // namespace blink
43 52
44 #endif // TransformDisplayItem_h 53 #endif // TransformDisplayItem_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698