Commit f072931f authored by danakj's avatar danakj Committed by Commit bot

toolbar: Use a PaintRecorder to access the Canvas for painting.

Don't use the canvas() from the PaintContext so that we can have the
PaintContext be backed by a DisplayItemList instead in the future.
Access to the Canvas should be done through a PaintRecorder.

R=pkasting
BUG=466426

Review URL: https://codereview.chromium.org/1066133002

Cr-Commit-Position: refs/heads/master@{#324128}
parent c3bbc172
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#include "grit/theme_resources.h" #include "grit/theme_resources.h"
#include "ui/accessibility/ax_view_state.h" #include "ui/accessibility/ax_view_state.h"
#include "ui/base/resource/resource_bundle.h" #include "ui/base/resource/resource_bundle.h"
#include "ui/compositor/paint_context.h" #include "ui/compositor/paint_recorder.h"
#include "ui/events/event.h" #include "ui/events/event.h"
#include "ui/gfx/image/image_skia.h" #include "ui/gfx/image/image_skia.h"
#include "ui/gfx/image/image_skia_operations.h" #include "ui/gfx/image/image_skia_operations.h"
...@@ -110,7 +110,8 @@ void ToolbarActionView::ViewHierarchyChanged( ...@@ -110,7 +110,8 @@ void ToolbarActionView::ViewHierarchyChanged(
void ToolbarActionView::PaintChildren(const ui::PaintContext& context) { void ToolbarActionView::PaintChildren(const ui::PaintContext& context) {
View::PaintChildren(context); View::PaintChildren(context);
view_controller_->PaintExtra(context.canvas(), GetLocalBounds(), ui::PaintRecorder recorder(context);
view_controller_->PaintExtra(recorder.canvas(), GetLocalBounds(),
GetCurrentWebContents()); GetCurrentWebContents());
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment