Bug 1417373 - Add initialize setting to texture Cb's property description; r=jya
authorKevin Chen <kechen@mozilla.com>
Wed, 15 Nov 2017 18:13:12 +0800
changeset 392068 f28b8bb46e765b7d8d2a8969b383b1415b3cd87e
parent 392067 882aabb22057d9420b5f3fee98bea4719799ccc2
child 392069 962c46110aac6f795ff1eba03856a6e671700179
push id32910
push userrgurzau@mozilla.com
push dateThu, 16 Nov 2017 10:02:59 +0000
treeherdermozilla-central@9941e68b5a53 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjya
bugs1417373
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1417373 - Add initialize setting to texture Cb's property description; r=jya MozReview-Commit-ID: DzIx5vdIE48
gfx/layers/D3D11YCbCrImage.cpp
--- a/gfx/layers/D3D11YCbCrImage.cpp
+++ b/gfx/layers/D3D11YCbCrImage.cpp
@@ -201,16 +201,23 @@ D3D11YCbCrImage::GetAsSourceSurface()
 
   texCb->GetDesc(&desc);
   desc.BindFlags = 0;
   desc.MiscFlags = 0;
   desc.CPUAccessFlags = D3D11_CPU_ACCESS_READ;
   desc.Usage = D3D11_USAGE_STAGING;
 
   dev->CreateTexture2D(&desc, nullptr, getter_AddRefs(softTexCb));
+
+  texCr->GetDesc(&desc);
+  desc.BindFlags = 0;
+  desc.MiscFlags = 0;
+  desc.CPUAccessFlags = D3D11_CPU_ACCESS_READ;
+  desc.Usage = D3D11_USAGE_STAGING;
+
   dev->CreateTexture2D(&desc, nullptr, getter_AddRefs(softTexCr));
 
   RefPtr<ID3D11DeviceContext> ctx;
   dev->GetImmediateContext(getter_AddRefs(ctx));
   if (!ctx) {
     gfxCriticalError() << "Failed to get immediate context.";
     return nullptr;
   }