mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Bug 858039 - Make SurfaceStream_TripleBuffer_Async use the correct SurfaceStreamType. r=jgilbert
This commit is contained in:
parent
0712bf1b4a
commit
4a87c9099a
@ -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);
|
||||
|
@ -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()
|
||||
|
@ -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.");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user