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

Unified Diff: ui/compositor/compositing_recorder.cc

Issue 2230513005: Move visual rect unioning between paired items to cc::DisplayItemList. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review feedback. Created 4 years, 4 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 | « ui/compositor/compositing_recorder.h ('k') | ui/compositor/paint_cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/compositing_recorder.cc
diff --git a/ui/compositor/compositing_recorder.cc b/ui/compositor/compositing_recorder.cc
index fd255c731efc546acb1eebc725e167eed5512dda..1c488e03a893d67cb8d1ce39da8b2ca63e2de3b2 100644
--- a/ui/compositor/compositing_recorder.cc
+++ b/ui/compositor/compositing_recorder.cc
@@ -12,27 +12,23 @@
namespace ui {
CompositingRecorder::CompositingRecorder(const PaintContext& context,
- const gfx::Size& size_in_context,
uint8_t alpha,
bool lcd_text_requires_opaque_layer)
: context_(context),
- bounds_in_layer_(context.ToLayerSpaceBounds(size_in_context)),
saved_(alpha < 255) {
if (!saved_)
return;
- context_.list_->CreateAndAppendItem<cc::CompositingDisplayItem>(
- bounds_in_layer_, alpha, SkXfermode::kSrcOver_Mode,
- nullptr /* no bounds */, nullptr /* no color filter */,
- lcd_text_requires_opaque_layer);
+ context_.list_->CreateAndAppendPairedBeginItem<cc::CompositingDisplayItem>(
+ alpha, SkXfermode::kSrcOver_Mode, nullptr /* no bounds */,
+ nullptr /* no color filter */, lcd_text_requires_opaque_layer);
}
CompositingRecorder::~CompositingRecorder() {
if (!saved_)
return;
- context_.list_->CreateAndAppendItem<cc::EndCompositingDisplayItem>(
- bounds_in_layer_);
+ context_.list_->CreateAndAppendPairedEndItem<cc::EndCompositingDisplayItem>();
}
} // namespace ui
« no previous file with comments | « ui/compositor/compositing_recorder.h ('k') | ui/compositor/paint_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698