Bug 1000640 - Use new StreamTextureClient/Host with OMTC. - r=mattwoodrow
This commit is contained in:
@@ -84,61 +84,5 @@ SharedTextureClientOGL::IsAllocated() const
|
||||
return mHandle != 0;
|
||||
}
|
||||
|
||||
StreamTextureClientOGL::StreamTextureClientOGL(TextureFlags aFlags)
|
||||
: TextureClient(aFlags)
|
||||
, mIsLocked(false)
|
||||
{
|
||||
}
|
||||
|
||||
StreamTextureClientOGL::~StreamTextureClientOGL()
|
||||
{
|
||||
// the data is owned externally.
|
||||
}
|
||||
|
||||
bool
|
||||
StreamTextureClientOGL::Lock(OpenMode mode)
|
||||
{
|
||||
MOZ_ASSERT(!mIsLocked);
|
||||
if (!IsValid() || !IsAllocated()) {
|
||||
return false;
|
||||
}
|
||||
mIsLocked = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
StreamTextureClientOGL::Unlock()
|
||||
{
|
||||
MOZ_ASSERT(mIsLocked);
|
||||
mIsLocked = false;
|
||||
}
|
||||
|
||||
bool
|
||||
StreamTextureClientOGL::ToSurfaceDescriptor(SurfaceDescriptor& aOutDescriptor)
|
||||
{
|
||||
if (!IsAllocated()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
gfx::SurfaceStreamHandle handle = mStream->GetShareHandle();
|
||||
aOutDescriptor = SurfaceStreamDescriptor(handle, false);
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
StreamTextureClientOGL::InitWith(gfx::SurfaceStream* aStream)
|
||||
{
|
||||
MOZ_ASSERT(!IsAllocated());
|
||||
mStream = aStream;
|
||||
mGL = mStream->GLContext();
|
||||
}
|
||||
|
||||
bool
|
||||
StreamTextureClientOGL::IsAllocated() const
|
||||
{
|
||||
return mStream != 0;
|
||||
}
|
||||
|
||||
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user