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

Unified Diff: ui/compositor/compositing_recorder.cc

Issue 1423653005: Further plumb visual rect into cc:DisplayItemList. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix clip recorder params in omnibox. Created 5 years, 1 month 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.h » ('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 f485990ef33caaa6d503fc26d0596aa696db05cf..fca8ad9706ec091f3ebe51fff211d60a97db98ea 100644
--- a/ui/compositor/compositing_recorder.cc
+++ b/ui/compositor/compositing_recorder.cc
@@ -12,13 +12,16 @@
namespace ui {
CompositingRecorder::CompositingRecorder(const PaintContext& context,
+ const gfx::Size& size_in_layer,
uint8_t alpha)
- : context_(context), saved_(alpha < 255) {
+ : context_(context),
+ bounds_in_layer_(context.ToLayerSpaceBounds(size_in_layer)),
+ saved_(alpha < 255) {
if (!saved_)
return;
- auto* item =
- context_.list_->CreateAndAppendItem<cc::CompositingDisplayItem>();
+ auto* item = context_.list_->CreateAndAppendItem<cc::CompositingDisplayItem>(
+ bounds_in_layer_);
item->SetNew(alpha, SkXfermode::kSrcOver_Mode, nullptr /* no bounds */,
skia::RefPtr<SkColorFilter>());
}
@@ -27,7 +30,8 @@ CompositingRecorder::~CompositingRecorder() {
if (!saved_)
return;
- context_.list_->CreateAndAppendItem<cc::EndCompositingDisplayItem>();
+ context_.list_->CreateAndAppendItem<cc::EndCompositingDisplayItem>(
+ bounds_in_layer_);
}
} // namespace ui
« no previous file with comments | « ui/compositor/compositing_recorder.h ('k') | ui/compositor/paint_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698