summaryrefslogtreecommitdiffstats
path: root/gpu/perftests
diff options
context:
space:
mode:
Diffstat (limited to 'gpu/perftests')
-rw-r--r--gpu/perftests/texture_upload_perftest.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/gpu/perftests/texture_upload_perftest.cc b/gpu/perftests/texture_upload_perftest.cc
index 3a1af62..27444a4 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;
+#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);