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

Unified Diff: ui/snapshot/snapshot_aura_unittest.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/keyboard/keyboard_controller.cc ('k') | ui/views/bubble/tray_bubble_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/snapshot/snapshot_aura_unittest.cc
diff --git a/ui/snapshot/snapshot_aura_unittest.cc b/ui/snapshot/snapshot_aura_unittest.cc
index b15a5807b6b20aa5cb0c49012caa1879e679b84a..c134ca08aba37d43b78ffc485927b8fbe2628532 100644
--- a/ui/snapshot/snapshot_aura_unittest.cc
+++ b/ui/snapshot/snapshot_aura_unittest.cc
@@ -15,6 +15,7 @@
#include "ui/aura/window_event_dispatcher.h"
#include "ui/compositor/compositor.h"
#include "ui/compositor/layer.h"
+#include "ui/compositor/paint_context.h"
#include "ui/compositor/test/context_factories_for_test.h"
#include "ui/compositor/test/draw_waiter_for_test.h"
#include "ui/gfx/canvas.h"
@@ -42,10 +43,12 @@ class TestPaintingWindowDelegate : public aura::test::TestWindowDelegate {
~TestPaintingWindowDelegate() override {}
- void OnPaint(gfx::Canvas* canvas) override {
+ void OnPaint(const ui::PaintContext& context) override {
for (int y = 0; y < window_size_.height(); ++y) {
- for (int x = 0; x < window_size_.width(); ++x)
- canvas->FillRect(gfx::Rect(x, y, 1, 1), GetExpectedColorForPoint(x, y));
+ for (int x = 0; x < window_size_.width(); ++x) {
+ context.canvas()->FillRect(gfx::Rect(x, y, 1, 1),
+ GetExpectedColorForPoint(x, y));
+ }
}
}
« no previous file with comments | « ui/keyboard/keyboard_controller.cc ('k') | ui/views/bubble/tray_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698