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

Unified Diff: ui/aura/demo/demo_main.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/bench/bench_main.cc ('k') | ui/aura/test/test_window_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/demo/demo_main.cc
diff --git a/ui/aura/demo/demo_main.cc b/ui/aura/demo/demo_main.cc
index 2e4ac3be1f946d9df184d401e6d647829abb180d..bf23d451f9892b5376b671ed398e54b65b4cec22 100644
--- a/ui/aura/demo/demo_main.cc
+++ b/ui/aura/demo/demo_main.cc
@@ -19,6 +19,7 @@
#include "ui/aura/window_delegate.h"
#include "ui/aura/window_tree_host.h"
#include "ui/base/hit_test.h"
+#include "ui/compositor/paint_context.h"
#include "ui/compositor/test/in_process_context_factory.h"
#include "ui/events/event.h"
#include "ui/gfx/canvas.h"
@@ -62,7 +63,8 @@ class DemoWindowDelegate : public aura::WindowDelegate {
}
bool CanFocus() override { return true; }
void OnCaptureLost() override {}
- void OnPaint(gfx::Canvas* canvas) override {
+ void OnPaint(const ui::PaintContext& context) override {
+ gfx::Canvas* canvas = context.canvas();
canvas->DrawColor(color_, SkXfermode::kSrc_Mode);
gfx::Rect r;
canvas->GetClipBounds(&r);
« no previous file with comments | « ui/aura/bench/bench_main.cc ('k') | ui/aura/test/test_window_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698