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

Unified Diff: cc/playback/clip_display_item.h

Issue 1494223003: cc: Shrink size of display item (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix some compilation issues in ui oops Created 5 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/layers/picture_image_layer.cc ('k') | 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 c66e4675750cbb1157b8b5cde00468335f3801e0..51402139f54fc410f1a658bd72e8ef62f6869748 100644
--- a/cc/playback/clip_display_item.h
+++ b/cc/playback/clip_display_item.h
@@ -19,21 +19,26 @@ namespace cc {
class CC_EXPORT ClipDisplayItem : public DisplayItem {
public:
- ClipDisplayItem();
+ ClipDisplayItem(const gfx::Rect& clip_rect,
+ const std::vector<SkRRect>& rounded_clip_rects);
+ explicit ClipDisplayItem(const proto::DisplayItem& proto);
~ClipDisplayItem() override;
- void SetNew(gfx::Rect clip_rect,
- const std::vector<SkRRect>& rounded_clip_rects);
-
void ToProtobuf(proto::DisplayItem* proto) const override;
- void FromProtobuf(const proto::DisplayItem& proto) override;
void Raster(SkCanvas* canvas,
const gfx::Rect& canvas_target_playback_rect,
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 1; }
+ bool IsSuitableForGpuRasterization() const { return true; }
private:
+ void SetNew(const gfx::Rect& clip_rect,
+ const std::vector<SkRRect>& rounded_clip_rects);
+
gfx::Rect clip_rect_;
std::vector<SkRRect> rounded_clip_rects_;
};
@@ -41,15 +46,19 @@ class CC_EXPORT ClipDisplayItem : public DisplayItem {
class CC_EXPORT EndClipDisplayItem : public DisplayItem {
public:
EndClipDisplayItem();
+ explicit EndClipDisplayItem(const proto::DisplayItem& proto);
~EndClipDisplayItem() override;
void ToProtobuf(proto::DisplayItem* proto) const override;
- void FromProtobuf(const proto::DisplayItem& proto) override;
void Raster(SkCanvas* canvas,
const gfx::Rect& canvas_target_playback_rect,
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; }
+ bool IsSuitableForGpuRasterization() const { return true; }
};
} // namespace cc
« no previous file with comments | « cc/layers/picture_image_layer.cc ('k') | cc/playback/clip_display_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698