mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 1313281 - Part 4: Remove Fence parameter from TextureData::Lock. r=sotaro
This commit is contained in:
parent
cd3c3b3268
commit
56b15734eb
@ -43,7 +43,7 @@ public:
|
||||
YUVColorSpace aYUVColorSpace,
|
||||
TextureFlags aTextureFlags);
|
||||
|
||||
virtual bool Lock(OpenMode aMode, FenceHandle*) override { return true; }
|
||||
virtual bool Lock(OpenMode aMode) override { return true; }
|
||||
|
||||
virtual void Unlock() override {}
|
||||
|
||||
|
@ -18,7 +18,7 @@ namespace layers {
|
||||
class DIBTextureData : public TextureData
|
||||
{
|
||||
public:
|
||||
virtual bool Lock(OpenMode, FenceHandle*) override { return true; }
|
||||
virtual bool Lock(OpenMode) override { return true; }
|
||||
|
||||
virtual void Unlock() override {}
|
||||
|
||||
|
@ -34,7 +34,7 @@ X11TextureData::X11TextureData(gfx::IntSize aSize, gfx::SurfaceFormat aFormat,
|
||||
}
|
||||
|
||||
bool
|
||||
X11TextureData::Lock(OpenMode aMode, FenceHandle*)
|
||||
X11TextureData::Lock(OpenMode aMode)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ public:
|
||||
|
||||
virtual bool Serialize(SurfaceDescriptor& aOutDescriptor) override;
|
||||
|
||||
virtual bool Lock(OpenMode aMode, FenceHandle*) override;
|
||||
virtual bool Lock(OpenMode aMode) override;
|
||||
|
||||
virtual void Unlock() override;
|
||||
|
||||
|
@ -24,7 +24,7 @@ public:
|
||||
|
||||
virtual void FillInfo(TextureData::Info& aInfo) const override;
|
||||
|
||||
virtual bool Lock(OpenMode, FenceHandle*) override { return true; };
|
||||
virtual bool Lock(OpenMode) override { return true; };
|
||||
|
||||
virtual void Unlock() override {};
|
||||
|
||||
|
@ -498,8 +498,7 @@ TextureClient::Lock(OpenMode aMode)
|
||||
|
||||
LockActor();
|
||||
|
||||
FenceHandle* fence = (mReleaseFenceHandle.IsValid() && (aMode & OpenMode::OPEN_WRITE)) ? &mReleaseFenceHandle : nullptr;
|
||||
mIsLocked = mData->Lock(aMode, fence);
|
||||
mIsLocked = mData->Lock(aMode);
|
||||
mOpenMode = aMode;
|
||||
|
||||
auto format = GetFormat();
|
||||
|
@ -260,7 +260,7 @@ public:
|
||||
|
||||
virtual void FillInfo(TextureData::Info& aInfo) const = 0;
|
||||
|
||||
virtual bool Lock(OpenMode aMode, FenceHandle* aFence) = 0;
|
||||
virtual bool Lock(OpenMode aMode) = 0;
|
||||
|
||||
virtual void Unlock() = 0;
|
||||
|
||||
@ -583,18 +583,6 @@ public:
|
||||
*/
|
||||
void Destroy(bool sync = false);
|
||||
|
||||
virtual void SetReleaseFenceHandle(const FenceHandle& aReleaseFenceHandle)
|
||||
{
|
||||
mReleaseFenceHandle.Merge(aReleaseFenceHandle);
|
||||
}
|
||||
|
||||
virtual FenceHandle GetAndResetReleaseFenceHandle()
|
||||
{
|
||||
FenceHandle fence;
|
||||
mReleaseFenceHandle.TransferToAnotherFenceHandle(fence);
|
||||
return fence;
|
||||
}
|
||||
|
||||
/**
|
||||
* Track how much of this texture is wasted.
|
||||
* For example we might allocate a 256x256 tile but only use 10x10.
|
||||
@ -722,7 +710,6 @@ protected:
|
||||
RefPtr<gfx::DrawTarget> mBorrowedDrawTarget;
|
||||
|
||||
TextureFlags mFlags;
|
||||
FenceHandle mReleaseFenceHandle;
|
||||
|
||||
gl::GfxTextureWasteTracker mWasteTracker;
|
||||
|
||||
|
@ -40,7 +40,7 @@ public:
|
||||
|
||||
~SharedSurfaceTextureData();
|
||||
|
||||
virtual bool Lock(OpenMode, FenceHandle*) override { return false; }
|
||||
virtual bool Lock(OpenMode) override { return false; }
|
||||
|
||||
virtual void Unlock() override {}
|
||||
|
||||
|
@ -249,7 +249,7 @@ D3D11TextureData::~D3D11TextureData()
|
||||
// when it calls EndDraw. This EndDraw should not execute anything so it
|
||||
// shouldn't -really- need the lock but the debug layer chokes on this.
|
||||
if (mDrawTarget) {
|
||||
Lock(OpenMode::OPEN_NONE, nullptr);
|
||||
Lock(OpenMode::OPEN_NONE);
|
||||
mDrawTarget = nullptr;
|
||||
Unlock();
|
||||
}
|
||||
@ -257,7 +257,7 @@ D3D11TextureData::~D3D11TextureData()
|
||||
}
|
||||
|
||||
bool
|
||||
D3D11TextureData::Lock(OpenMode aMode, FenceHandle*)
|
||||
D3D11TextureData::Lock(OpenMode aMode)
|
||||
{
|
||||
if (!LockD3DTexture(mTexture.get())) {
|
||||
return false;
|
||||
|
@ -65,7 +65,7 @@ public:
|
||||
|
||||
virtual bool UpdateFromSurface(gfx::SourceSurface* aSurface) override;
|
||||
|
||||
virtual bool Lock(OpenMode aMode, FenceHandle*) override;
|
||||
virtual bool Lock(OpenMode aMode) override;
|
||||
|
||||
virtual void Unlock() override;
|
||||
|
||||
@ -77,7 +77,6 @@ public:
|
||||
TextureFlags aFlags,
|
||||
TextureAllocationFlags aAllocFlags) const override;
|
||||
|
||||
// TODO - merge this with the FenceHandle API!
|
||||
virtual void SyncWithObject(SyncObject* aSync) override;
|
||||
|
||||
ID3D11Texture2D* GetD3D11Texture() { return mTexture; }
|
||||
@ -136,7 +135,7 @@ public:
|
||||
const gfx::IntSize& aSizeY,
|
||||
const gfx::IntSize& aSizeCbCr);
|
||||
|
||||
virtual bool Lock(OpenMode, FenceHandle*) override { return true; }
|
||||
virtual bool Lock(OpenMode) override { return true; }
|
||||
|
||||
virtual void Unlock() override {}
|
||||
|
||||
|
@ -610,7 +610,7 @@ D3D9TextureData::FillInfo(TextureData::Info& aInfo) const
|
||||
}
|
||||
|
||||
bool
|
||||
D3D9TextureData::Lock(OpenMode aMode, FenceHandle*)
|
||||
D3D9TextureData::Lock(OpenMode aMode)
|
||||
{
|
||||
if (!DeviceManagerD3D9::GetDevice()) {
|
||||
// If the device has failed then we should not lock the surface,
|
||||
|
@ -178,7 +178,7 @@ public:
|
||||
|
||||
virtual bool Serialize(SurfaceDescriptor& aOutDescrptor) override;
|
||||
|
||||
virtual bool Lock(OpenMode aMode, FenceHandle*) override;
|
||||
virtual bool Lock(OpenMode aMode) override;
|
||||
|
||||
virtual void Unlock() override;
|
||||
|
||||
@ -227,7 +227,7 @@ public:
|
||||
|
||||
virtual void FillInfo(TextureData::Info& aInfo) const override;
|
||||
|
||||
virtual bool Lock(OpenMode, FenceHandle*) override { return true; }
|
||||
virtual bool Lock(OpenMode) override { return true; }
|
||||
|
||||
virtual void Unlock() override {}
|
||||
|
||||
|
@ -76,7 +76,7 @@ MacIOSurfaceTextureData::FillInfo(TextureData::Info& aInfo) const
|
||||
}
|
||||
|
||||
bool
|
||||
MacIOSurfaceTextureData::Lock(OpenMode, FenceHandle*)
|
||||
MacIOSurfaceTextureData::Lock(OpenMode)
|
||||
{
|
||||
mSurface->Lock(false);
|
||||
return true;
|
||||
|
@ -27,7 +27,7 @@ public:
|
||||
|
||||
virtual void FillInfo(TextureData::Info& aInfo) const override;
|
||||
|
||||
virtual bool Lock(OpenMode, FenceHandle*) override;
|
||||
virtual bool Lock(OpenMode) override;
|
||||
|
||||
virtual void Unlock() override;
|
||||
|
||||
|
@ -37,7 +37,7 @@ public:
|
||||
virtual void Forget(LayersIPCChannel*) override { mImage = nullptr; }
|
||||
|
||||
// Unused functions.
|
||||
virtual bool Lock(OpenMode, FenceHandle*) override { return true; }
|
||||
virtual bool Lock(OpenMode) override { return true; }
|
||||
|
||||
virtual void Unlock() override {}
|
||||
|
||||
@ -67,7 +67,7 @@ public:
|
||||
virtual bool Serialize(SurfaceDescriptor& aOutDescriptor) override;
|
||||
|
||||
// Useless functions.
|
||||
virtual bool Lock(OpenMode, FenceHandle*) override { return true; }
|
||||
virtual bool Lock(OpenMode) override { return true; }
|
||||
|
||||
virtual void Unlock() override {}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user