Bug 858039 - Make SurfaceStream_TripleBuffer_Async use the correct SurfaceStreamType. r=jgilbert

This commit is contained in:
James Willcox 2013-04-05 07:30:00 -04:00
parent 0712bf1b4a
commit 4a87c9099a
3 changed files with 5 additions and 3 deletions

View File

@ -315,7 +315,7 @@ GLScreenBuffer::Morph(SurfaceFactory_GL* newFactory, SurfaceStreamType streamTyp
mFactory = newFactory;
}
if (mStream->mType == streamType)
if (mStream->Type() == streamType)
return;
SurfaceStream* newStream = SurfaceStream::CreateForType(streamType, mStream);

View File

@ -433,6 +433,7 @@ SurfaceStream_TripleBuffer::SwapConsumer_NoWait()
SurfaceStream_TripleBuffer_Async::SurfaceStream_TripleBuffer_Async(SurfaceStream* prevStream)
: SurfaceStream_TripleBuffer(prevStream)
{
mType = SurfaceStreamType::TripleBuffer_Async;
}
SurfaceStream_TripleBuffer_Async::~SurfaceStream_TripleBuffer_Async()

View File

@ -41,10 +41,11 @@ public:
return (SurfaceStream*)handle;
}
const SurfaceStreamType mType;
SurfaceStreamType Type() { return mType; }
protected:
// |mProd| is owned by us, but can be ripped away when
// creating a new GLStream from this one.
SurfaceStreamType mType;
SharedSurface* mProducer;
std::set<SharedSurface*> mSurfaces;
std::stack<SharedSurface*> mScraps;
@ -59,7 +60,7 @@ protected:
, mMonitor("SurfaceStream monitor")
, mIsAlive(true)
{
MOZ_ASSERT(!prevStream || mType != prevStream->mType,
MOZ_ASSERT(!prevStream || mType != prevStream->Type(),
"We should not need to create a SurfaceStream from another "
"of the same type.");
}