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

Side by Side Diff: cc/playback/transform_display_item.h

Issue 2747273002: cc: Remove AsValue virtual from DisplayItem. (Closed)
Patch Set: Created 3 years, 9 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 | « cc/playback/raster_source.cc ('k') | cc/playback/transform_display_item.cc » ('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 CC_PLAYBACK_TRANSFORM_DISPLAY_ITEM_H_ 5 #ifndef CC_PLAYBACK_TRANSFORM_DISPLAY_ITEM_H_
6 #define CC_PLAYBACK_TRANSFORM_DISPLAY_ITEM_H_ 6 #define CC_PLAYBACK_TRANSFORM_DISPLAY_ITEM_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
11 11
12 #include "base/memory/ptr_util.h" 12 #include "base/memory/ptr_util.h"
13 #include "cc/base/cc_export.h" 13 #include "cc/base/cc_export.h"
14 #include "cc/playback/display_item.h" 14 #include "cc/playback/display_item.h"
15 #include "ui/gfx/transform.h" 15 #include "ui/gfx/transform.h"
16 16
17 class SkCanvas; 17 class SkCanvas;
18 18
19 namespace cc { 19 namespace cc {
20 20
21 class CC_EXPORT TransformDisplayItem : public DisplayItem { 21 class CC_EXPORT TransformDisplayItem : public DisplayItem {
22 public: 22 public:
23 explicit TransformDisplayItem(const gfx::Transform& transform); 23 explicit TransformDisplayItem(const gfx::Transform& transform);
24 ~TransformDisplayItem() override; 24 ~TransformDisplayItem() override;
25 25
26 void Raster(SkCanvas* canvas, 26 void Raster(SkCanvas* canvas,
27 SkPicture::AbortCallback* callback) const override; 27 SkPicture::AbortCallback* callback) const override;
28 void AsValueInto(const gfx::Rect& visual_rect,
29 base::trace_event::TracedValue* array) const override;
30 28
31 size_t ExternalMemoryUsage() const { return 0; } 29 size_t ExternalMemoryUsage() const { return 0; }
32 int ApproximateOpCount() const { return 1; } 30 int ApproximateOpCount() const { return 1; }
33 31
32 const gfx::Transform& transform() const { return transform_; }
33
34 private: 34 private:
35 void SetNew(const gfx::Transform& transform); 35 void SetNew(const gfx::Transform& transform);
36 36
37 gfx::Transform transform_; 37 gfx::Transform transform_;
38 }; 38 };
39 39
40 class CC_EXPORT EndTransformDisplayItem : public DisplayItem { 40 class CC_EXPORT EndTransformDisplayItem : public DisplayItem {
41 public: 41 public:
42 EndTransformDisplayItem(); 42 EndTransformDisplayItem();
43 ~EndTransformDisplayItem() override; 43 ~EndTransformDisplayItem() override;
44 44
45 static std::unique_ptr<EndTransformDisplayItem> Create() { 45 static std::unique_ptr<EndTransformDisplayItem> Create() {
46 return base::MakeUnique<EndTransformDisplayItem>(); 46 return base::MakeUnique<EndTransformDisplayItem>();
47 } 47 }
48 48
49 void Raster(SkCanvas* canvas, 49 void Raster(SkCanvas* canvas,
50 SkPicture::AbortCallback* callback) const override; 50 SkPicture::AbortCallback* callback) const override;
51 void AsValueInto(const gfx::Rect& visual_rect,
52 base::trace_event::TracedValue* array) const override;
53 51
54 int ApproximateOpCount() const { return 0; } 52 int ApproximateOpCount() const { return 0; }
55 }; 53 };
56 54
57 } // namespace cc 55 } // namespace cc
58 56
59 #endif // CC_PLAYBACK_TRANSFORM_DISPLAY_ITEM_H_ 57 #endif // CC_PLAYBACK_TRANSFORM_DISPLAY_ITEM_H_
OLDNEW
« no previous file with comments | « cc/playback/raster_source.cc ('k') | cc/playback/transform_display_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698