| Index: ui/aura/window.cc
|
| diff --git a/ui/aura/window.cc b/ui/aura/window.cc
|
| index 3fe502797e0ccf5d30fda8393f2b91c4d6605f63..71fe8aca1a49f934fc864c47e00dcc83a8f164c8 100644
|
| --- a/ui/aura/window.cc
|
| +++ b/ui/aura/window.cc
|
| @@ -30,6 +30,7 @@
|
| #include "ui/aura/window_tree_host.h"
|
| #include "ui/compositor/compositor.h"
|
| #include "ui/compositor/layer.h"
|
| +#include "ui/compositor/paint_context.h"
|
| #include "ui/events/event_target_iterator.h"
|
| #include "ui/gfx/canvas.h"
|
| #include "ui/gfx/path.h"
|
| @@ -959,21 +960,22 @@ void Window::SchedulePaint() {
|
| SchedulePaintInRect(gfx::Rect(0, 0, bounds().width(), bounds().height()));
|
| }
|
|
|
| -void Window::Paint(gfx::Canvas* canvas) {
|
| +void Window::Paint(const ui::PaintContext& context) {
|
| if (delegate_)
|
| - delegate_->OnPaint(canvas);
|
| - PaintLayerlessChildren(canvas);
|
| + delegate_->OnPaint(context);
|
| + PaintLayerlessChildren(context);
|
| }
|
|
|
| -void Window::PaintLayerlessChildren(gfx::Canvas* canvas) {
|
| +void Window::PaintLayerlessChildren(const ui::PaintContext& context) {
|
| for (size_t i = 0, count = children_.size(); i < count; ++i) {
|
| Window* child = children_[i];
|
| if (!child->layer() && child->visible_) {
|
| + gfx::Canvas* canvas = context.canvas();
|
| gfx::ScopedCanvas scoped_canvas(canvas);
|
| canvas->ClipRect(child->bounds());
|
| if (!canvas->IsClipEmpty()) {
|
| canvas->Translate(child->bounds().OffsetFromOrigin());
|
| - child->Paint(canvas);
|
| + child->Paint(context);
|
| }
|
| }
|
| }
|
| @@ -1377,8 +1379,8 @@ bool Window::CleanupGestureState() {
|
| return state_modified;
|
| }
|
|
|
| -void Window::OnPaintLayer(gfx::Canvas* canvas) {
|
| - Paint(canvas);
|
| +void Window::OnPaintLayer(const ui::PaintContext& context) {
|
| + Paint(context);
|
| }
|
|
|
| void Window::OnDelegatedFrameDamage(const gfx::Rect& damage_rect_in_dip) {
|
|
|