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

Unified Diff: cc/resources/compositing_display_item.cc

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/resources/compositing_display_item.h ('k') | cc/resources/display_item_list.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/compositing_display_item.cc
diff --git a/cc/resources/compositing_display_item.cc b/cc/resources/compositing_display_item.cc
index 15bd75cb380e9b42ec88b8143a162e9877247dcb..498ea0102131daf6d1de2eeaa185cb45b2d6f857 100644
--- a/cc/resources/compositing_display_item.cc
+++ b/cc/resources/compositing_display_item.cc
@@ -13,21 +13,24 @@
namespace cc {
-CompositingDisplayItem::CompositingDisplayItem(uint8_t alpha,
- SkXfermode::Mode xfermode,
- SkRect* bounds,
- skia::RefPtr<SkColorFilter> cf)
- : alpha_(alpha),
- xfermode_(xfermode),
- has_bounds_(!!bounds),
- color_filter_(cf) {
- if (bounds)
- bounds_ = SkRect(*bounds);
+CompositingDisplayItem::CompositingDisplayItem() {
}
CompositingDisplayItem::~CompositingDisplayItem() {
}
+void CompositingDisplayItem::SetNew(uint8_t alpha,
+ SkXfermode::Mode xfermode,
+ SkRect* bounds,
+ skia::RefPtr<SkColorFilter> cf) {
+ alpha_ = alpha;
+ xfermode_ = xfermode;
+ has_bounds_ = !!bounds;
+ if (bounds)
+ bounds_ = SkRect(*bounds);
+ color_filter_ = cf;
+}
+
void CompositingDisplayItem::Raster(SkCanvas* canvas,
SkDrawPictureCallback* callback) const {
SkPaint paint;
« no previous file with comments | « cc/resources/compositing_display_item.h ('k') | cc/resources/display_item_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698