Commit 20dcc1a0 authored by dnicoara@chromium.org's avatar dnicoara@chromium.org

[Ozone] Initialize SurfaceFactoryOzone only in the EGL GLES2 case

aura_unittests explicitly calls GLSurface::InitializeOneOffForTests in main().
The Ozone platform isn't initialized this early causing a CHECK failure when
trying to get SurfaceFactoryOzone.

At this point surface creation in unittests is handled by OSMesa, thus we don't
need SurfaceFactoryOzone initialized.

TBR=piman@chromium.org
NOTRY=true

TESTS=Ran aura_unittests manually using an Ozone build

Review URL: https://codereview.chromium.org/217003007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260239 0039d316-1c4b-4281-b951-d872f2087c98
parent 28ee4e72
......@@ -17,14 +17,14 @@ namespace gfx {
// static
bool GLSurface::InitializeOneOffInternal() {
if (gfx::SurfaceFactoryOzone::GetInstance()->InitializeHardware() !=
gfx::SurfaceFactoryOzone::INITIALIZED) {
LOG(ERROR) << "Ozone failed to initialize hardware";
return false;
}
switch (GetGLImplementation()) {
case kGLImplementationEGLGLES2:
if (gfx::SurfaceFactoryOzone::GetInstance()->InitializeHardware() !=
gfx::SurfaceFactoryOzone::INITIALIZED) {
LOG(ERROR) << "Ozone failed to initialize hardware";
return false;
}
if (!GLSurfaceEGL::InitializeOneOff()) {
LOG(ERROR) << "GLSurfaceEGL::InitializeOneOff failed.";
return false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment