Bug 1639975. Handle a canvas with no context with webrender by doing nothing, instead of trying to paint it as fallback. r=nical
authorTimothy Nikkel <tnikkel@gmail.com>
Fri, 22 May 2020 09:15:15 +0000
changeset 531711 4c53c244dba1049c7db3fa421e6888301d4ca202
parent 531710 c60409cd0710b6584acc32d67e9205b6a9a57dba
child 531712 ccce96f9e591ea3427f5ee9d4d11e6a563541deb
push id37442
push userncsoregi@mozilla.com
push dateSat, 23 May 2020 09:21:24 +0000
treeherdermozilla-central@bbcc193fe0f0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnical
bugs1639975
milestone78.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1639975. Handle a canvas with no context with webrender by doing nothing, instead of trying to paint it as fallback. r=nical Depends on D76438 Differential Revision: https://phabricator.services.mozilla.com/D76439
layout/generic/nsHTMLCanvasFrame.cpp
--- a/layout/generic/nsHTMLCanvasFrame.cpp
+++ b/layout/generic/nsHTMLCanvasFrame.cpp
@@ -277,17 +277,19 @@ class nsDisplayCanvas final : public nsP
             dest, mFrame->PresContext()->AppUnitsPerDevPixel());
 
         aManager->CommandBuilder().PushImage(
             this, canvasData->GetImageContainer(), aBuilder, aResources, aSc,
             bounds, bounds);
         break;
       }
       case CanvasContextType::NoContext:
-        return false;
+        break;
+      default:
+        MOZ_ASSERT_UNREACHABLE("unknown canvas context type");
     }
     return true;
   }
 
   virtual LayerState GetLayerState(
       nsDisplayListBuilder* aBuilder, LayerManager* aManager,
       const ContainerLayerParameters& aParameters) override {
     if (HTMLCanvasElement::FromNode(mFrame->GetContent())