зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1675876 - Make RenderBufferTextureHostSWGL::RenderBufferTextureHostSWGL() fallible r=mattwoodrow
When ShmemTextureHost does not have valid Shmem, RenderBufferTextureHostSWGL::mBuffer is nullptr. RenderBufferTextureHost and RenderExternalTextureHost handle it as fallible. Differential Revision: https://phabricator.services.mozilla.com/D103427
This commit is contained in:
Родитель
ea86c0a39e
Коммит
d26e04b806
|
@ -20,7 +20,6 @@ RenderBufferTextureHostSWGL::RenderBufferTextureHostSWGL(
|
|||
switch (mDescriptor.type()) {
|
||||
case layers::BufferDescriptor::TYCbCrDescriptor:
|
||||
case layers::BufferDescriptor::TRGBDescriptor:
|
||||
MOZ_RELEASE_ASSERT(mBuffer != nullptr);
|
||||
break;
|
||||
default:
|
||||
gfxCriticalError() << "Bad buffer host descriptor "
|
||||
|
@ -72,6 +71,12 @@ gfx::YUVColorSpace RenderBufferTextureHostSWGL::GetYUVColorSpace() const {
|
|||
bool RenderBufferTextureHostSWGL::MapPlane(RenderCompositor* aCompositor,
|
||||
uint8_t aChannelIndex,
|
||||
PlaneInfo& aPlaneInfo) {
|
||||
if (!mBuffer) {
|
||||
// We hit some problems to get the shmem.
|
||||
gfxCriticalNote << "GetBuffer Failed";
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (mDescriptor.type()) {
|
||||
case layers::BufferDescriptor::TYCbCrDescriptor: {
|
||||
const layers::YCbCrDescriptor& desc = mDescriptor.get_YCbCrDescriptor();
|
||||
|
|
Загрузка…
Ссылка в новой задаче