summaryrefslogtreecommitdiffstats
path: root/gpu/perftests
diff options
context:
space:
mode:
authortiago.vignatti <tiago.vignatti@intel.com>2015-04-16 14:10:18 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-16 21:11:52 +0000
commit274eb3202c59d4842c191e924577e81f14044af5 (patch)
tree24b6bdfeba28996f3efb657850d737bbc726b9d2 /gpu/perftests
parent69eba06cd07978b5f310f175989ced3b626a8932 (diff)
downloadchromium_src-274eb3202c59d4842c191e924577e81f14044af5.zip
chromium_src-274eb3202c59d4842c191e924577e81f14044af5.tar.gz
chromium_src-274eb3202c59d4842c191e924577e81f14044af5.tar.bz2
gpu_perftests: Use zero size gl surface for offscreen rendering
In GLX, most of the drivers can cope with both PBuffer and Surfaceless modes for offscreen rendering. In EGL though, Intel driver only works with Surfaceless. This CL changes all hardware platforms to use Surfaceless by forcing a zero size GL surface initialization. Ozone-GBM wasn't previously working because of that but now works fine. BUG=423481 TEST=gpu_perftests on GBM Review URL: https://codereview.chromium.org/1086703007 Cr-Commit-Position: refs/heads/master@{#325514}
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);