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

Unified Diff: ui/aura/bench/bench_main.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: 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 | « no previous file | ui/aura/demo/demo_main.cc » ('j') | ui/aura/window_unittest.cc » ('J')
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 2df5e886340d1e6869b48b078e30424a2966d5cb..ce0993fecc837c20d817501d134c8af7faf35ada 100644
--- a/ui/aura/bench/bench_main.cc
+++ b/ui/aura/bench/bench_main.cc
@@ -29,7 +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/paint_recorder.h"
#include "ui/compositor/test/in_process_context_factory.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/geometry/rect.h"
@@ -63,7 +63,8 @@ class ColoredLayer : public Layer, public LayerDelegate {
// Overridden from LayerDelegate:
void OnPaintLayer(const ui::PaintContext& context) override {
if (draw_) {
- context.canvas()->DrawColor(color_);
+ ui::PaintRecorder recorder(context);
+ recorder.canvas()->DrawColor(color_);
}
}
« no previous file with comments | « no previous file | ui/aura/demo/demo_main.cc » ('j') | ui/aura/window_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698