Chromium Code Reviews| Index: gpu/perftests/texture_upload_perftest.cc |
| diff --git a/gpu/perftests/texture_upload_perftest.cc b/gpu/perftests/texture_upload_perftest.cc |
| index 3a1af627acd344cb5e79dae661b594da677437e9..27444a4c432ca278ab20396033fb0a3e77b0fa55 100644 |
| --- a/gpu/perftests/texture_upload_perftest.cc |
| +++ b/gpu/perftests/texture_upload_perftest.cc |
| @@ -24,6 +24,10 @@ |
| #include "ui/gl/gpu_timing.h" |
| #include "ui/gl/scoped_make_current.h" |
| +#if defined(USE_OZONE) |
| +#include "base/message_loop/message_loop.h" |
| +#endif |
| + |
| namespace gpu { |
| namespace { |
| @@ -171,10 +175,15 @@ class TextureUploadPerfTest : public testing::Test { |
| // Overridden from testing::Test |
| void SetUp() override { |
| +#if defined(USE_OZONE) |
| + // On Ozone, the backend initializes the event system using a UI |
| + // thread. |
| + base::MessageLoopForUI main_loop; |
|
Daniele Castagna
2015/04/14 15:38:38
Where in the backend is this message loop used? It
vignatti (out of this project)
2015/04/14 16:39:16
A few Ozone implementations like the GBM requires
|
| +#endif |
| static bool gl_initialized = gfx::GLSurface::InitializeOneOff(); |
| DCHECK(gl_initialized); |
| // Initialize an offscreen surface and a gl context. |
| - surface_ = gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size(4, 4)); |
| + surface_ = gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size()); |
| gl_context_ = gfx::GLContext::CreateGLContext(NULL, // share_group |
| surface_.get(), |
| gfx::PreferIntegratedGpu); |