Fix bogus assert. (bug 1416369, r?=mattwoodrow)
authorDavid Anderson <danderson@mozilla.com>
Tue, 14 Nov 2017 12:01:42 +0200
changeset 436155 ad33eb3b6a5ced70fa963ea28334176d0ff6c6a4
parent 436154 c8d8a1764cba3bd0cdaacae93456e55d9ac116ee
child 436157 8745afb069520f3561384481290bfec7f4d08b1a
push id117
push userfmarier@mozilla.com
push dateTue, 28 Nov 2017 20:17:16 +0000
bugs1416369
milestone59.0a1
Fix bogus assert. (bug 1416369, r?=mattwoodrow)
gfx/layers/client/TextureClient.cpp
--- a/gfx/layers/client/TextureClient.cpp
+++ b/gfx/layers/client/TextureClient.cpp
@@ -1244,19 +1244,19 @@ TextureClient::CreateForRawBufferAccess(
   if (aFormat == SurfaceFormat::B8G8R8X8) {
     // Skia doesn't support RGBX, so ensure we clear the buffer for the proper alpha values.
     aAllocFlags = TextureAllocationFlags(aAllocFlags | ALLOC_CLEAR_BUFFER);
   }
 
   // Note that we ignore the backend type if we get here. It should only be D2D
   // or Skia, and D2D does not support data surfaces. Therefore it is safe to
   // force the buffer to be Skia.
-  NS_WARNING_ASSERTION(aMoz2DBackend != gfx::BackendType::SKIA &&
-                       aMoz2DBackend != gfx::BackendType::DIRECT2D &&
-                       aMoz2DBackend != gfx::BackendType::DIRECT2D1_1,
+  NS_WARNING_ASSERTION(aMoz2DBackend == gfx::BackendType::SKIA ||
+                       aMoz2DBackend == gfx::BackendType::DIRECT2D ||
+                       aMoz2DBackend == gfx::BackendType::DIRECT2D1_1,
                        "Unsupported TextureClient backend type");
 
   TextureData* texData = BufferTextureData::Create(aSize, aFormat, gfx::BackendType::SKIA,
                                                    aLayersBackend, aTextureFlags,
                                                    aAllocFlags, aAllocator);
   if (!texData) {
     return nullptr;
   }