| Index: ash/wm/dock/docked_window_layout_manager.cc
|
| diff --git a/ash/wm/dock/docked_window_layout_manager.cc b/ash/wm/dock/docked_window_layout_manager.cc
|
| index 9945fa57556e34e6e0f5eaf9f42ed078fa2db95f..684519597895ab1d52ad3c6f52fef9135833adc3 100644
|
| --- a/ash/wm/dock/docked_window_layout_manager.cc
|
| +++ b/ash/wm/dock/docked_window_layout_manager.cc
|
| @@ -32,6 +32,7 @@
|
| #include "ui/aura/window_event_dispatcher.h"
|
| #include "ui/base/resource/resource_bundle.h"
|
| #include "ui/compositor/paint_context.h"
|
| +#include "ui/compositor/paint_recorder.h"
|
| #include "ui/compositor/scoped_layer_animation_settings.h"
|
| #include "ui/gfx/canvas.h"
|
| #include "ui/gfx/geometry/rect.h"
|
| @@ -94,38 +95,25 @@ class DockedBackgroundWidget : public views::Widget,
|
| }
|
|
|
| void OnNativeWidgetPaint(const ui::PaintContext& context) override {
|
| - gfx::Canvas* canvas = context.canvas();
|
| + ui::PaintRecorder recorder(context);
|
| const gfx::ImageSkia& shelf_background(
|
| alignment_ == DOCKED_ALIGNMENT_LEFT ?
|
| shelf_background_left_ : shelf_background_right_);
|
| gfx::Rect rect = gfx::Rect(GetWindowBoundsInScreen().size());
|
| SkPaint paint;
|
| paint.setAlpha(alpha_);
|
| - canvas->DrawImageInt(shelf_background,
|
| - 0,
|
| - 0,
|
| - shelf_background.width(),
|
| - shelf_background.height(),
|
| - alignment_ == DOCKED_ALIGNMENT_LEFT
|
| - ? rect.width() - shelf_background.width()
|
| - : 0,
|
| - 0,
|
| - shelf_background.width(),
|
| - rect.height(),
|
| - false,
|
| - paint);
|
| - canvas->DrawImageInt(
|
| + recorder.canvas()->DrawImageInt(
|
| + shelf_background, 0, 0, shelf_background.width(),
|
| + shelf_background.height(), alignment_ == DOCKED_ALIGNMENT_LEFT
|
| + ? rect.width() - shelf_background.width()
|
| + : 0,
|
| + 0, shelf_background.width(), rect.height(), false, paint);
|
| + recorder.canvas()->DrawImageInt(
|
| shelf_background,
|
| alignment_ == DOCKED_ALIGNMENT_LEFT ? 0 : shelf_background.width() - 1,
|
| - 0,
|
| - 1,
|
| - shelf_background.height(),
|
| - alignment_ == DOCKED_ALIGNMENT_LEFT ? 0 : shelf_background.width(),
|
| - 0,
|
| - rect.width() - shelf_background.width(),
|
| - rect.height(),
|
| - false,
|
| - paint);
|
| + 0, 1, shelf_background.height(),
|
| + alignment_ == DOCKED_ALIGNMENT_LEFT ? 0 : shelf_background.width(), 0,
|
| + rect.width() - shelf_background.width(), rect.height(), false, paint);
|
| }
|
|
|
| // BackgroundAnimatorDelegate:
|
|
|