| Index: ui/aura_extra/image_window_delegate.cc
|
| diff --git a/ui/aura_extra/image_window_delegate.cc b/ui/aura_extra/image_window_delegate.cc
|
| index 8f04a1a4971ce615651a7f281b02794f2a3c9770..9e4b35e679e040b22d88760541559f0478f3f606 100644
|
| --- a/ui/aura_extra/image_window_delegate.cc
|
| +++ b/ui/aura_extra/image_window_delegate.cc
|
| @@ -7,7 +7,7 @@
|
| #include "ui/base/cursor/cursor.h"
|
| #include "ui/base/hit_test.h"
|
| #include "ui/compositor/compositor.h"
|
| -#include "ui/compositor/paint_context.h"
|
| +#include "ui/compositor/paint_recorder.h"
|
| #include "ui/gfx/canvas.h"
|
| #include "ui/gfx/geometry/rect.h"
|
| #include "ui/gfx/geometry/size.h"
|
| @@ -71,13 +71,15 @@ void ImageWindowDelegate::OnCaptureLost() {
|
| }
|
|
|
| void ImageWindowDelegate::OnPaint(const ui::PaintContext& context) {
|
| - gfx::Canvas* canvas = context.canvas();
|
| + ui::PaintRecorder recorder(context);
|
| if (background_color_ != SK_ColorTRANSPARENT &&
|
| (image_.IsEmpty() || size_mismatch_ || !offset_.IsZero())) {
|
| - canvas->DrawColor(background_color_);
|
| + recorder.canvas()->DrawColor(background_color_);
|
| + }
|
| + if (!image_.IsEmpty()) {
|
| + recorder.canvas()->DrawImageInt(image_.AsImageSkia(), offset_.x(),
|
| + offset_.y());
|
| }
|
| - if (!image_.IsEmpty())
|
| - canvas->DrawImageInt(image_.AsImageSkia(), offset_.x(), offset_.y());
|
| }
|
|
|
| void ImageWindowDelegate::OnDeviceScaleFactorChanged(float scale_factor) {
|
|
|