Bug 1251726 - Check if Compositor is set. r=nical, a=ritu
authorSotaro Ikeda <sotaro.ikeda.g@gmail.com>
Mon, 07 Mar 2016 17:35:38 -0800
changeset 323411 6a5414a0f4be3e4f581a41d5d3c4a428f84ae095
parent 323410 d59774690fc8154b24ba6ac4a37118350cdc7cfd
child 323412 e20a701d730dd3b218adfc62abdf8caf2f8dc937
push id5913
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 16:57:49 +0000
treeherdermozilla-beta@dcaf0a6fa115 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnical, ritu
bugs1251726
milestone47.0a2
Bug 1251726 - Check if Compositor is set. r=nical, a=ritu
gfx/layers/composite/TextureHost.cpp
--- a/gfx/layers/composite/TextureHost.cpp
+++ b/gfx/layers/composite/TextureHost.cpp
@@ -538,19 +538,21 @@ BufferTextureHost::PrepareTextureSource(
 
   // We don't own it, apparently.
   mFirstSource = nullptr;
 
   DataTextureSource* texture = aTexture.get() ? aTexture->AsDataTextureSource() : nullptr;
   bool compatibleFormats = texture
                          && (mFormat == texture->GetFormat()
                              || (mFormat == gfx::SurfaceFormat::YUV
+                                 && mCompositor
                                  && mCompositor->SupportsEffect(EffectTypes::YCBCR)
                                  && texture->GetNextSibling())
                              || (mFormat == gfx::SurfaceFormat::YUV
+                                 && mCompositor
                                  && !mCompositor->SupportsEffect(EffectTypes::YCBCR)
                                  && texture->GetFormat() == gfx::SurfaceFormat::B8G8R8X8));
 
   bool shouldCreateTexture = !compatibleFormats
                            || texture->NumCompositableRefs() > 1
                            || texture->HasOwner()
                            || texture->GetSize() != mSize;