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

Unified Diff: cc/resources/clip_display_item.h

Issue 1123983002: cc: Use a ListContainer for DisplayItemList to reduce allocations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: displaylistcontainer: fixdcheck Created 5 years, 7 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
« no previous file with comments | « cc/quads/list_container.cc ('k') | cc/resources/clip_display_item.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/clip_display_item.h
diff --git a/cc/resources/clip_display_item.h b/cc/resources/clip_display_item.h
index e5e72bffbfb9ca76ba144b6f3fed5b22f5e99b9c..8882411f4bf5037101b1223b305687bb425adef8 100644
--- a/cc/resources/clip_display_item.h
+++ b/cc/resources/clip_display_item.h
@@ -20,13 +20,11 @@ namespace cc {
class CC_EXPORT ClipDisplayItem : public DisplayItem {
public:
+ ClipDisplayItem();
~ClipDisplayItem() override;
- static scoped_ptr<ClipDisplayItem> Create(
- gfx::Rect clip_rect,
- const std::vector<SkRRect>& rounded_clip_rects) {
- return make_scoped_ptr(new ClipDisplayItem(clip_rect, rounded_clip_rects));
- }
+ void SetNew(gfx::Rect clip_rect,
+ const std::vector<SkRRect>& rounded_clip_rects);
void Raster(SkCanvas* canvas, SkDrawPictureCallback* callback) const override;
@@ -46,21 +44,15 @@ class CC_EXPORT ClipDisplayItem : public DisplayItem {
class CC_EXPORT EndClipDisplayItem : public DisplayItem {
public:
+ EndClipDisplayItem();
~EndClipDisplayItem() override;
- static scoped_ptr<EndClipDisplayItem> Create() {
- return make_scoped_ptr(new EndClipDisplayItem());
- }
-
void Raster(SkCanvas* canvas, SkDrawPictureCallback* callback) const override;
bool IsSuitableForGpuRasterization() const override;
int ApproximateOpCount() const override;
size_t PictureMemoryUsage() const override;
void AsValueInto(base::trace_event::TracedValue* array) const override;
-
- protected:
- EndClipDisplayItem();
};
} // namespace cc
« no previous file with comments | « cc/quads/list_container.cc ('k') | cc/resources/clip_display_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698