Index: ui/aura/demo/demo_main.cc |
diff --git a/ui/aura/demo/demo_main.cc b/ui/aura/demo/demo_main.cc |
index bf23d451f9892b5376b671ed398e54b65b4cec22..52a09d3d7b1fc45ffc8aed760a7ca329c0214fc0 100644 |
--- a/ui/aura/demo/demo_main.cc |
+++ b/ui/aura/demo/demo_main.cc |
@@ -19,7 +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/paint_recorder.h" |
#include "ui/compositor/test/in_process_context_factory.h" |
#include "ui/events/event.h" |
#include "ui/gfx/canvas.h" |
@@ -64,15 +64,15 @@ class DemoWindowDelegate : public aura::WindowDelegate { |
bool CanFocus() override { return true; } |
void OnCaptureLost() override {} |
void OnPaint(const ui::PaintContext& context) override { |
- gfx::Canvas* canvas = context.canvas(); |
- canvas->DrawColor(color_, SkXfermode::kSrc_Mode); |
+ ui::PaintRecorder recorder(context); |
+ recorder.canvas()->DrawColor(color_, SkXfermode::kSrc_Mode); |
gfx::Rect r; |
- canvas->GetClipBounds(&r); |
+ recorder.canvas()->GetClipBounds(&r); |
// Fill with a non-solid color so that the compositor will exercise its |
// texture upload path. |
while (!r.IsEmpty()) { |
r.Inset(2, 2); |
- canvas->FillRect(r, color_, SkXfermode::kXor_Mode); |
+ recorder.canvas()->FillRect(r, color_, SkXfermode::kXor_Mode); |
} |
} |
void OnDeviceScaleFactorChanged(float device_scale_factor) override {} |