Bug 1674154 - Don't create RenderExternalTextureHost when using SWGL. r=lsalzman

Differential Revision: https://phabricator.services.mozilla.com/D96337
This commit is contained in:
Matt Woodrow 2020-11-09 21:35:50 +00:00
parent 8b83c00434
commit 02b6bea865
4 changed files with 22 additions and 4 deletions

View File

@ -677,12 +677,12 @@ void BufferTextureHost::CreateRenderTexture(
const wr::ExternalImageId& aExternalImageId) {
RefPtr<wr::RenderTextureHost> texture;
if (UseExternalTextures()) {
texture =
new wr::RenderExternalTextureHost(GetBuffer(), GetBufferDescriptor());
} else if (gfx::gfxVars::UseSoftwareWebRender()) {
if (gfx::gfxVars::UseSoftwareWebRender()) {
texture =
new wr::RenderBufferTextureHostSWGL(GetBuffer(), GetBufferDescriptor());
} else if (UseExternalTextures()) {
texture =
new wr::RenderExternalTextureHost(GetBuffer(), GetBufferDescriptor());
} else {
texture =
new wr::RenderBufferTextureHost(GetBuffer(), GetBufferDescriptor());

View File

@ -0,0 +1,5 @@
<!DOCTYPE HTML>
<html>
<body style="background:lime; margin: 0px;">
</body>
</html>

View File

@ -0,0 +1,11 @@
<!DOCTYPE HTML>
<html>
<body style="margin:0px; overflow:hidden">
<canvas style="display:block" id="c" width="1024" height="1024"></canvas>
<script>
var ctx = document.getElementById("c").getContext("2d");
ctx.fillStyle = "lime";
ctx.fillRect(0, 0, 1024, 1024);
</script>
</body>
</html>

View File

@ -114,3 +114,5 @@ fuzzy-if(winWidget,0-94,0-1575) fuzzy-if(cocoaWidget,0-1,0-24) random-if(/^Windo
== 1347147-1.html 1347147-1-ref.html
== 1353000-1.html 1353000-1-ref.html
== 1447035-1.html 1447035-1-ref.html
== large-canvas.html large-canvas-ref.html