Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2962)

Unified Diff: ash/utility/partial_screenshot_controller.cc

Issue 1057873004: Pass a ui::PaintContext from ui::Layer to layer delegates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: layer-paintcontext: mac Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/root_window_controller.cc ('k') | ash/wm/boot_splash_screen_chromeos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/utility/partial_screenshot_controller.cc
diff --git a/ash/utility/partial_screenshot_controller.cc b/ash/utility/partial_screenshot_controller.cc
index 76841a621bd6486693182f3cbdab3a830d39f30a..466432c57a31ecd0a0271cf0846d4e6a06d56fa2 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.
« no previous file with comments | « ash/root_window_controller.cc ('k') | ash/wm/boot_splash_screen_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698