mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 20:35:50 +00:00
Bug 1513699 - Disable SkiaGL on WebRender r=jrmuizel
Disable SkiaGL on WebRender, since there is a case that R8G8B8X8 is used, but WebRender does not support R8G8B8X8 yet. And SkiaGL is already disabled by Bug 1468801. Differential Revision: https://phabricator.services.mozilla.com/D14366
This commit is contained in:
parent
fd32b3a6fa
commit
ba323650b7
@ -1262,9 +1262,11 @@ bool CanvasRenderingContext2D::AllowOpenGLCanvas() const {
|
|||||||
// canvas creation, but in that case the
|
// canvas creation, but in that case the
|
||||||
// HTMLCanvasElement::GetCompositorBackendType would return LAYERS_NONE
|
// HTMLCanvasElement::GetCompositorBackendType would return LAYERS_NONE
|
||||||
// as well, so it wouldn't help much.
|
// as well, so it wouldn't help much.
|
||||||
|
//
|
||||||
|
// XXX Disable SkiaGL on WebRender, since there is a case that R8G8B8X8
|
||||||
|
// is used, but WebRender does not support R8G8B8X8.
|
||||||
|
|
||||||
return (mCompositorBackend == LayersBackend::LAYERS_OPENGL ||
|
return (mCompositorBackend == LayersBackend::LAYERS_OPENGL) &&
|
||||||
mCompositorBackend == LayersBackend::LAYERS_WR) &&
|
|
||||||
gfxPlatform::GetPlatform()->AllowOpenGLCanvas();
|
gfxPlatform::GetPlatform()->AllowOpenGLCanvas();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
#include "gfxPlatform.h" // for gfxPlatform
|
#include "gfxPlatform.h" // for gfxPlatform
|
||||||
#include "GLReadTexImageHelper.h"
|
#include "GLReadTexImageHelper.h"
|
||||||
#include "mozilla/gfx/BaseSize.h" // for BaseSize
|
#include "mozilla/gfx/BaseSize.h" // for BaseSize
|
||||||
|
#include "mozilla/gfx/gfxVars.h"
|
||||||
#include "mozilla/layers/BufferTexture.h"
|
#include "mozilla/layers/BufferTexture.h"
|
||||||
#include "mozilla/layers/AsyncCanvasRenderer.h"
|
#include "mozilla/layers/AsyncCanvasRenderer.h"
|
||||||
#include "mozilla/layers/CompositableForwarder.h"
|
#include "mozilla/layers/CompositableForwarder.h"
|
||||||
@ -236,6 +237,9 @@ class TexClientFactory {
|
|||||||
if (!areRGBAFormatsBroken) {
|
if (!areRGBAFormatsBroken) {
|
||||||
gfx::SurfaceFormat format = mHasAlpha ? gfx::SurfaceFormat::R8G8B8A8
|
gfx::SurfaceFormat format = mHasAlpha ? gfx::SurfaceFormat::R8G8B8A8
|
||||||
: gfx::SurfaceFormat::R8G8B8X8;
|
: gfx::SurfaceFormat::R8G8B8X8;
|
||||||
|
if (gfxVars::UseWebRender() && format == gfx::SurfaceFormat::R8G8B8X8) {
|
||||||
|
MOZ_CRASH("R8G8B8X8 is not supported on WebRender");
|
||||||
|
}
|
||||||
ret = Create(format);
|
ret = Create(format);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1563,10 +1563,12 @@ bool gfxPlatform::AllowOpenGLCanvas() {
|
|||||||
// The compositor backend is only set correctly in the parent process,
|
// The compositor backend is only set correctly in the parent process,
|
||||||
// so we let content process always assume correct compositor backend.
|
// so we let content process always assume correct compositor backend.
|
||||||
// The callers have to do the right thing.
|
// The callers have to do the right thing.
|
||||||
|
//
|
||||||
|
// XXX Disable SkiaGL on WebRender, since there is a case that R8G8B8X8
|
||||||
|
// is used, but WebRender does not support R8G8B8X8.
|
||||||
bool correctBackend =
|
bool correctBackend =
|
||||||
!XRE_IsParentProcess() ||
|
!XRE_IsParentProcess() ||
|
||||||
((mCompositorBackend == LayersBackend::LAYERS_OPENGL ||
|
(mCompositorBackend == LayersBackend::LAYERS_OPENGL &&
|
||||||
mCompositorBackend == LayersBackend::LAYERS_WR) &&
|
|
||||||
(GetContentBackendFor(mCompositorBackend) == BackendType::SKIA));
|
(GetContentBackendFor(mCompositorBackend) == BackendType::SKIA));
|
||||||
|
|
||||||
if (gfxPrefs::CanvasAzureAccelerated() && correctBackend) {
|
if (gfxPrefs::CanvasAzureAccelerated() && correctBackend) {
|
||||||
|
Loading…
Reference in New Issue
Block a user