mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-15 14:25:52 +00:00
Bug 907745 - Prepare for texture locking support. r=mattwodrow
This commit is contained in:
parent
928cc3f23e
commit
baaa305040
@ -183,7 +183,7 @@ BufferTextureClient::UpdateSurface(gfxASurface* aSurface)
|
|||||||
tmpCtx->DrawSurface(aSurface, gfxSize(serializer.GetSize().width,
|
tmpCtx->DrawSurface(aSurface, gfxSize(serializer.GetSize().width,
|
||||||
serializer.GetSize().height));
|
serializer.GetSize().height));
|
||||||
|
|
||||||
if (TextureRequiresLocking(mFlags)) {
|
if (TextureRequiresLocking(mFlags) && !ImplementsLocking()) {
|
||||||
// We don't have support for proper locking yet, so we'll
|
// We don't have support for proper locking yet, so we'll
|
||||||
// have to be immutable instead.
|
// have to be immutable instead.
|
||||||
MarkImmutable();
|
MarkImmutable();
|
||||||
|
@ -111,6 +111,16 @@ public:
|
|||||||
|
|
||||||
virtual void Unlock() {}
|
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)
|
void SetID(uint64_t aID)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(mID == 0 || aID == 0);
|
MOZ_ASSERT(mID == 0 || aID == 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user