Backed out changeset 18c3c5e79f1c (bug 1540776) for causing xpcshell failures in test_BHRObserver.js

CLOSED TREE
This commit is contained in:
Mihai Alexandru Michis 2020-03-17 00:41:38 +02:00
Родитель 6ebe338b92
Коммит 3dc26ddcf3
6 изменённых файлов: 10 добавлений и 55 удалений

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

@ -5005,13 +5005,6 @@ mozilla::ipc::IPCResult ContentParent::RecvGetGraphicsDeviceInitData(
return IPC_OK();
}
mozilla::ipc::IPCResult ContentParent::RecvGetOutputColorProfileData(
nsTArray<uint8_t>* aOutputColorProfileData) {
(*aOutputColorProfileData) =
gfxPlatform::GetPlatform()->GetCMSOutputProfileData();
return IPC_OK();
}
mozilla::ipc::IPCResult ContentParent::RecvGetFontListShmBlock(
const uint32_t& aGeneration, const uint32_t& aIndex,
mozilla::ipc::SharedMemoryBasic::Handle* aOut) {

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

@ -1148,9 +1148,6 @@ class ContentParent final
mozilla::ipc::IPCResult RecvGetGraphicsDeviceInitData(
ContentDeviceData* aOut);
mozilla::ipc::IPCResult RecvGetOutputColorProfileData(
nsTArray<uint8_t>* aOutputColorProfileData);
mozilla::ipc::IPCResult RecvGetFontListShmBlock(
const uint32_t& aGeneration, const uint32_t& aIndex,
mozilla::ipc::SharedMemoryBasic::Handle* aOut);

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

@ -1183,15 +1183,6 @@ parent:
sync GetGraphicsDeviceInitData()
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
* 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() {
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;
Preferences::GetCString("gfx.color_management.display_profile", fname);
if (fname.IsEmpty()) {
mCachedOutputColorProfile = GetPlatformCMSOutputProfileData();
return nsTArray<uint8_t>(mCachedOutputColorProfile);
return gfxPlatform::GetPlatform()->GetPlatformCMSOutputProfileData();
}
void* mem = nullptr;
size_t size = 0;
qcms_data_from_path(fname.get(), &mem, &size);
if (mem == nullptr) {
mCachedOutputColorProfile = GetPlatformCMSOutputProfileData();
return nsTArray<uint8_t>(mCachedOutputColorProfile);
return gfxPlatform::GetPlatform()->GetPlatformCMSOutputProfileData();
}
MOZ_ASSERT(mCachedOutputColorProfile.IsEmpty());
mCachedOutputColorProfile.AppendElements(static_cast<uint8_t*>(mem), size);
nsTArray<uint8_t> result;
result.AppendElements(static_cast<uint8_t*>(mem), size);
free(mem);
return nsTArray<uint8_t>(mCachedOutputColorProfile);
return result;
}
void gfxPlatform::CreateCMSOutputProfile() {
@ -2240,8 +2226,7 @@ void gfxPlatform::CreateCMSOutputProfile() {
}
if (!gCMSOutputProfile) {
nsTArray<uint8_t> outputProfileData =
gfxPlatform::GetPlatform()->GetCMSOutputProfileData();
nsTArray<uint8_t> outputProfileData = GetCMSOutputProfileData();
if (!outputProfileData.IsEmpty()) {
gCMSOutputProfile = qcms_profile_from_memory(
outputProfileData.Elements(), outputProfileData.Length());
@ -3415,8 +3400,7 @@ void gfxPlatform::GetFrameStats(mozilla::widget::InfoObject& aObj) {
}
void gfxPlatform::GetCMSSupportInfo(mozilla::widget::InfoObject& aObj) {
nsTArray<uint8_t> outputProfileData =
gfxPlatform::GetPlatform()->GetCMSOutputProfileData();
nsTArray<uint8_t> outputProfileData = GetCMSOutputProfileData();
if (outputProfileData.IsEmpty()) {
nsPrintfCString msg("Empty profile data");
aObj.DefineProperty("CMSOutputProfile", msg.get());

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

@ -738,13 +738,6 @@ class gfxPlatform : public mozilla::layers::MemoryPressureListener {
*/
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 HasNativeColrFontSupport() const { return mHasNativeColrFontSupport; }
@ -886,6 +879,8 @@ class gfxPlatform : public mozilla::layers::MemoryPressureListener {
static void InitOpenGLConfig();
static void CreateCMSOutputProfile();
static nsTArray<uint8_t> GetCMSOutputProfileData();
friend void RecordingPrefChanged(const char* aPrefName, void* aClosure);
virtual nsTArray<uint8_t> GetPlatformCMSOutputProfileData();
@ -953,9 +948,6 @@ class gfxPlatform : public mozilla::layers::MemoryPressureListener {
// Total number of screen pixels across all monitors.
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
// basis for error-case iterators.
const gfxSkipChars kEmptySkipChars;

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

@ -1014,9 +1014,7 @@ description = legacy sync IPC - please add detailed description
[PContent::EndDriverCrashGuard]
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]
description = Retrieve the contents of the output color profile file
description = legacy sync IPC - please add detailed description
[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
[PContent::InitializeFamily]