Exemplo n.º 1
0
void
TextureParent::CompositorRecycle()
{
  mTextureHost->ClearRecycleCallback();
  mozilla::unused << SendCompositorRecycle();

  // Don't forget to prepare for the next reycle
  mWaitForClientRecycle = mTextureHost;
}
Exemplo n.º 2
0
void
TextureParent::CompositorRecycle()
{
  mTextureHost->ClearRecycleCallback();

  if (mTextureHost->GetFlags() & TextureFlags::RECYCLE) {
    mozilla::Unused << SendCompositorRecycle();
    // Don't forget to prepare for the next reycle
    // if TextureClient request it.
    mWaitForClientRecycle = mTextureHost;
  }
}
Exemplo n.º 3
0
void
TextureParent::CompositorRecycle()
{
  mTextureHost->ClearRecycleCallback();

  MaybeFenceHandle handle = null_t();
#if defined(MOZ_WIDGET_GONK) && ANDROID_VERSION >= 17
  if (mTextureHost) {
    TextureHostOGL* hostOGL = mTextureHost->AsHostOGL();
    android::sp<android::Fence> fence = hostOGL->GetAndResetReleaseFence();
    if (fence.get() && fence->isValid()) {
      handle = FenceHandle(fence);
      // HWC might not provide Fence.
      // In this case, HWC implicitly handles buffer's fence.
    }
  }
#endif
  mozilla::unused << SendCompositorRecycle(handle);

  // Don't forget to prepare for the next reycle
  mWaitForClientRecycle = mTextureHost;
}