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

Unified Diff: ui/aura/bench/bench_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 | « content/browser/web_contents/web_contents_view_aura.cc ('k') | ui/aura/demo/demo_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/bench/bench_main.cc
diff --git a/ui/aura/bench/bench_main.cc b/ui/aura/bench/bench_main.cc
index 4750925e7437c6c316b550afc6dfc2857c24f000..2df5e886340d1e6869b48b078e30424a2966d5cb 100644
--- a/ui/aura/bench/bench_main.cc
+++ b/ui/aura/bench/bench_main.cc
@@ -29,6 +29,7 @@
#include "ui/compositor/compositor_observer.h"
#include "ui/compositor/debug_utils.h"
#include "ui/compositor/layer.h"
+#include "ui/compositor/paint_context.h"
#include "ui/compositor/test/in_process_context_factory.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/geometry/rect.h"
@@ -60,9 +61,9 @@ class ColoredLayer : public Layer, public LayerDelegate {
~ColoredLayer() override {}
// Overridden from LayerDelegate:
- void OnPaintLayer(gfx::Canvas* canvas) override {
+ void OnPaintLayer(const ui::PaintContext& context) override {
if (draw_) {
- canvas->DrawColor(color_);
+ context.canvas()->DrawColor(color_);
}
}
« no previous file with comments | « content/browser/web_contents/web_contents_view_aura.cc ('k') | ui/aura/demo/demo_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698