Bug 1028532 - Remove Fence::merge() on gonk. r=jmuizelaar, a=2.0+
authorSotaro Ikeda <sikeda@mozilla.com>
Wed, 25 Jun 2014 06:13:34 -0700
changeset 203499 45fb39baedc6d3070e4175e25ecc2860a92f425a
parent 203498 027245552c6ba9e75e142a4f4add2581dc7d8ace
child 203500 b6e9aaed56d04d2260e4993c14e663f94dfee9a5
push id138
push userryanvm@gmail.com
push dateFri, 08 Aug 2014 16:58:56 +0000
treeherdermozilla-b2g32_v2_0@45fb39baedc6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmuizelaar, 2.0
bugs1028532
milestone32.0
Bug 1028532 - Remove Fence::merge() on gonk. r=jmuizelaar, a=2.0+
gfx/layers/opengl/TextureHostOGL.cpp
--- a/gfx/layers/opengl/TextureHostOGL.cpp
+++ b/gfx/layers/opengl/TextureHostOGL.cpp
@@ -189,31 +189,17 @@ bool
 TextureHostOGL::SetReleaseFence(const android::sp<android::Fence>& aReleaseFence)
 {
   if (!aReleaseFence.get() || !aReleaseFence->isValid()) {
     // HWC might not provide Fence.
     // In this case, HWC implicitly handles buffer's fence.
     return false;
   }
 
-  if (!mReleaseFence.get()) {
-    mReleaseFence = aReleaseFence;
-  } else {
-    android::sp<android::Fence> mergedFence = android::Fence::merge(
-                  android::String8::format("TextureHostOGL"),
-                  mReleaseFence, aReleaseFence);
-    if (!mergedFence.get()) {
-      // synchronization is broken, the best we can do is hope fences
-      // signal in order so the new fence will act like a union.
-      // This error handling is same as android::ConsumerBase does.
-      mReleaseFence = aReleaseFence;
-      return false;
-    }
-    mReleaseFence = mergedFence;
-  }
+  mReleaseFence = aReleaseFence;
   return true;
 }
 
 android::sp<android::Fence>
 TextureHostOGL::GetAndResetReleaseFence()
 {
   // Hold previous ReleaseFence to prevent Fence delivery failure via gecko IPC.
   mPrevReleaseFence = mReleaseFence;