Add D3D9 support to the GPU process. (bug 1297182 part 2, r=mattwoodrow)

--HG--
extra : rebase_source : 95364a97c1f0a65eab60f34f64caa8f149e1dbce
This commit is contained in:
David Anderson 2016-08-22 17:25:52 -07:00
Родитель 2b23d07c29
Коммит c27faebe47
2 изменённых файлов: 8 добавлений и 2 удалений

Просмотреть файл

@ -18,6 +18,7 @@
#include "VRManagerParent.h" #include "VRManagerParent.h"
#include "VsyncBridgeParent.h" #include "VsyncBridgeParent.h"
#if defined(XP_WIN) #if defined(XP_WIN)
# include "DeviceManagerD3D9.h"
# include "mozilla/gfx/DeviceManagerD3D11.h" # include "mozilla/gfx/DeviceManagerD3D11.h"
#endif #endif
@ -50,6 +51,7 @@ GPUParent::Init(base::ProcessId aParentPid,
gfxVars::Initialize(); gfxVars::Initialize();
#if defined(XP_WIN) #if defined(XP_WIN)
DeviceManagerD3D11::Init(); DeviceManagerD3D11::Init();
DeviceManagerD3D9::Init();
#endif #endif
CompositorThreadHolder::Start(); CompositorThreadHolder::Start();
VRManager::ManagerInit(); VRManager::ManagerInit();
@ -224,8 +226,7 @@ GPUParent::ActorDestroy(ActorDestroyReason aWhy)
#ifndef NS_FREE_PERMANENT_DATA #ifndef NS_FREE_PERMANENT_DATA
// No point in going through XPCOM shutdown because we don't keep persistent // No point in going through XPCOM shutdown because we don't keep persistent
// state. Currently we quick-exit in RecvBeginShutdown so this should be // state.
// unreachable.
ProcessChild::QuickExit(); ProcessChild::QuickExit();
#endif #endif
@ -235,6 +236,7 @@ GPUParent::ActorDestroy(ActorDestroyReason aWhy)
CompositorThreadHolder::Shutdown(); CompositorThreadHolder::Shutdown();
#if defined(XP_WIN) #if defined(XP_WIN)
DeviceManagerD3D11::Shutdown(); DeviceManagerD3D11::Shutdown();
DeviceManagerD3D9::Shutdown();
#endif #endif
gfxVars::Shutdown(); gfxVars::Shutdown();
gfxConfig::Shutdown(); gfxConfig::Shutdown();

Просмотреть файл

@ -2249,6 +2249,10 @@ gfxPlatform::GetScaledFontForFontWithCairoSkia(DrawTarget* aTarget, gfxFont* aFo
/* static */ bool /* static */ bool
gfxPlatform::UsesOffMainThreadCompositing() gfxPlatform::UsesOffMainThreadCompositing()
{ {
if (XRE_GetProcessType() == GeckoProcessType_GPU) {
return true;
}
static bool firstTime = true; static bool firstTime = true;
static bool result = false; static bool result = false;