| Index: ui/compositor/compositing_recorder.cc
|
| diff --git a/ui/compositor/compositing_recorder.cc b/ui/compositor/compositing_recorder.cc
|
| index f485990ef33caaa6d503fc26d0596aa696db05cf..fa188d8e0db1d733d93daae6897447c6c8db61fa 100644
|
| --- a/ui/compositor/compositing_recorder.cc
|
| +++ b/ui/compositor/compositing_recorder.cc
|
| @@ -8,17 +8,21 @@
|
| #include "cc/playback/display_item_list.h"
|
| #include "ui/compositor/paint_context.h"
|
| #include "ui/gfx/canvas.h"
|
| +#include "ui/gfx/geometry/rect.h"
|
|
|
| namespace ui {
|
|
|
| CompositingRecorder::CompositingRecorder(const PaintContext& context,
|
| + const gfx::Size& visual_size,
|
| uint8_t alpha)
|
| - : context_(context), saved_(alpha < 255) {
|
| + : context_(context),
|
| + visual_rect_(context.ToVisualRect(visual_size)),
|
| + saved_(alpha < 255) {
|
| if (!saved_)
|
| return;
|
|
|
| - auto* item =
|
| - context_.list_->CreateAndAppendItem<cc::CompositingDisplayItem>();
|
| + auto* item = context_.list_->CreateAndAppendItem<cc::CompositingDisplayItem>(
|
| + visual_rect_);
|
| item->SetNew(alpha, SkXfermode::kSrcOver_Mode, nullptr /* no bounds */,
|
| skia::RefPtr<SkColorFilter>());
|
| }
|
| @@ -27,7 +31,8 @@ CompositingRecorder::~CompositingRecorder() {
|
| if (!saved_)
|
| return;
|
|
|
| - context_.list_->CreateAndAppendItem<cc::EndCompositingDisplayItem>();
|
| + context_.list_->CreateAndAppendItem<cc::EndCompositingDisplayItem>(
|
| + visual_rect_);
|
| }
|
|
|
| } // namespace ui
|
|
|