forked from mirrors/gecko-dev
Bug 1859625 Part 2: Stop sending the GetGraphicsDeviceInitData message. r=ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D192999
This commit is contained in:
parent
8272a162fb
commit
7ae9549693
9 changed files with 24 additions and 33 deletions
|
|
@ -5914,12 +5914,6 @@ mozilla::ipc::IPCResult ContentParent::RecvShutdownPerfStats(
|
||||||
return IPC_OK();
|
return IPC_OK();
|
||||||
}
|
}
|
||||||
|
|
||||||
mozilla::ipc::IPCResult ContentParent::RecvGetGraphicsDeviceInitData(
|
|
||||||
ContentDeviceData* aOut) {
|
|
||||||
gfxPlatform::GetPlatform()->BuildContentDeviceData(aOut);
|
|
||||||
return IPC_OK();
|
|
||||||
}
|
|
||||||
|
|
||||||
mozilla::ipc::IPCResult ContentParent::RecvGetOutputColorProfileData(
|
mozilla::ipc::IPCResult ContentParent::RecvGetOutputColorProfileData(
|
||||||
nsTArray<uint8_t>* aOutputColorProfileData) {
|
nsTArray<uint8_t>* aOutputColorProfileData) {
|
||||||
(*aOutputColorProfileData) =
|
(*aOutputColorProfileData) =
|
||||||
|
|
|
||||||
|
|
@ -1133,9 +1133,6 @@ class ContentParent final : public PContentParent,
|
||||||
|
|
||||||
mozilla::ipc::IPCResult RecvShutdownPerfStats(const nsACString& aPerfStats);
|
mozilla::ipc::IPCResult RecvShutdownPerfStats(const nsACString& aPerfStats);
|
||||||
|
|
||||||
mozilla::ipc::IPCResult RecvGetGraphicsDeviceInitData(
|
|
||||||
ContentDeviceData* aOut);
|
|
||||||
|
|
||||||
mozilla::ipc::IPCResult RecvGetOutputColorProfileData(
|
mozilla::ipc::IPCResult RecvGetOutputColorProfileData(
|
||||||
nsTArray<uint8_t>* aOutputColorProfileData);
|
nsTArray<uint8_t>* aOutputColorProfileData);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1330,12 +1330,6 @@ parent:
|
||||||
*/
|
*/
|
||||||
async ShutdownPerfStats(nsCString aPerfStats);
|
async ShutdownPerfStats(nsCString aPerfStats);
|
||||||
|
|
||||||
/**
|
|
||||||
* Request graphics initialization information from the parent.
|
|
||||||
*/
|
|
||||||
sync GetGraphicsDeviceInitData()
|
|
||||||
returns (ContentDeviceData aData);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request a buffer containing the contents of the output color profile.
|
* Request a buffer containing the contents of the output color profile.
|
||||||
* If set, this is the file pointed to by
|
* If set, this is the file pointed to by
|
||||||
|
|
|
||||||
|
|
@ -467,10 +467,10 @@ bool gfxPlatform::Initialized() { return !!gPlatform; }
|
||||||
/* static */
|
/* static */
|
||||||
void gfxPlatform::InitChild(const ContentDeviceData& aData) {
|
void gfxPlatform::InitChild(const ContentDeviceData& aData) {
|
||||||
MOZ_ASSERT(XRE_IsContentProcess());
|
MOZ_ASSERT(XRE_IsContentProcess());
|
||||||
MOZ_RELEASE_ASSERT(!gPlatform,
|
MOZ_ASSERT(!gPlatform,
|
||||||
"InitChild() should be called before first GetPlatform()");
|
"InitChild() should be called before first GetPlatform()");
|
||||||
// Make the provided initial ContentDeviceData available to the init
|
// Make the provided initial ContentDeviceData available to the init
|
||||||
// routines, so they don't have to do a sync request from the parent.
|
// routines.
|
||||||
gContentDeviceInitData = &aData;
|
gContentDeviceInitData = &aData;
|
||||||
Init();
|
Init();
|
||||||
gContentDeviceInitData = nullptr;
|
gContentDeviceInitData = nullptr;
|
||||||
|
|
@ -3869,20 +3869,16 @@ void gfxPlatform::DisableGPUProcess() {
|
||||||
gfxVars::SetRemoteCanvasEnabled(false);
|
gfxVars::SetRemoteCanvasEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void gfxPlatform::FetchAndImportContentDeviceData() {
|
void gfxPlatform::ImportCachedContentDeviceData() {
|
||||||
MOZ_ASSERT(XRE_IsContentProcess());
|
MOZ_ASSERT(XRE_IsContentProcess());
|
||||||
|
|
||||||
if (gContentDeviceInitData) {
|
// Import the content device data if we've got some waiting.
|
||||||
ImportContentDeviceData(*gContentDeviceInitData);
|
if (!gContentDeviceInitData) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
mozilla::dom::ContentChild* cc = mozilla::dom::ContentChild::GetSingleton();
|
ImportContentDeviceData(*gContentDeviceInitData);
|
||||||
|
gContentDeviceInitData = nullptr;
|
||||||
mozilla::gfx::ContentDeviceData data;
|
|
||||||
cc->SendGetGraphicsDeviceInitData(&data);
|
|
||||||
|
|
||||||
ImportContentDeviceData(data);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void gfxPlatform::ImportContentDeviceData(
|
void gfxPlatform::ImportContentDeviceData(
|
||||||
|
|
|
||||||
|
|
@ -862,10 +862,10 @@ class gfxPlatform : public mozilla::layers::MemoryPressureListener {
|
||||||
void InitBackendPrefs(BackendPrefsData&& aPrefsData);
|
void InitBackendPrefs(BackendPrefsData&& aPrefsData);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Content-process only. Requests device preferences from the parent process
|
* Content-process only. Updates device preferences from the parent process,
|
||||||
* and updates any cached settings.
|
* if we've received any.
|
||||||
*/
|
*/
|
||||||
void FetchAndImportContentDeviceData();
|
void ImportCachedContentDeviceData();
|
||||||
virtual void ImportContentDeviceData(
|
virtual void ImportContentDeviceData(
|
||||||
const mozilla::gfx::ContentDeviceData& aData);
|
const mozilla::gfx::ContentDeviceData& aData);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -144,6 +144,14 @@ gfxPlatformGtk::~gfxPlatformGtk() {
|
||||||
gPlatformFTLibrary = nullptr;
|
gPlatformFTLibrary = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void gfxPlatformGtk::InitAcceleration() {
|
||||||
|
gfxPlatform::InitAcceleration();
|
||||||
|
|
||||||
|
if (XRE_IsContentProcess()) {
|
||||||
|
ImportCachedContentDeviceData();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void gfxPlatformGtk::InitX11EGLConfig() {
|
void gfxPlatformGtk::InitX11EGLConfig() {
|
||||||
FeatureState& feature = gfxConfig::GetFeature(Feature::X11_EGL);
|
FeatureState& feature = gfxConfig::GetFeature(Feature::X11_EGL);
|
||||||
#ifdef MOZ_X11
|
#ifdef MOZ_X11
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,7 @@ class gfxPlatformGtk final : public gfxPlatform {
|
||||||
static bool CheckVariationFontSupport();
|
static bool CheckVariationFontSupport();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
void InitAcceleration() override;
|
||||||
void InitX11EGLConfig();
|
void InitX11EGLConfig();
|
||||||
void InitDmabufConfig();
|
void InitDmabufConfig();
|
||||||
bool InitVAAPIConfig(bool aForceEnabledByUser);
|
bool InitVAAPIConfig(bool aForceEnabledByUser);
|
||||||
|
|
|
||||||
|
|
@ -373,6 +373,9 @@ void gfxWindowsPlatform::InitAcceleration() {
|
||||||
|
|
||||||
DeviceManagerDx::Init();
|
DeviceManagerDx::Init();
|
||||||
|
|
||||||
|
// Content processes should have received content device data from parent.
|
||||||
|
MOZ_ASSERT_IF(XRE_IsContentProcess(), GetInitContentDeviceData());
|
||||||
|
|
||||||
InitializeConfig();
|
InitializeConfig();
|
||||||
InitGPUProcessSupport();
|
InitGPUProcessSupport();
|
||||||
// Ensure devices initialization. SharedSurfaceANGLE and
|
// Ensure devices initialization. SharedSurfaceANGLE and
|
||||||
|
|
@ -1198,7 +1201,7 @@ void gfxWindowsPlatform::InitializeConfig() {
|
||||||
InitializeANGLEConfig();
|
InitializeANGLEConfig();
|
||||||
InitializeD2DConfig();
|
InitializeD2DConfig();
|
||||||
} else {
|
} else {
|
||||||
FetchAndImportContentDeviceData();
|
ImportCachedContentDeviceData();
|
||||||
InitializeANGLEConfig();
|
InitializeANGLEConfig();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -68,8 +68,6 @@ description = legacy sync IPC - please add detailed description
|
||||||
description = legacy sync IPC - please add detailed description
|
description = legacy sync IPC - please add detailed description
|
||||||
[PContent::EndDriverCrashGuard]
|
[PContent::EndDriverCrashGuard]
|
||||||
description = legacy sync IPC - please add detailed description
|
description = legacy sync IPC - please add detailed description
|
||||||
[PContent::GetGraphicsDeviceInitData]
|
|
||||||
description = Retrieve information needed to initialize the graphics device in the content process
|
|
||||||
[PContent::GetOutputColorProfileData]
|
[PContent::GetOutputColorProfileData]
|
||||||
description = Retrieve the contents of the output color profile file
|
description = Retrieve the contents of the output color profile file
|
||||||
[PContent::GetFontListShmBlock]
|
[PContent::GetFontListShmBlock]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue