зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1373229: P1. Disable IMFYCbCrImage when ID3D10Multithread isn't supported. r=jya
MozReview-Commit-ID: 9zzUJ0utqQm --HG-- extra : rebase_source : f13c93f8845a1630490e173ac37e948b8c03b6ff
This commit is contained in:
Родитель
ca19a06246
Коммит
3f9301d589
|
@ -21,6 +21,7 @@
|
|||
#include "gfx2DGlue.h"
|
||||
#include "gfxPrefs.h"
|
||||
#include "gfxWindowsPlatform.h"
|
||||
#include "mozilla/gfx/DeviceManagerDx.h"
|
||||
#include "mozilla/AbstractThread.h"
|
||||
#include "mozilla/ClearOnShutdown.h"
|
||||
#include "mozilla/Logging.h"
|
||||
|
@ -610,6 +611,22 @@ WMFVideoMFTManager::InitInternal()
|
|||
mVideoInfo.mDisplay.width,
|
||||
mVideoInfo.mDisplay.height);
|
||||
|
||||
if (!mUseHwAccel) {
|
||||
RefPtr<ID3D11Device> device =
|
||||
gfx::DeviceManagerDx::Get()->GetCompositorDevice();
|
||||
if (!device) {
|
||||
device = gfx::DeviceManagerDx::Get()->GetContentDevice();
|
||||
}
|
||||
if (device) {
|
||||
RefPtr<ID3D10Multithread> multi;
|
||||
HRESULT hr =
|
||||
device->QueryInterface((ID3D10Multithread**)getter_AddRefs(multi));
|
||||
if (SUCCEEDED(hr) && multi) {
|
||||
multi->SetMultithreadProtected(TRUE);
|
||||
mIMFUsable = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -840,7 +857,7 @@ WMFVideoMFTManager::CreateBasicVideoFrame(IMFSample* aSample,
|
|||
nsIntRect pictureRegion = mVideoInfo.ScaledImageRect(videoWidth, videoHeight);
|
||||
|
||||
LayersBackend backend = GetCompositorBackendType(mKnowsCompositor);
|
||||
if (backend != LayersBackend::LAYERS_D3D11) {
|
||||
if (backend != LayersBackend::LAYERS_D3D11 || !mIMFUsable) {
|
||||
RefPtr<VideoData> v =
|
||||
VideoData::CreateAndCopyData(mVideoInfo,
|
||||
mImageContainer,
|
||||
|
|
|
@ -121,6 +121,7 @@ private:
|
|||
bool mGotValidOutputAfterNullOutput = false;
|
||||
bool mGotExcessiveNullOutput = false;
|
||||
bool mIsValid = true;
|
||||
bool mIMFUsable = false;
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
|
Загрузка…
Ссылка в новой задаче