Bug 944420 - Create TextureHostOGL when Compositor is not present on gonk. r=nical
authorSotaro Ikeda <sikeda@mozilla.com>
Wed, 04 Dec 2013 17:46:03 -0500
changeset 174552 3a97bd9f508e2d940d9ded559239399ed8574366
parent 174551 41fce02031abe259126b07d7dc30f31ed84187ba
child 174553 1b2ba989f531ae1db41f1f230f2f198ec10be485
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnical
bugs944420
milestone28.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 944420 - Create TextureHostOGL when Compositor is not present on gonk. r=nical
gfx/layers/composite/TextureHost.cpp
--- a/gfx/layers/composite/TextureHost.cpp
+++ b/gfx/layers/composite/TextureHost.cpp
@@ -99,16 +99,23 @@ TextureHost::Create(uint64_t aID,
                     ISurfaceAllocator* aDeallocator,
                     TextureFlags aFlags)
 {
   switch (Compositor::GetBackend()) {
     case LAYERS_OPENGL:
       return CreateTextureHostOGL(aID, aDesc, aDeallocator, aFlags);
     case LAYERS_BASIC:
       return CreateTextureHostBasic(aID, aDesc, aDeallocator, aFlags);
+#ifdef MOZ_WIDGET_GONK
+    case LAYERS_NONE:
+      // Power on video reqests to allocate TextureHost,
+      // when Compositor is still not present. This is a very hacky workaround.
+      // See Bug 944420.
+      return CreateTextureHostOGL(aID, aDesc, aDeallocator, aFlags);
+#endif
 #ifdef XP_WIN
     case LAYERS_D3D11:
     case LAYERS_D3D9:
       // XXX - not implemented yet
 #endif
     default:
       MOZ_CRASH("Couldn't create texture host");
       return nullptr;