зеркало из https://github.com/mozilla/pjs.git
Bug 739679 - Part 6: Fix unlocking gfxReusableSurface. r=pcwalton
This commit is contained in:
Родитель
e62af607e0
Коммит
8946afadc7
|
@ -116,8 +116,6 @@ protected:
|
|||
int mRetainedHeight; // in tiles
|
||||
|
||||
private:
|
||||
TiledLayerBuffer(const TiledLayerBuffer&) MOZ_DELETE;
|
||||
|
||||
const Derived& AsDerived() const { return *static_cast<const Derived*>(this); }
|
||||
Derived& AsDerived() { return *static_cast<Derived*>(this); }
|
||||
|
||||
|
|
|
@ -79,6 +79,9 @@ class BasicTiledLayerBuffer : public TiledLayerBuffer<BasicTiledLayerBuffer, Bas
|
|||
friend class TiledLayerBuffer<BasicTiledLayerBuffer, BasicTiledLayerTile>;
|
||||
|
||||
public:
|
||||
BasicTiledLayerBuffer()
|
||||
{}
|
||||
|
||||
void PaintThebes(BasicTiledThebesLayer* aLayer,
|
||||
const nsIntRegion& aNewValidRegion,
|
||||
const nsIntRegion& aPaintRegion,
|
||||
|
|
|
@ -136,6 +136,12 @@ TiledThebesLayerOGL::ProcessUploadQueue()
|
|||
mValidRegion = mVideoMemoryTiledBuffer.GetValidRegion();
|
||||
|
||||
mMainMemoryTiledBuffer.ReadUnlock();
|
||||
// Release all the tiles by replacing the tile buffer with an empty
|
||||
// tiled buffer. This will prevent us from doing a double unlock when
|
||||
// calling ~TiledThebesLayerOGL.
|
||||
// FIXME: This wont be needed when we do progressive upload and lock
|
||||
// tile by tile.
|
||||
mMainMemoryTiledBuffer = BasicTiledLayerBuffer();
|
||||
mRegionToUpload = nsIntRegion();
|
||||
|
||||
}
|
||||
|
|
|
@ -48,6 +48,7 @@ void
|
|||
gfxReusableSurfaceWrapper::ReadUnlock()
|
||||
{
|
||||
PR_ATOMIC_DECREMENT(&mReadCount);
|
||||
NS_ABORT_IF_FALSE(mReadCount >= 0, "Should not be negative");
|
||||
}
|
||||
|
||||
gfxReusableSurfaceWrapper*
|
||||
|
|
Загрузка…
Ссылка в новой задаче