Bug 1251726 - Check if Compositor is set r=nical
authorSotaro Ikeda <sotaro.ikeda.g@gmail.com>
Mon, 07 Mar 2016 17:35:38 -0800
changeset 287111 185e10fbb9d31096a19b2ed14dd19c4246cc043c
parent 287110 396e7cdc25393a818a8e3a07af49284655ad58a3
child 287112 7a02a813a179bcd9a1e0640c0177377aa565e2e7
push id73058
push usersikeda@mozilla.com
push dateTue, 08 Mar 2016 01:35:53 +0000
treeherdermozilla-inbound@185e10fbb9d3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnical
bugs1251726
milestone47.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 1251726 - Check if Compositor is set r=nical
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;