Bug 1190379 - Disable surface copying on emulators. r=snorp
authorEugen Sawin <esawin@me73.com>
Mon, 28 Sep 2015 16:37:45 +0200
changeset 264792 4d3f66d8a73d89b504fb7911d4dd720bdd9cab77
parent 264791 5f2cdf6fee39e700b5920857690151313cc456a6
child 264793 3b2c73d50f5a251a7b24893da545386fae8a5ff1
push id65746
push useresawin@mozilla.com
push dateMon, 28 Sep 2015 22:57:03 +0000
treeherdermozilla-inbound@4d3f66d8a73d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssnorp
bugs1190379
milestone44.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 1190379 - Disable surface copying on emulators. r=snorp
dom/media/platforms/android/AndroidDecoderModule.cpp
--- a/dom/media/platforms/android/AndroidDecoderModule.cpp
+++ b/dom/media/platforms/android/AndroidDecoderModule.cpp
@@ -81,18 +81,20 @@ public:
     mGLContext = nullptr;
   }
 
   nsresult Input(MediaRawData* aSample) override {
     return MediaCodecDataDecoder::Input(aSample);
   }
 
   bool WantCopy() {
-    // Allocating a texture is incredibly slow on PowerVR
-    return mGLContext->Vendor() != GLVendor::Imagination;
+    // Allocating a texture is incredibly slow on PowerVR and may fail on
+    // emulators, see bug 1190379.
+    return mGLContext->Vendor() != GLVendor::Imagination &&
+           mGLContext->Renderer() != GLRenderer::AndroidEmulator;
   }
 
   EGLImage CopySurface(layers::Image* img) {
     mGLContext->MakeCurrent();
 
     GLuint tex = CreateTextureForOffscreen(mGLContext, mGLContext->GetGLFormats(),
                                            img->GetSize());