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

Unified Diff: gpu/perftests/texture_upload_perftest.cc

Issue 1086703007: gpu_perftests: Use zero size gl surface for offscreen rendering (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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698