Bug 1405110 - Part 2: Never attempts to upload to D3D11 surface in parent process. r=mattwoodrow, a=ritu
authorJean-Yves Avenard <jyavenard@mozilla.com>
Mon, 09 Oct 2017 11:10:18 +0200
changeset 432407 98a72bed57b730ae8d79d151666deafa4e3caa53
parent 432406 d0b15c72dfcd7139763f1a6637416153e5028db9
child 432408 b619b2660aa85fe3fbab1c73b2087eac3cf5207e
push id7950
push userryanvm@gmail.com
push dateThu, 12 Oct 2017 01:17:29 +0000
treeherdermozilla-beta@98a72bed57b7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow, ritu
bugs1405110
milestone57.0
Bug 1405110 - Part 2: Never attempts to upload to D3D11 surface in parent process. r=mattwoodrow, a=ritu Accessing the graphic device driver from the parent process, should the drivers crash have serious consequences (the whole browser dies). MozReview-Commit-ID: EXXRBnDobQw
dom/media/MediaData.cpp
--- a/dom/media/MediaData.cpp
+++ b/dom/media/MediaData.cpp
@@ -313,17 +313,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;