Bug 1541398 - Force gfxImageSurface for OffscreenSurface in content r=jfkthame

For Win32k lockdown, we can't use gfxWindowsSurface in content for offscreen
surfaces, since it invokes Windows GDI calls.

It appears from testing that a gfxImageSurface works just fine, so this change
just disables the native surface usage for content processes.

Differential Revision: https://phabricator.services.mozilla.com/D70022

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Chris Martin 2020-04-07 15:34:36 +00:00
Родитель 307671c87e
Коммит f187ef5ef8
1 изменённых файлов: 5 добавлений и 2 удалений

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

@ -579,8 +579,11 @@ already_AddRefed<gfxASurface> gfxWindowsPlatform::CreateOffscreenSurface(
RefPtr<gfxASurface> surf = nullptr;
#ifdef CAIRO_HAS_WIN32_SURFACE
if (mRenderMode == RENDER_GDI || mRenderMode == RENDER_DIRECT2D)
surf = new gfxWindowsSurface(aSize, aFormat);
if (!XRE_IsContentProcess()) {
if (mRenderMode == RENDER_GDI || mRenderMode == RENDER_DIRECT2D) {
surf = new gfxWindowsSurface(aSize, aFormat);
}
}
#endif
if (!surf || surf->CairoStatus()) {