mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 863498. Get the SurfaceTexture transform every draw. r=nical
ShadowImageLayerOGL::RenderLayer used to call gl()->GetSharedHandleDetails() directly and uses that result. This makes us do something similar. As a concequence we also drop the mTextureTransform member because we are not caching it anymore. I do wonder if it would make more sense for the content thread to send the transform along with the update to make sure that it always matches. This would also make it so that we have no chance of causing a GC in the compositor to get the transform by calling through java. --HG-- extra : rebase_source : 7520870d8f0f0bb81c4acbb3b2011f8b0056d53f
This commit is contained in:
parent
2186ab5dce
commit
c75c330cdb
@ -263,7 +263,6 @@ SharedTextureHostOGL::SwapTexturesImpl(const SurfaceDescriptor& aImage,
|
||||
mTextureTarget = handleDetails.mTarget;
|
||||
mShaderProgram = handleDetails.mProgramType;
|
||||
mFormat = FormatFromShaderType(mShaderProgram);
|
||||
mTextureTransform = handleDetails.mTextureTransform;
|
||||
}
|
||||
}
|
||||
|
||||
@ -289,6 +288,20 @@ SharedTextureHostOGL::Unlock()
|
||||
mGL->fBindTexture(LOCAL_GL_TEXTURE_2D, 0);
|
||||
}
|
||||
|
||||
|
||||
gfx3DMatrix
|
||||
SharedTextureHostOGL::GetTextureTransform()
|
||||
{
|
||||
GLContext::SharedHandleDetails handleDetails;
|
||||
// GetSharedHandleDetails can call into Java which we'd
|
||||
// rather not do from the compositor
|
||||
if (mSharedHandle) {
|
||||
mGL->GetSharedHandleDetails(mShareType, mSharedHandle, handleDetails);
|
||||
}
|
||||
return handleDetails.mTextureTransform;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SurfaceStreamHostOGL::SetCompositor(Compositor* aCompositor)
|
||||
{
|
||||
|
@ -51,7 +51,7 @@ public:
|
||||
// TODO: Noone's implementing this anymore, should see if we need this.
|
||||
virtual GLenum GetTextureTarget() const { return LOCAL_GL_TEXTURE_2D; }
|
||||
virtual GLenum GetWrapMode() const = 0;// { return LOCAL_GL_CLAMP_TO_EDGE; } // default
|
||||
virtual gfx3DMatrix GetTextureTransform() const { return gfx3DMatrix(); }
|
||||
virtual gfx3DMatrix GetTextureTransform() { return gfx3DMatrix(); }
|
||||
};
|
||||
|
||||
inline gl::ShaderProgramType
|
||||
@ -360,10 +360,7 @@ public:
|
||||
gfxASurface::CONTENT_COLOR;
|
||||
}
|
||||
|
||||
virtual gfx3DMatrix GetTextureTransform() const MOZ_OVERRIDE
|
||||
{
|
||||
return mTextureTransform;
|
||||
}
|
||||
virtual gfx3DMatrix GetTextureTransform() MOZ_OVERRIDE;
|
||||
|
||||
#ifdef MOZ_LAYERS_HAVE_LOG
|
||||
virtual const char* Name() { return "SharedTextureHostOGL"; }
|
||||
@ -380,7 +377,6 @@ protected:
|
||||
gl::SharedTextureHandle mSharedHandle;
|
||||
gl::ShaderProgramType mShaderProgram;
|
||||
gl::GLContext::SharedTextureShareType mShareType;
|
||||
gfx3DMatrix mTextureTransform;
|
||||
};
|
||||
|
||||
class SurfaceStreamHostOGL : public TextureHost
|
||||
|
Loading…
Reference in New Issue
Block a user