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

Unified Diff: ui/aura/test/test_window_delegate.cc

Issue 1064133003: ui: Use a PaintRecorder to access the Canvas for painting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ui-recorder: . Created 5 years, 8 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/demo/demo_main.cc ('k') | ui/aura/window_unittest.cc » ('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 89918caa4cad79974bac5642db5d60d0e47f8327..4b0f8b77a03ded1928c71e9ca7bac16e1e2daca2 100644
--- a/ui/aura/test/test_window_delegate.cc
+++ b/ui/aura/test/test_window_delegate.cc
@@ -7,7 +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/compositor/paint_recorder.h"
#include "ui/events/event.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/path.h"
@@ -122,7 +122,8 @@ void ColorTestWindowDelegate::OnWindowDestroyed(Window* window) {
}
void ColorTestWindowDelegate::OnPaint(const ui::PaintContext& context) {
- context.canvas()->DrawColor(color_, SkXfermode::kSrc_Mode);
+ ui::PaintRecorder recorder(context);
+ recorder.canvas()->DrawColor(color_, SkXfermode::kSrc_Mode);
}
////////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « ui/aura/demo/demo_main.cc ('k') | ui/aura/window_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698