зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 18c3c5e79f1c (bug 1540776) for causing xpcshell failures in test_BHRObserver.js
CLOSED TREE
This commit is contained in:
Родитель
6ebe338b92
Коммит
3dc26ddcf3
|
@ -5005,13 +5005,6 @@ mozilla::ipc::IPCResult ContentParent::RecvGetGraphicsDeviceInitData(
|
||||||
return IPC_OK();
|
return IPC_OK();
|
||||||
}
|
}
|
||||||
|
|
||||||
mozilla::ipc::IPCResult ContentParent::RecvGetOutputColorProfileData(
|
|
||||||
nsTArray<uint8_t>* aOutputColorProfileData) {
|
|
||||||
(*aOutputColorProfileData) =
|
|
||||||
gfxPlatform::GetPlatform()->GetCMSOutputProfileData();
|
|
||||||
return IPC_OK();
|
|
||||||
}
|
|
||||||
|
|
||||||
mozilla::ipc::IPCResult ContentParent::RecvGetFontListShmBlock(
|
mozilla::ipc::IPCResult ContentParent::RecvGetFontListShmBlock(
|
||||||
const uint32_t& aGeneration, const uint32_t& aIndex,
|
const uint32_t& aGeneration, const uint32_t& aIndex,
|
||||||
mozilla::ipc::SharedMemoryBasic::Handle* aOut) {
|
mozilla::ipc::SharedMemoryBasic::Handle* aOut) {
|
||||||
|
|
|
@ -1148,9 +1148,6 @@ class ContentParent final
|
||||||
mozilla::ipc::IPCResult RecvGetGraphicsDeviceInitData(
|
mozilla::ipc::IPCResult RecvGetGraphicsDeviceInitData(
|
||||||
ContentDeviceData* aOut);
|
ContentDeviceData* aOut);
|
||||||
|
|
||||||
mozilla::ipc::IPCResult RecvGetOutputColorProfileData(
|
|
||||||
nsTArray<uint8_t>* aOutputColorProfileData);
|
|
||||||
|
|
||||||
mozilla::ipc::IPCResult RecvGetFontListShmBlock(
|
mozilla::ipc::IPCResult RecvGetFontListShmBlock(
|
||||||
const uint32_t& aGeneration, const uint32_t& aIndex,
|
const uint32_t& aGeneration, const uint32_t& aIndex,
|
||||||
mozilla::ipc::SharedMemoryBasic::Handle* aOut);
|
mozilla::ipc::SharedMemoryBasic::Handle* aOut);
|
||||||
|
|
|
@ -1183,15 +1183,6 @@ parent:
|
||||||
sync GetGraphicsDeviceInitData()
|
sync GetGraphicsDeviceInitData()
|
||||||
returns (ContentDeviceData aData);
|
returns (ContentDeviceData aData);
|
||||||
|
|
||||||
/**
|
|
||||||
* Request a buffer containing the contents of the output color profile.
|
|
||||||
* If set, this is the file pointed to by
|
|
||||||
* gfx.color_management.display_profile, otherwise it contains a
|
|
||||||
* platform-specific default
|
|
||||||
*/
|
|
||||||
sync GetOutputColorProfileData()
|
|
||||||
returns (uint8_t[] aOutputColorProfileData);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A shared font list (see gfx/thebes/SharedFontList.*) contains a list
|
* A shared font list (see gfx/thebes/SharedFontList.*) contains a list
|
||||||
* of shared-memory blocks that are used to store all the font list data.
|
* of shared-memory blocks that are used to store all the font list data.
|
||||||
|
|
|
@ -2191,39 +2191,25 @@ nsTArray<uint8_t> gfxPlatform::GetPlatformCMSOutputProfileData() {
|
||||||
}
|
}
|
||||||
|
|
||||||
nsTArray<uint8_t> gfxPlatform::GetCMSOutputProfileData() {
|
nsTArray<uint8_t> gfxPlatform::GetCMSOutputProfileData() {
|
||||||
if (XRE_IsContentProcess()) {
|
|
||||||
mozilla::dom::ContentChild* cc = mozilla::dom::ContentChild::GetSingleton();
|
|
||||||
nsTArray<uint8_t> result;
|
|
||||||
Unused << cc->SendGetOutputColorProfileData(&result);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!mCachedOutputColorProfile.IsEmpty()) {
|
|
||||||
return nsTArray<uint8_t>(mCachedOutputColorProfile);
|
|
||||||
}
|
|
||||||
|
|
||||||
nsAutoCString fname;
|
nsAutoCString fname;
|
||||||
Preferences::GetCString("gfx.color_management.display_profile", fname);
|
Preferences::GetCString("gfx.color_management.display_profile", fname);
|
||||||
|
|
||||||
if (fname.IsEmpty()) {
|
if (fname.IsEmpty()) {
|
||||||
mCachedOutputColorProfile = GetPlatformCMSOutputProfileData();
|
return gfxPlatform::GetPlatform()->GetPlatformCMSOutputProfileData();
|
||||||
return nsTArray<uint8_t>(mCachedOutputColorProfile);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void* mem = nullptr;
|
void* mem = nullptr;
|
||||||
size_t size = 0;
|
size_t size = 0;
|
||||||
qcms_data_from_path(fname.get(), &mem, &size);
|
qcms_data_from_path(fname.get(), &mem, &size);
|
||||||
if (mem == nullptr) {
|
if (mem == nullptr) {
|
||||||
mCachedOutputColorProfile = GetPlatformCMSOutputProfileData();
|
return gfxPlatform::GetPlatform()->GetPlatformCMSOutputProfileData();
|
||||||
return nsTArray<uint8_t>(mCachedOutputColorProfile);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MOZ_ASSERT(mCachedOutputColorProfile.IsEmpty());
|
nsTArray<uint8_t> result;
|
||||||
|
result.AppendElements(static_cast<uint8_t*>(mem), size);
|
||||||
mCachedOutputColorProfile.AppendElements(static_cast<uint8_t*>(mem), size);
|
|
||||||
free(mem);
|
free(mem);
|
||||||
|
|
||||||
return nsTArray<uint8_t>(mCachedOutputColorProfile);
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void gfxPlatform::CreateCMSOutputProfile() {
|
void gfxPlatform::CreateCMSOutputProfile() {
|
||||||
|
@ -2240,8 +2226,7 @@ void gfxPlatform::CreateCMSOutputProfile() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!gCMSOutputProfile) {
|
if (!gCMSOutputProfile) {
|
||||||
nsTArray<uint8_t> outputProfileData =
|
nsTArray<uint8_t> outputProfileData = GetCMSOutputProfileData();
|
||||||
gfxPlatform::GetPlatform()->GetCMSOutputProfileData();
|
|
||||||
if (!outputProfileData.IsEmpty()) {
|
if (!outputProfileData.IsEmpty()) {
|
||||||
gCMSOutputProfile = qcms_profile_from_memory(
|
gCMSOutputProfile = qcms_profile_from_memory(
|
||||||
outputProfileData.Elements(), outputProfileData.Length());
|
outputProfileData.Elements(), outputProfileData.Length());
|
||||||
|
@ -3415,8 +3400,7 @@ void gfxPlatform::GetFrameStats(mozilla::widget::InfoObject& aObj) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void gfxPlatform::GetCMSSupportInfo(mozilla::widget::InfoObject& aObj) {
|
void gfxPlatform::GetCMSSupportInfo(mozilla::widget::InfoObject& aObj) {
|
||||||
nsTArray<uint8_t> outputProfileData =
|
nsTArray<uint8_t> outputProfileData = GetCMSOutputProfileData();
|
||||||
gfxPlatform::GetPlatform()->GetCMSOutputProfileData();
|
|
||||||
if (outputProfileData.IsEmpty()) {
|
if (outputProfileData.IsEmpty()) {
|
||||||
nsPrintfCString msg("Empty profile data");
|
nsPrintfCString msg("Empty profile data");
|
||||||
aObj.DefineProperty("CMSOutputProfile", msg.get());
|
aObj.DefineProperty("CMSOutputProfile", msg.get());
|
||||||
|
|
|
@ -738,13 +738,6 @@ class gfxPlatform : public mozilla::layers::MemoryPressureListener {
|
||||||
*/
|
*/
|
||||||
virtual void ImportGPUDeviceData(const mozilla::gfx::GPUDeviceData& aData);
|
virtual void ImportGPUDeviceData(const mozilla::gfx::GPUDeviceData& aData);
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the contents of the file containing the output color profile.
|
|
||||||
* The result may change if gfx.color_management.display_profile is changed
|
|
||||||
* or the platform-specific default is changed
|
|
||||||
*/
|
|
||||||
nsTArray<uint8_t> GetCMSOutputProfileData();
|
|
||||||
|
|
||||||
bool HasVariationFontSupport() const { return mHasVariationFontSupport; }
|
bool HasVariationFontSupport() const { return mHasVariationFontSupport; }
|
||||||
|
|
||||||
bool HasNativeColrFontSupport() const { return mHasNativeColrFontSupport; }
|
bool HasNativeColrFontSupport() const { return mHasNativeColrFontSupport; }
|
||||||
|
@ -886,6 +879,8 @@ class gfxPlatform : public mozilla::layers::MemoryPressureListener {
|
||||||
static void InitOpenGLConfig();
|
static void InitOpenGLConfig();
|
||||||
static void CreateCMSOutputProfile();
|
static void CreateCMSOutputProfile();
|
||||||
|
|
||||||
|
static nsTArray<uint8_t> GetCMSOutputProfileData();
|
||||||
|
|
||||||
friend void RecordingPrefChanged(const char* aPrefName, void* aClosure);
|
friend void RecordingPrefChanged(const char* aPrefName, void* aClosure);
|
||||||
|
|
||||||
virtual nsTArray<uint8_t> GetPlatformCMSOutputProfileData();
|
virtual nsTArray<uint8_t> GetPlatformCMSOutputProfileData();
|
||||||
|
@ -953,9 +948,6 @@ class gfxPlatform : public mozilla::layers::MemoryPressureListener {
|
||||||
// Total number of screen pixels across all monitors.
|
// Total number of screen pixels across all monitors.
|
||||||
int64_t mScreenPixels;
|
int64_t mScreenPixels;
|
||||||
|
|
||||||
// Cached contents of the output color profile file
|
|
||||||
nsTArray<uint8_t> mCachedOutputColorProfile;
|
|
||||||
|
|
||||||
// An instance of gfxSkipChars which is empty. It is used as the
|
// An instance of gfxSkipChars which is empty. It is used as the
|
||||||
// basis for error-case iterators.
|
// basis for error-case iterators.
|
||||||
const gfxSkipChars kEmptySkipChars;
|
const gfxSkipChars kEmptySkipChars;
|
||||||
|
|
|
@ -1014,9 +1014,7 @@ 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]
|
[PContent::GetGraphicsDeviceInitData]
|
||||||
description = Retrieve information needed to initialize the graphics device in the content process
|
description = legacy sync IPC - please add detailed description
|
||||||
[PContent::GetOutputColorProfileData]
|
|
||||||
description = Retrieve the contents of the output color profile file
|
|
||||||
[PContent::GetFontListShmBlock]
|
[PContent::GetFontListShmBlock]
|
||||||
description = for bug 1514869 - layout code needs synchronous access to font list, but this is used only once per block, after which content directly reads the shared memory
|
description = for bug 1514869 - layout code needs synchronous access to font list, but this is used only once per block, after which content directly reads the shared memory
|
||||||
[PContent::InitializeFamily]
|
[PContent::InitializeFamily]
|
||||||
|
|
Загрузка…
Ссылка в новой задаче