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

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

Issue 2561523002: cc: Devirtualize DisplayItem::ExternalMemoryUsage(). (Closed)
Patch Set: externalmem: . Created 4 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
« no previous file with comments | « cc/playback/float_clip_display_item.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>
(...skipping 11 matching lines...) Expand all
22 public: 22 public:
23 explicit TransformDisplayItem(const gfx::Transform& transform); 23 explicit TransformDisplayItem(const gfx::Transform& transform);
24 explicit TransformDisplayItem(const proto::DisplayItem& proto); 24 explicit TransformDisplayItem(const proto::DisplayItem& proto);
25 ~TransformDisplayItem() override; 25 ~TransformDisplayItem() override;
26 26
27 void ToProtobuf(proto::DisplayItem* proto) const override; 27 void ToProtobuf(proto::DisplayItem* proto) const override;
28 void Raster(SkCanvas* canvas, 28 void Raster(SkCanvas* canvas,
29 SkPicture::AbortCallback* callback) const override; 29 SkPicture::AbortCallback* callback) const override;
30 void AsValueInto(const gfx::Rect& visual_rect, 30 void AsValueInto(const gfx::Rect& visual_rect,
31 base::trace_event::TracedValue* array) const override; 31 base::trace_event::TracedValue* array) const override;
32 size_t ExternalMemoryUsage() const override;
33 32
33 size_t ExternalMemoryUsage() const { return 0; }
34 int ApproximateOpCount() const { return 1; } 34 int ApproximateOpCount() const { return 1; }
35 35
36 private: 36 private:
37 void SetNew(const gfx::Transform& transform); 37 void SetNew(const gfx::Transform& transform);
38 38
39 gfx::Transform transform_; 39 gfx::Transform transform_;
40 }; 40 };
41 41
42 class CC_EXPORT EndTransformDisplayItem : public DisplayItem { 42 class CC_EXPORT EndTransformDisplayItem : public DisplayItem {
43 public: 43 public:
44 EndTransformDisplayItem(); 44 EndTransformDisplayItem();
45 explicit EndTransformDisplayItem(const proto::DisplayItem& proto); 45 explicit EndTransformDisplayItem(const proto::DisplayItem& proto);
46 ~EndTransformDisplayItem() override; 46 ~EndTransformDisplayItem() override;
47 47
48 static std::unique_ptr<EndTransformDisplayItem> Create() { 48 static std::unique_ptr<EndTransformDisplayItem> Create() {
49 return base::MakeUnique<EndTransformDisplayItem>(); 49 return base::MakeUnique<EndTransformDisplayItem>();
50 } 50 }
51 51
52 void ToProtobuf(proto::DisplayItem* proto) const override; 52 void ToProtobuf(proto::DisplayItem* proto) const override;
53 void Raster(SkCanvas* canvas, 53 void Raster(SkCanvas* canvas,
54 SkPicture::AbortCallback* callback) const override; 54 SkPicture::AbortCallback* callback) const override;
55 void AsValueInto(const gfx::Rect& visual_rect, 55 void AsValueInto(const gfx::Rect& visual_rect,
56 base::trace_event::TracedValue* array) const override; 56 base::trace_event::TracedValue* array) const override;
57 size_t ExternalMemoryUsage() const override;
58 57
59 int ApproximateOpCount() const { return 0; } 58 int ApproximateOpCount() const { return 0; }
60 }; 59 };
61 60
62 } // namespace cc 61 } // namespace cc
63 62
64 #endif // CC_PLAYBACK_TRANSFORM_DISPLAY_ITEM_H_ 63 #endif // CC_PLAYBACK_TRANSFORM_DISPLAY_ITEM_H_
OLDNEW
« no previous file with comments | « cc/playback/float_clip_display_item.cc ('k') | cc/playback/transform_display_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698