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

Unified Diff: cc/playback/transform_display_item.cc

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/transform_display_item.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/playback/transform_display_item.cc
diff --git a/cc/playback/transform_display_item.cc b/cc/playback/transform_display_item.cc
index ef281362674939de39e864c6283fb019a7240146..a495d9a82f4dbcf6dc28d816a9e2316895e3cbda 100644
--- a/cc/playback/transform_display_item.cc
+++ b/cc/playback/transform_display_item.cc
@@ -15,11 +15,12 @@
namespace cc {
TransformDisplayItem::TransformDisplayItem(const gfx::Transform& transform)
- : transform_(gfx::Transform::kSkipInitialization) {
+ : DisplayItem(TRANSFORM), transform_(gfx::Transform::kSkipInitialization) {
SetNew(transform);
}
-TransformDisplayItem::TransformDisplayItem(const proto::DisplayItem& proto) {
+TransformDisplayItem::TransformDisplayItem(const proto::DisplayItem& proto)
+ : DisplayItem(TRANSFORM) {
DCHECK_EQ(proto::DisplayItem::Type_Transform, proto.type());
const proto::TransformDisplayItem& details = proto.transform_item();
@@ -57,14 +58,12 @@ void TransformDisplayItem::AsValueInto(
transform_.ToString().c_str(), visual_rect.ToString().c_str()));
}
-size_t TransformDisplayItem::ExternalMemoryUsage() const {
- return 0;
-}
-
-EndTransformDisplayItem::EndTransformDisplayItem() {}
+EndTransformDisplayItem::EndTransformDisplayItem()
+ : DisplayItem(END_TRANSFORM) {}
EndTransformDisplayItem::EndTransformDisplayItem(
- const proto::DisplayItem& proto) {
+ const proto::DisplayItem& proto)
+ : DisplayItem(END_TRANSFORM) {
DCHECK_EQ(proto::DisplayItem::Type_EndTransform, proto.type());
}
@@ -89,8 +88,4 @@ void EndTransformDisplayItem::AsValueInto(
visual_rect.ToString().c_str()));
}
-size_t EndTransformDisplayItem::ExternalMemoryUsage() const {
- return 0;
-}
-
} // namespace cc
« no previous file with comments | « cc/playback/transform_display_item.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698