mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 907745 - Prepare for texture locking support. r=mattwodrow
This commit is contained in:
parent
a5232da6d6
commit
d24669554b
@ -183,7 +183,7 @@ BufferTextureClient::UpdateSurface(gfxASurface* aSurface)
|
||||
tmpCtx->DrawSurface(aSurface, gfxSize(serializer.GetSize().width,
|
||||
serializer.GetSize().height));
|
||||
|
||||
if (TextureRequiresLocking(mFlags)) {
|
||||
if (TextureRequiresLocking(mFlags) && !ImplementsLocking()) {
|
||||
// We don't have support for proper locking yet, so we'll
|
||||
// have to be immutable instead.
|
||||
MarkImmutable();
|
||||
|
@ -111,6 +111,16 @@ public:
|
||||
|
||||
virtual void Unlock() {}
|
||||
|
||||
/**
|
||||
* Returns true if this texture has a lock/unlock mechanism.
|
||||
* Textures that do not implement locking should be immutable or should
|
||||
* use immediate uploads (see TextureFlags in CompositorTypes.h)
|
||||
*/
|
||||
virtual bool ImplementsLocking() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void SetID(uint64_t aID)
|
||||
{
|
||||
MOZ_ASSERT(mID == 0 || aID == 0);
|
||||
|
Loading…
Reference in New Issue
Block a user