Bug 1313281 - Part 4: Remove Fence parameter from TextureData::Lock. r=sotaro

This commit is contained in:
Matt Woodrow 2016-10-27 21:02:09 +13:00
Родитель cd3c3b3268
Коммит 56b15734eb
15 изменённых файлов: 19 добавлений и 34 удалений

Просмотреть файл

@ -43,7 +43,7 @@ public:
YUVColorSpace aYUVColorSpace, YUVColorSpace aYUVColorSpace,
TextureFlags aTextureFlags); TextureFlags aTextureFlags);
virtual bool Lock(OpenMode aMode, FenceHandle*) override { return true; } virtual bool Lock(OpenMode aMode) override { return true; }
virtual void Unlock() override {} virtual void Unlock() override {}

Просмотреть файл

@ -18,7 +18,7 @@ namespace layers {
class DIBTextureData : public TextureData class DIBTextureData : public TextureData
{ {
public: public:
virtual bool Lock(OpenMode, FenceHandle*) override { return true; } virtual bool Lock(OpenMode) override { return true; }
virtual void Unlock() override {} virtual void Unlock() override {}

Просмотреть файл

@ -34,7 +34,7 @@ X11TextureData::X11TextureData(gfx::IntSize aSize, gfx::SurfaceFormat aFormat,
} }
bool bool
X11TextureData::Lock(OpenMode aMode, FenceHandle*) X11TextureData::Lock(OpenMode aMode)
{ {
return true; return true;
} }

Просмотреть файл

@ -21,7 +21,7 @@ public:
virtual bool Serialize(SurfaceDescriptor& aOutDescriptor) override; virtual bool Serialize(SurfaceDescriptor& aOutDescriptor) override;
virtual bool Lock(OpenMode aMode, FenceHandle*) override; virtual bool Lock(OpenMode aMode) override;
virtual void Unlock() override; virtual void Unlock() override;

Просмотреть файл

@ -24,7 +24,7 @@ public:
virtual void FillInfo(TextureData::Info& aInfo) const override; 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 {}; virtual void Unlock() override {};

Просмотреть файл

@ -498,8 +498,7 @@ TextureClient::Lock(OpenMode aMode)
LockActor(); LockActor();
FenceHandle* fence = (mReleaseFenceHandle.IsValid() && (aMode & OpenMode::OPEN_WRITE)) ? &mReleaseFenceHandle : nullptr; mIsLocked = mData->Lock(aMode);
mIsLocked = mData->Lock(aMode, fence);
mOpenMode = aMode; mOpenMode = aMode;
auto format = GetFormat(); auto format = GetFormat();

Просмотреть файл

@ -260,7 +260,7 @@ public:
virtual void FillInfo(TextureData::Info& aInfo) const = 0; 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; virtual void Unlock() = 0;
@ -583,18 +583,6 @@ public:
*/ */
void Destroy(bool sync = false); 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. * Track how much of this texture is wasted.
* For example we might allocate a 256x256 tile but only use 10x10. * For example we might allocate a 256x256 tile but only use 10x10.
@ -722,7 +710,6 @@ protected:
RefPtr<gfx::DrawTarget> mBorrowedDrawTarget; RefPtr<gfx::DrawTarget> mBorrowedDrawTarget;
TextureFlags mFlags; TextureFlags mFlags;
FenceHandle mReleaseFenceHandle;
gl::GfxTextureWasteTracker mWasteTracker; gl::GfxTextureWasteTracker mWasteTracker;

Просмотреть файл

@ -40,7 +40,7 @@ public:
~SharedSurfaceTextureData(); ~SharedSurfaceTextureData();
virtual bool Lock(OpenMode, FenceHandle*) override { return false; } virtual bool Lock(OpenMode) override { return false; }
virtual void Unlock() override {} virtual void Unlock() override {}

Просмотреть файл

@ -249,7 +249,7 @@ D3D11TextureData::~D3D11TextureData()
// when it calls EndDraw. This EndDraw should not execute anything so it // 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. // shouldn't -really- need the lock but the debug layer chokes on this.
if (mDrawTarget) { if (mDrawTarget) {
Lock(OpenMode::OPEN_NONE, nullptr); Lock(OpenMode::OPEN_NONE);
mDrawTarget = nullptr; mDrawTarget = nullptr;
Unlock(); Unlock();
} }
@ -257,7 +257,7 @@ D3D11TextureData::~D3D11TextureData()
} }
bool bool
D3D11TextureData::Lock(OpenMode aMode, FenceHandle*) D3D11TextureData::Lock(OpenMode aMode)
{ {
if (!LockD3DTexture(mTexture.get())) { if (!LockD3DTexture(mTexture.get())) {
return false; return false;

Просмотреть файл

@ -65,7 +65,7 @@ public:
virtual bool UpdateFromSurface(gfx::SourceSurface* aSurface) override; virtual bool UpdateFromSurface(gfx::SourceSurface* aSurface) override;
virtual bool Lock(OpenMode aMode, FenceHandle*) override; virtual bool Lock(OpenMode aMode) override;
virtual void Unlock() override; virtual void Unlock() override;
@ -77,7 +77,6 @@ public:
TextureFlags aFlags, TextureFlags aFlags,
TextureAllocationFlags aAllocFlags) const override; TextureAllocationFlags aAllocFlags) const override;
// TODO - merge this with the FenceHandle API!
virtual void SyncWithObject(SyncObject* aSync) override; virtual void SyncWithObject(SyncObject* aSync) override;
ID3D11Texture2D* GetD3D11Texture() { return mTexture; } ID3D11Texture2D* GetD3D11Texture() { return mTexture; }
@ -136,7 +135,7 @@ public:
const gfx::IntSize& aSizeY, const gfx::IntSize& aSizeY,
const gfx::IntSize& aSizeCbCr); const gfx::IntSize& aSizeCbCr);
virtual bool Lock(OpenMode, FenceHandle*) override { return true; } virtual bool Lock(OpenMode) override { return true; }
virtual void Unlock() override {} virtual void Unlock() override {}

Просмотреть файл

@ -610,7 +610,7 @@ D3D9TextureData::FillInfo(TextureData::Info& aInfo) const
} }
bool bool
D3D9TextureData::Lock(OpenMode aMode, FenceHandle*) D3D9TextureData::Lock(OpenMode aMode)
{ {
if (!DeviceManagerD3D9::GetDevice()) { if (!DeviceManagerD3D9::GetDevice()) {
// If the device has failed then we should not lock the surface, // 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 Serialize(SurfaceDescriptor& aOutDescrptor) override;
virtual bool Lock(OpenMode aMode, FenceHandle*) override; virtual bool Lock(OpenMode aMode) override;
virtual void Unlock() override; virtual void Unlock() override;
@ -227,7 +227,7 @@ public:
virtual void FillInfo(TextureData::Info& aInfo) const override; 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 {} virtual void Unlock() override {}

Просмотреть файл

@ -76,7 +76,7 @@ MacIOSurfaceTextureData::FillInfo(TextureData::Info& aInfo) const
} }
bool bool
MacIOSurfaceTextureData::Lock(OpenMode, FenceHandle*) MacIOSurfaceTextureData::Lock(OpenMode)
{ {
mSurface->Lock(false); mSurface->Lock(false);
return true; return true;

Просмотреть файл

@ -27,7 +27,7 @@ public:
virtual void FillInfo(TextureData::Info& aInfo) const override; virtual void FillInfo(TextureData::Info& aInfo) const override;
virtual bool Lock(OpenMode, FenceHandle*) override; virtual bool Lock(OpenMode) override;
virtual void Unlock() override; virtual void Unlock() override;

Просмотреть файл

@ -37,7 +37,7 @@ public:
virtual void Forget(LayersIPCChannel*) override { mImage = nullptr; } virtual void Forget(LayersIPCChannel*) override { mImage = nullptr; }
// Unused functions. // Unused functions.
virtual bool Lock(OpenMode, FenceHandle*) override { return true; } virtual bool Lock(OpenMode) override { return true; }
virtual void Unlock() override {} virtual void Unlock() override {}
@ -67,7 +67,7 @@ public:
virtual bool Serialize(SurfaceDescriptor& aOutDescriptor) override; virtual bool Serialize(SurfaceDescriptor& aOutDescriptor) override;
// Useless functions. // Useless functions.
virtual bool Lock(OpenMode, FenceHandle*) override { return true; } virtual bool Lock(OpenMode) override { return true; }
virtual void Unlock() override {} virtual void Unlock() override {}