зеркало из https://github.com/mozilla/gecko-dev.git
Add an RAII helper for read-unlocking textures. (bug 1365879 part 15, r=mattwoodrow)
This commit is contained in:
Родитель
9467c3d33c
Коммит
5c3229c7cc
|
@ -102,11 +102,25 @@ public:
|
|||
// used to composite).
|
||||
virtual bool IsValid() const = 0;
|
||||
|
||||
public:
|
||||
class MOZ_STACK_CLASS AutoReadUnlockTextures
|
||||
{
|
||||
public:
|
||||
explicit AutoReadUnlockTextures(TextureSourceProvider* aProvider)
|
||||
: mProvider(aProvider)
|
||||
{}
|
||||
~AutoReadUnlockTextures() {
|
||||
mProvider->ReadUnlockTextures();
|
||||
}
|
||||
|
||||
private:
|
||||
RefPtr<TextureSourceProvider> mProvider;
|
||||
};
|
||||
|
||||
protected:
|
||||
// Should be called at the end of each composition.
|
||||
void ReadUnlockTextures();
|
||||
|
||||
protected:
|
||||
virtual ~TextureSourceProvider();
|
||||
|
||||
private:
|
||||
|
|
Загрузка…
Ссылка в новой задаче