Backed out 9 changesets (bug 1014614) for Android mochitest bustage on a CLOSED TREE

Backed out changeset 40f99ba7f616 (bug 1014614)
Backed out changeset 8fbc3c85adfc (bug 1014614)
Backed out changeset 40dbd7c6ce65 (bug 1014614)
Backed out changeset f2b504bdd7c5 (bug 1014614)
Backed out changeset c878e29fbef9 (bug 1014614)
Backed out changeset 511dcc817f5d (bug 1014614)
Backed out changeset 2b72e71f1fdf (bug 1014614)
Backed out changeset 8b530a9a2f99 (bug 1014614)
Backed out changeset 7fa1b78de684 (bug 1014614)
This commit is contained in:
Wes Kocher
2014-10-17 16:34:01 -07:00
parent c6f1349170
commit fc6c88a0cd
39 changed files with 394 additions and 3970 deletions

View File

@@ -23,7 +23,7 @@
#include "mozilla/layers/GrallocTextureHost.h"
#include "nsPoint.h" // for nsIntPoint
#include "nsRegion.h" // for nsIntRegion
#include "AndroidSurfaceTexture.h"
#include "nsSurfaceTexture.h"
#include "GfxTexturesReporter.h" // for GfxTexturesReporter
#include "GLBlitTextureImageHelper.h"
#ifdef XP_MACOSX
@@ -58,7 +58,7 @@ CreateTextureHostOGL(const SurfaceDescriptor& aDesc,
case SurfaceDescriptor::TSurfaceTextureDescriptor: {
const SurfaceTextureDescriptor& desc = aDesc.get_SurfaceTextureDescriptor();
result = new SurfaceTextureHost(aFlags,
(AndroidSurfaceTexture*)desc.surfTex(),
(nsSurfaceTexture*)desc.surfTex(),
desc.size());
break;
}
@@ -429,7 +429,7 @@ GLTextureSource::gl() const
#ifdef MOZ_WIDGET_ANDROID
SurfaceTextureSource::SurfaceTextureSource(CompositorOGL* aCompositor,
AndroidSurfaceTexture* aSurfTex,
nsSurfaceTexture* aSurfTex,
gfx::SurfaceFormat aFormat,
GLenum aTarget,
GLenum aWrapMode,
@@ -450,8 +450,10 @@ SurfaceTextureSource::BindTexture(GLenum aTextureUnit, gfx::Filter aFilter)
NS_WARNING("Trying to bind a texture without a GLContext");
return;
}
GLuint tex = mCompositor->GetTemporaryTexture(GetTextureTarget(), aTextureUnit);
gl()->fActiveTexture(aTextureUnit);
gl()->fBindTexture(mTextureTarget, tex);
#ifndef DEBUG
// SurfaceTexture spams us if there are any existing GL errors, so
// we'll clear them here in order to avoid that.
@@ -496,7 +498,7 @@ SurfaceTextureSource::GetTextureTransform()
////////////////////////////////////////////////////////////////////////
SurfaceTextureHost::SurfaceTextureHost(TextureFlags aFlags,
AndroidSurfaceTexture* aSurfTex,
nsSurfaceTexture* aSurfTex,
gfx::IntSize aSize)
: TextureHost(aFlags)
, mSurfTex(aSurfTex)
@@ -534,15 +536,12 @@ SurfaceTextureHost::Lock()
mSize);
}
mSurfTex->Attach(gl());
return true;
}
void
SurfaceTextureHost::Unlock()
{
mSurfTex->Detach();
}
void