summaryrefslogtreecommitdiffstats
path: root/ash/utility
diff options
context:
space:
mode:
authordanakj <danakj@chromium.org>2015-04-03 17:15:24 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-04 00:15:46 +0000
commit85d970e4cc6d5f71c30a94cd31d6f0fa07b38890 (patch)
tree364849f5b908f5f99f1a36ca54628b494758f2c7 /ash/utility
parent397accd46320292657b9ca5eea6c1a81a38ef004 (diff)
downloadchromium_src-85d970e4cc6d5f71c30a94cd31d6f0fa07b38890.zip
chromium_src-85d970e4cc6d5f71c30a94cd31d6f0fa07b38890.tar.gz
chromium_src-85d970e4cc6d5f71c30a94cd31d6f0fa07b38890.tar.bz2
Pass a ui::PaintContext from ui::Layer to layer delegates.
This is a plumbing CL to create a ui::PaintContext that wraps a gfx::Canvas up in ui::Layer. This is passed to every LayerDelegate, and also through to aura::WindowDelegates and views::NativeWidgetDelegates to eventually reach views::View as well. This way ui::PaintContext is created in one place (for compositor paints, there are other places painting to bitmaps we'll address later). And in the future the ui::PaintContext can be backed by a display list instead of a canvas. R=sky BUG=466426 Review URL: https://codereview.chromium.org/1057873004 Cr-Commit-Position: refs/heads/master@{#323855}
Diffstat (limited to 'ash/utility')
-rw-r--r--ash/utility/partial_screenshot_controller.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/ash/utility/partial_screenshot_controller.cc b/ash/utility/partial_screenshot_controller.cc
index 76841a6..466432c 100644
--- a/ash/utility/partial_screenshot_controller.cc
+++ b/ash/utility/partial_screenshot_controller.cc
@@ -10,6 +10,7 @@
#include "ash/shell.h"
#include "ash/shell_window_ids.h"
#include "base/stl_util.h"
+#include "ui/compositor/paint_context.h"
#include "ui/events/event_handler.h"
#include "ui/gfx/canvas.h"
#include "ui/wm/core/cursor_manager.h"
@@ -56,10 +57,11 @@ class PartialScreenshotController::PartialScreenshotLayer
private:
// ui::LayerDelegate:
- void OnPaintLayer(gfx::Canvas* canvas) override {
+ void OnPaintLayer(const ui::PaintContext& context) override {
if (region_.IsEmpty())
return;
+ gfx::Canvas* canvas = context.canvas();
// Screenshot area representation: black rectangle with white
// rectangle inside. To avoid capturing these rectangles when mouse
// release, they should be outside of the actual capturing area.