Index: ui/aura/demo/demo_main.cc |
diff --git a/ui/aura/demo/demo_main.cc b/ui/aura/demo/demo_main.cc |
index c589824926056ec3f51bbf5da2ae9f75e53ec082..e7ed3680c17ea8293161d63e8d3ce7202432afca 100644 |
--- a/ui/aura/demo/demo_main.cc |
+++ b/ui/aura/demo/demo_main.cc |
@@ -23,6 +23,7 @@ |
#include "ui/events/event.h" |
#include "ui/gfx/canvas.h" |
#include "ui/gfx/geometry/rect.h" |
+#include "ui/gfx/skia_util.h" |
#include "ui/gl/gl_surface.h" |
#if defined(USE_X11) |
@@ -63,6 +64,14 @@ class DemoWindowDelegate : public aura::WindowDelegate { |
void OnCaptureLost() override {} |
void OnPaint(gfx::Canvas* canvas) override { |
canvas->DrawColor(color_, SkXfermode::kSrc_Mode); |
+ gfx::Rect r; |
+ 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); |
+ } |
} |
void OnDeviceScaleFactorChanged(float device_scale_factor) override {} |
void OnWindowDestroying(aura::Window* window) override {} |