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

Unified Diff: cc/playback/clip_display_item.h

Issue 2751833007: cc: Move DisplayItem::Raster up to DisplayItemList (Closed)
Patch Set: virtualraster: . Created 3 years, 9 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 | « 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 5830f96ada188f3e0f24b15f00aa269b8764c9e0..1c941dc6c834ca47bbeef7cdab7430f872a17a4e 100644
--- a/cc/playback/clip_display_item.h
+++ b/cc/playback/clip_display_item.h
@@ -7,7 +7,6 @@
#include <stddef.h>
-#include <memory>
#include <vector>
#include "cc/base/cc_export.h"
@@ -15,38 +14,23 @@
#include "third_party/skia/include/core/SkRRect.h"
#include "ui/gfx/geometry/rect.h"
-class SkCanvas;
-
namespace cc {
class CC_EXPORT ClipDisplayItem : public DisplayItem {
public:
ClipDisplayItem(const gfx::Rect& clip_rect,
- const std::vector<SkRRect>& rounded_clip_rects,
+ std::vector<SkRRect> rounded_clip_rects,
bool antialias);
~ClipDisplayItem() override;
- void Raster(SkCanvas* canvas,
- SkPicture::AbortCallback* callback) const override;
-
size_t ExternalMemoryUsage() const {
- return rounded_clip_rects_.capacity() * sizeof(rounded_clip_rects_[0]);
+ return rounded_clip_rects.capacity() * sizeof(rounded_clip_rects[0]);
}
int ApproximateOpCount() const { return 1; }
- const gfx::Rect& clip_rect() const { return clip_rect_; }
- const std::vector<SkRRect>& rounded_clip_rects() const {
- return rounded_clip_rects_;
- }
-
- private:
- void SetNew(const gfx::Rect& clip_rect,
- const std::vector<SkRRect>& rounded_clip_rects,
- bool antialias);
-
- gfx::Rect clip_rect_;
- std::vector<SkRRect> rounded_clip_rects_;
- bool antialias_;
+ const gfx::Rect clip_rect;
+ const std::vector<SkRRect> rounded_clip_rects;
+ const bool antialias;
};
class CC_EXPORT EndClipDisplayItem : public DisplayItem {
@@ -54,9 +38,6 @@ class CC_EXPORT EndClipDisplayItem : public DisplayItem {
EndClipDisplayItem();
~EndClipDisplayItem() override;
- void Raster(SkCanvas* canvas,
- SkPicture::AbortCallback* callback) 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