Backed out changeset ca6881983573 (bug 1366941) for build bustage
authorPhil Ringnalda <philringnalda@gmail.com>
Thu, 01 Jun 2017 20:05:48 -0700
changeset 410065 f89ae1cf86fb31d82c2e51aaa9002501f5dd11a2
parent 410064 3075f34ce6f715be42805a88811825c836606dd2
child 410066 12fa2783b2cc4639b35834418ca143740db5eec8
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1366941
milestone55.0a1
backs outca6881983573316f6d20ea12085a81f34b13ed27
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
Backed out changeset ca6881983573 (bug 1366941) for build bustage CLOSED TREE MozReview-Commit-ID: DgThUZ2RpU
dom/canvas/WebGLContext.cpp
gfx/gl/SharedSurface.cpp
gfx/gl/SharedSurface.h
--- a/dom/canvas/WebGLContext.cpp
+++ b/dom/canvas/WebGLContext.cpp
@@ -2347,17 +2347,17 @@ WebGLContext::GetVRFrame()
 
     RefPtr<SharedSurfaceTextureClient> sharedSurface = screen->Front();
     if (!sharedSurface) {
         return nullptr;
     }
 
     if (sharedSurface && sharedSurface->GetAllocator() != vrmc) {
         RefPtr<SharedSurfaceTextureClient> dest =
-        screen->Factory()->NewTexClient(sharedSurface->GetSize(), vrmc);
+        screen->Factory()->NewTexClient(sharedSurface->GetSize());
         if (!dest) {
             return nullptr;
         }
         gl::SharedSurface* destSurf = dest->Surf();
         destSurf->ProducerAcquire();
         SharedSurface::ProdCopy(sharedSurface->Surf(), dest->Surf(),
                                 screen->Factory());
         destSurf->ProducerRelease();
--- a/gfx/gl/SharedSurface.cpp
+++ b/gfx/gl/SharedSurface.cpp
@@ -12,17 +12,16 @@
 #include "GLScreenBuffer.h"
 #include "nsThreadUtils.h"
 #include "ScopedGLHelpers.h"
 #include "SharedSurfaceGL.h"
 #include "mozilla/layers/CompositorTypes.h"
 #include "mozilla/layers/TextureClientSharedSurface.h"
 #include "mozilla/layers/TextureForwarder.h"
 #include "mozilla/Unused.h"
-#include "VRManagerChild.h"
 
 namespace mozilla {
 namespace gl {
 
 /*static*/ void
 SharedSurface::ProdCopy(SharedSurface* src, SharedSurface* dest,
                         SurfaceFactory* factory)
 {
@@ -313,32 +312,25 @@ SurfaceFactory::~SurfaceFactory()
     MOZ_RELEASE_ASSERT(mRecycleTotalPool.empty(),"GFX: Surface recycle pool not empty.");
 
     // If we mRecycleFreePool.clear() before StopRecycling(), we may try to recycle it,
     // fail, call StopRecycling(), then return here and call it again.
     mRecycleFreePool.clear();
 }
 
 already_AddRefed<layers::SharedSurfaceTextureClient>
-SurfaceFactory::NewTexClient(const gfx::IntSize& size, const layers::LayersIPCChannel* aLayersChannel)
+SurfaceFactory::NewTexClient(const gfx::IntSize& size)
 {
     while (!mRecycleFreePool.empty()) {
         RefPtr<layers::SharedSurfaceTextureClient> cur = mRecycleFreePool.front();
         mRecycleFreePool.pop();
 
-        if (cur->Surf()->mSize == size){
-            // In the general case, textureClients transit textures through
-            // CompositorForwarder. But, the textureClient created by VRManagerChild
-            // has a different LayerIPCChannel, PVRManager. Therefore, textureClients
-            // need to be separated into different cases.
-            if (aLayersChannel && (aLayersChannel == cur->GetAllocator()) ||
-                cur->GetAllocator() != gfx::VRManagerChild::Get()) {
-                cur->Surf()->WaitForBufferOwnership();
-                return cur.forget();
-            }
+        if (cur->Surf()->mSize == size) {
+            cur->Surf()->WaitForBufferOwnership();
+            return cur.forget();
         }
 
         StopRecycling(cur);
     }
 
     UniquePtr<SharedSurface> surf = Move(CreateShared(size));
     if (!surf)
         return nullptr;
--- a/gfx/gl/SharedSurface.h
+++ b/gfx/gl/SharedSurface.h
@@ -301,18 +301,17 @@ protected:
 
     void StartRecycling(layers::SharedSurfaceTextureClient* tc);
     void SetRecycleCallback(layers::SharedSurfaceTextureClient* tc);
     void StopRecycling(layers::SharedSurfaceTextureClient* tc);
 
 public:
     UniquePtr<SharedSurface> NewSharedSurface(const gfx::IntSize& size);
     //already_AddRefed<ShSurfHandle> NewShSurfHandle(const gfx::IntSize& size);
-    already_AddRefed<layers::SharedSurfaceTextureClient> NewTexClient(const gfx::IntSize& size,
-                                                                      const layers::LayersIPCChannel* aLayersChannel = nullptr);
+    already_AddRefed<layers::SharedSurfaceTextureClient> NewTexClient(const gfx::IntSize& size);
 
     static void RecycleCallback(layers::TextureClient* tc, void* /*closure*/);
 
     // Auto-deletes surfs of the wrong type.
     bool Recycle(layers::SharedSurfaceTextureClient* texClient);
 };
 
 class ScopedReadbackFB