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

Unified Diff: cc/playback/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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/playback/compositing_display_item.cc ('k') | cc/playback/display_item.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/playback/display_item.h
diff --git a/cc/playback/display_item.h b/cc/playback/display_item.h
index 08d3d0116347027ca8158e250615cd94f5c2db6f..4e74e9079e76e9f9da7c3400aba25af25a49ff99 100644
--- a/cc/playback/display_item.h
+++ b/cc/playback/display_item.h
@@ -24,6 +24,22 @@ class DisplayItem;
class CC_EXPORT DisplayItem {
public:
+ enum Type {
+ CLIP,
+ END_CLIP,
+ CLIP_PATH,
+ END_CLIP_PATH,
+ COMPOSITING,
+ END_COMPOSITING,
+ DRAWING,
+ FILTER,
+ END_FILTER,
+ FLOAT_CLIP,
+ END_FLOAT_CLIP,
+ TRANSFORM,
+ END_TRANSFORM,
+ };
+
virtual ~DisplayItem() {}
virtual void ToProtobuf(proto::DisplayItem* proto) const = 0;
@@ -32,11 +48,13 @@ class CC_EXPORT DisplayItem {
SkPicture::AbortCallback* callback) const = 0;
virtual void AsValueInto(const gfx::Rect& visual_rect,
base::trace_event::TracedValue* array) const = 0;
- // For tracing.
- virtual size_t ExternalMemoryUsage() const = 0;
+
+ Type type() const { return type_; }
protected:
- DisplayItem();
+ explicit DisplayItem(Type type) : type_(type) {}
+
+ const Type type_;
};
} // namespace cc
« no previous file with comments | « cc/playback/compositing_display_item.cc ('k') | cc/playback/display_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698