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

Unified Diff: ui/aura/test/test_window_delegate.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 | « ui/aura/test/test_window_delegate.h ('k') | ui/aura/window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/test/test_window_delegate.cc
diff --git a/ui/aura/test/test_window_delegate.cc b/ui/aura/test/test_window_delegate.cc
index 3c6a308174f0d2011d5b7497cabba949284727f8..89918caa4cad79974bac5642db5d60d0e47f8327 100644
--- a/ui/aura/test/test_window_delegate.cc
+++ b/ui/aura/test/test_window_delegate.cc
@@ -7,6 +7,7 @@
#include "base/strings/stringprintf.h"
#include "ui/aura/window.h"
#include "ui/base/hit_test.h"
+#include "ui/compositor/paint_context.h"
#include "ui/events/event.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/path.h"
@@ -75,7 +76,7 @@ bool TestWindowDelegate::CanFocus() {
void TestWindowDelegate::OnCaptureLost() {
}
-void TestWindowDelegate::OnPaint(gfx::Canvas* canvas) {
+void TestWindowDelegate::OnPaint(const ui::PaintContext& context) {
}
void TestWindowDelegate::OnDeviceScaleFactorChanged(
@@ -120,8 +121,8 @@ void ColorTestWindowDelegate::OnWindowDestroyed(Window* window) {
delete this;
}
-void ColorTestWindowDelegate::OnPaint(gfx::Canvas* canvas) {
- canvas->DrawColor(color_, SkXfermode::kSrc_Mode);
+void ColorTestWindowDelegate::OnPaint(const ui::PaintContext& context) {
+ context.canvas()->DrawColor(color_, SkXfermode::kSrc_Mode);
}
////////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « ui/aura/test/test_window_delegate.h ('k') | ui/aura/window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698