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

Unified Diff: cc/playback/clip_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 | « no previous file | cc/playback/clip_display_item.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/playback/clip_display_item.h
diff --git a/cc/playback/clip_display_item.h b/cc/playback/clip_display_item.h
index 72fa6bc7ee60e84642724d3c4ca069c24176418a..cd5c3b65f3133ee004ab3dfa3ed69676d1ff07e6 100644
--- a/cc/playback/clip_display_item.h
+++ b/cc/playback/clip_display_item.h
@@ -32,8 +32,10 @@ class CC_EXPORT ClipDisplayItem : public DisplayItem {
SkPicture::AbortCallback* callback) const override;
void AsValueInto(const gfx::Rect& visual_rect,
base::trace_event::TracedValue* array) const override;
- size_t ExternalMemoryUsage() const override;
+ size_t ExternalMemoryUsage() const {
+ return rounded_clip_rects_.capacity() * sizeof(rounded_clip_rects_[0]);
+ }
int ApproximateOpCount() const { return 1; }
private:
@@ -57,7 +59,6 @@ class CC_EXPORT EndClipDisplayItem : public DisplayItem {
SkPicture::AbortCallback* callback) const override;
void AsValueInto(const gfx::Rect& visual_rect,
base::trace_event::TracedValue* array) const override;
- size_t ExternalMemoryUsage() const override;
int ApproximateOpCount() const { return 0; }
};
« no previous file with comments | « no previous file | cc/playback/clip_display_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698