Bug 916116 - Rename CompositableQuirks. r=bjacob

This commit is contained in:
Nicolas Silva
2013-09-30 14:14:38 +02:00
parent 7d0acbda8f
commit d0bc2a62fe
9 changed files with 57 additions and 52 deletions

View File

@@ -41,11 +41,11 @@ namespace layers {
class Compositor;
TemporaryRef<CompositableQuirks>
CreateCompositableQuirksOGL()
TemporaryRef<CompositableBackendSpecificData>
CreateCompositableBackendSpecificDataOGL()
{
#ifdef MOZ_WIDGET_GONK
return new CompositableQuirksGonkOGL();
return new CompositableDataGonkOGL();
#else
return nullptr;
#endif
@@ -166,27 +166,27 @@ WrapMode(gl::GLContext *aGl, bool aAllowRepeat)
return LOCAL_GL_CLAMP_TO_EDGE;
}
CompositableQuirksGonkOGL::CompositableQuirksGonkOGL()
CompositableDataGonkOGL::CompositableDataGonkOGL()
: mTexture(0)
{
}
CompositableQuirksGonkOGL::~CompositableQuirksGonkOGL()
CompositableDataGonkOGL::~CompositableDataGonkOGL()
{
DeleteTextureIfPresent();
}
gl::GLContext*
CompositableQuirksGonkOGL::gl() const
CompositableDataGonkOGL::gl() const
{
return mCompositor ? mCompositor->gl() : nullptr;
}
void CompositableQuirksGonkOGL::SetCompositor(Compositor* aCompositor)
void CompositableDataGonkOGL::SetCompositor(Compositor* aCompositor)
{
mCompositor = static_cast<CompositorOGL*>(aCompositor);
}
GLuint CompositableQuirksGonkOGL::GetTexture()
GLuint CompositableDataGonkOGL::GetTexture()
{
if (!mTexture) {
gl()->MakeCurrent();
@@ -196,7 +196,7 @@ GLuint CompositableQuirksGonkOGL::GetTexture()
}
void
CompositableQuirksGonkOGL::DeleteTextureIfPresent()
CompositableDataGonkOGL::DeleteTextureIfPresent()
{
if (mTexture) {
gl()->MakeCurrent();
@@ -507,7 +507,7 @@ TextureImageDeprecatedTextureHostOGL::UpdateImpl(const SurfaceDescriptor& aImage
}
#ifdef MOZ_WIDGET_GONK
if (mQuirks) {
if (mCompositableBackendData) {
// on gonk, this class is used as a fallback from gralloc buffer.
// There is a case this class is used with GrallocDeprecatedTextureHostOGL
// under same CompositableHost. if it happens, a gralloc buffer of
@@ -515,7 +515,7 @@ TextureImageDeprecatedTextureHostOGL::UpdateImpl(const SurfaceDescriptor& aImage
// when the gralloc buffer is not rendered.
// Establish the unbound by deleting the texture.
// See Bug 916264.
static_cast<CompositableQuirksGonkOGL*>(mQuirks.get())->DeleteTextureIfPresent();
static_cast<CompositableDataGonkOGL*>(mCompositableBackendData.get())->DeleteTextureIfPresent();
}
#endif
@@ -1268,8 +1268,8 @@ GrallocDeprecatedTextureHostOGL::GetRenderState()
GLuint
GrallocDeprecatedTextureHostOGL::GetGLTexture()
{
mQuirks->SetCompositor(mCompositor);
return static_cast<CompositableQuirksGonkOGL*>(mQuirks.get())->GetTexture();
mCompositableBackendData->SetCompositor(mCompositor);
return static_cast<CompositableDataGonkOGL*>(mCompositableBackendData.get())->GetTexture();
}
#endif // MOZ_WIDGET_GONK