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

Unified Diff: cc/playback/clip_path_display_item.cc

Issue 1226503006: cc: More consistent reasoning about display list memory usage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: capacity unit test Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: cc/playback/clip_path_display_item.cc
diff --git a/cc/playback/clip_path_display_item.cc b/cc/playback/clip_path_display_item.cc
index 417b575701c8df892d1d3ce50bc92cbc7fb446cc..f7fd60626e5447738841624b8aa9a2c77a6a780b 100644
--- a/cc/playback/clip_path_display_item.cc
+++ b/cc/playback/clip_path_display_item.cc
@@ -23,9 +23,10 @@ void ClipPathDisplayItem::SetNew(const SkPath& clip_path,
clip_op_ = clip_op;
antialias_ = antialias;
- size_t memory_usage = sizeof(SkPath) + sizeof(SkRegion::Op) + sizeof(bool);
+ // The size of SkPath's external storage is not currently accounted for (and
+ // may well be shared anyway).
DisplayItem::SetNew(true /* suitable_for_gpu_raster */, 1 /* op_count */,
- memory_usage);
+ 0 /* external_memory_usage */);
}
void ClipPathDisplayItem::Raster(SkCanvas* canvas,
@@ -43,7 +44,7 @@ void ClipPathDisplayItem::AsValueInto(
EndClipPathDisplayItem::EndClipPathDisplayItem() {
DisplayItem::SetNew(true /* suitable_for_gpu_raster */, 0 /* op_count */,
- 0 /* memory_usage */);
+ 0 /* external_memory_usage */);
}
EndClipPathDisplayItem::~EndClipPathDisplayItem() {

Powered by Google App Engine
This is Rietveld 408576698