Bug 1405110 - P2. Never attempts to upload to D3D11 surface in parent process. r?mattwoodrow
Accessing the graphic device driver from the parent process, should the drivers crash have serious consequences (the whole browser dies).
MozReview-Commit-ID: EXXRBnDobQw
--- a/dom/media/MediaData.cpp
+++ b/dom/media/MediaData.cpp
@@ -314,17 +314,18 @@ VideoData::CreateAndCopyData(const Video
aKeyframe,
aTimecode,
aInfo.mDisplay,
0));
// Currently our decoder only knows how to output to ImageFormat::PLANAR_YCBCR
// format.
#if XP_WIN
- if (aAllocator && aAllocator->GetCompositorBackendType()
+ if (!XRE_IsParentProcess() &&
+ aAllocator && aAllocator->GetCompositorBackendType()
== layers::LayersBackend::LAYERS_D3D11) {
RefPtr<layers::D3D11YCbCrImage> d3d11Image = new layers::D3D11YCbCrImage();
PlanarYCbCrData data = ConstructPlanarYCbCrData(aInfo, aBuffer, aPicture);
if (d3d11Image->SetData(layers::ImageBridgeChild::GetSingleton()
? layers::ImageBridgeChild::GetSingleton().get()
: aAllocator,
aContainer, data)) {
v->mImage = d3d11Image;