Backed out changeset d75e4cb5b188 (bug 1546192) for build bustage at /builds/worker/workspace/build/src/gfx/gl/GLScreenBuffer.cpp. On a CLOSED TREE

This commit is contained in:
Daniel Varga 2019-06-15 04:18:28 +03:00
Родитель 7a71e98214
Коммит ff5cbecd34
4 изменённых файлов: 12 добавлений и 24 удалений

Просмотреть файл

@ -477,9 +477,7 @@ bool GLScreenBuffer::Swap(const gfx::IntSize& size) {
GLContext::LocalErrorScope errorScope(*mGL);
#endif
if (!SharedSurface::ProdCopy(src, dest, mFactory.get())) {
ret = false;
}
SharedSurface::ProdCopy(src, dest, mFactory.get());
#ifdef DEBUG
MOZ_ASSERT(!errorScope.GetError());
@ -498,7 +496,7 @@ bool GLScreenBuffer::Swap(const gfx::IntSize& size) {
mFront->Surf()->ProducerRelease();
}
return ret;
return true;
}
bool GLScreenBuffer::PublishFrame(const gfx::IntSize& size) {
@ -517,7 +515,6 @@ bool GLScreenBuffer::Resize(const gfx::IntSize& size) {
if (mBack) mBack->Surf()->ProducerRelease();
mBack = newBack;
bool ret = true;
mBack->Surf()->ProducerAcquire();

Просмотреть файл

@ -13,7 +13,6 @@
#include "nsThreadUtils.h"
#include "ScopedGLHelpers.h"
#include "SharedSurfaceGL.h"
#include "mozilla/gfx/Logging.h"
#include "mozilla/layers/CompositorTypes.h"
#include "mozilla/layers/TextureClientSharedSurface.h"
#include "mozilla/layers/TextureForwarder.h"
@ -24,7 +23,7 @@ namespace mozilla {
namespace gl {
/*static*/
bool SharedSurface::ProdCopy(SharedSurface* src, SharedSurface* dest,
void SharedSurface::ProdCopy(SharedSurface* src, SharedSurface* dest,
SurfaceFactory* factory) {
GLContext* gl = src->mGL;
@ -40,14 +39,10 @@ bool SharedSurface::ProdCopy(SharedSurface* src, SharedSurface* dest,
UniquePtr<SharedSurface_Basic> tempSurf;
tempSurf = SharedSurface_Basic::Create(gl, factory->mFormats, src->mSize,
factory->mCaps.alpha);
if (!tempSurf) {
gfxCriticalNote << "Failed to allocate SharedSurface_Basic.";
return false;
}
ProdCopy(src, tempSurf.get(), factory);
ProdCopy(tempSurf.get(), dest, factory);
return true;
return;
}
if (src->mAttachType == AttachmentType::Screen) {
@ -86,7 +81,7 @@ bool SharedSurface::ProdCopy(SharedSurface* src, SharedSurface* dest,
if (origNeedsRelock) origLocked->LockProd();
return true;
return;
}
if (dest->mAttachType == AttachmentType::Screen) {
@ -125,7 +120,7 @@ bool SharedSurface::ProdCopy(SharedSurface* src, SharedSurface* dest,
if (origNeedsRelock) origLocked->LockProd();
return true;
return;
}
// Alright, done with cases involving Screen types.
@ -142,7 +137,7 @@ bool SharedSurface::ProdCopy(SharedSurface* src, SharedSurface* dest,
gl->BlitHelper()->BlitTextureToTexture(
srcTex, destTex, src->mSize, dest->mSize, srcTarget, destTarget);
return true;
return;
}
if (dest->mAttachType == AttachmentType::GLRenderbuffer) {
@ -152,7 +147,7 @@ bool SharedSurface::ProdCopy(SharedSurface* src, SharedSurface* dest,
gl->BlitHelper()->BlitTextureToFramebuffer(srcTex, src->mSize,
dest->mSize, srcTarget);
return true;
return;
}
MOZ_CRASH("GFX: Unhandled dest->mAttachType 3.");
@ -170,7 +165,7 @@ bool SharedSurface::ProdCopy(SharedSurface* src, SharedSurface* dest,
gl->BlitHelper()->BlitFramebufferToTexture(destTex, src->mSize,
dest->mSize, destTarget);
return true;
return;
}
if (dest->mAttachType == AttachmentType::GLRenderbuffer) {
@ -180,7 +175,7 @@ bool SharedSurface::ProdCopy(SharedSurface* src, SharedSurface* dest,
gl->BlitHelper()->BlitFramebufferToFramebuffer(
srcWrapper.FB(), destWrapper.FB(), src->mSize, dest->mSize);
return true;
return;
}
MOZ_CRASH("GFX: Unhandled dest->mAttachType 4.");

Просмотреть файл

@ -54,7 +54,7 @@ class ShSurfHandle;
class SharedSurface {
public:
static bool ProdCopy(SharedSurface* src, SharedSurface* dest,
static void ProdCopy(SharedSurface* src, SharedSurface* dest,
SurfaceFactory* factory);
const SharedSurfaceType mType;

Просмотреть файл

@ -365,13 +365,9 @@ static already_AddRefed<SharedSurfaceTextureClient> CloneSurface(
gl::SharedSurface* destSurf = dest->Surf();
destSurf->ProducerAcquire();
bool ret = SharedSurface::ProdCopy(src, dest->Surf(), factory);
SharedSurface::ProdCopy(src, dest->Surf(), factory);
destSurf->ProducerRelease();
if (!ret) {
return nullptr;
}
return dest.forget();
}