mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 12:55:46 +00:00
Bug 853169 - Initialize the output profile explicitly from within gfxPlatform::Init, and handle when we can't create one in xpcshell tests on Gtk because we don't have an X Display. r=jrmuizel
This commit is contained in:
parent
90942b6b22
commit
169c21dee6
@ -384,6 +384,8 @@ gfxPlatform::Init()
|
||||
}
|
||||
|
||||
gPlatform->mOrientationSyncMillis = Preferences::GetUint("layers.orientation.sync.timeout", (uint32_t)0);
|
||||
|
||||
CreateCMSOutputProfile();
|
||||
}
|
||||
|
||||
void
|
||||
@ -1428,8 +1430,8 @@ gfxPlatform::GetPlatformCMSOutputProfile()
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
qcms_profile *
|
||||
gfxPlatform::GetCMSOutputProfile()
|
||||
void
|
||||
gfxPlatform::CreateCMSOutputProfile()
|
||||
{
|
||||
if (!gCMSOutputProfile) {
|
||||
/* Determine if we're using the internal override to force sRGB as
|
||||
@ -1471,7 +1473,11 @@ gfxPlatform::GetCMSOutputProfile()
|
||||
bug 444661 for details. */
|
||||
qcms_profile_precache_output_transform(gCMSOutputProfile);
|
||||
}
|
||||
}
|
||||
|
||||
qcms_profile *
|
||||
gfxPlatform::GetCMSOutputProfile()
|
||||
{
|
||||
return gCMSOutputProfile;
|
||||
}
|
||||
|
||||
|
@ -592,6 +592,8 @@ private:
|
||||
*/
|
||||
static void Init();
|
||||
|
||||
static void CreateCMSOutputProfile();
|
||||
|
||||
virtual qcms_profile* GetPlatformCMSOutputProfile();
|
||||
|
||||
nsRefPtr<gfxASurface> mScreenReferenceSurface;
|
||||
|
@ -489,6 +489,13 @@ gfxPlatformGtk::GetPlatformCMSOutputProfile()
|
||||
|
||||
Atom edidAtom, iccAtom;
|
||||
Display *dpy = GDK_DISPLAY_XDISPLAY(gdk_display_get_default());
|
||||
// In xpcshell tests, we never initialize X and hence don't have a Display.
|
||||
// In this case, there's no output colour management to be done, so we just
|
||||
// return NULL.
|
||||
if (!dpy) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Window root = gdk_x11_get_default_root_xwindow();
|
||||
|
||||
Atom retAtom;
|
||||
|
Loading…
Reference in New Issue
Block a user