Bug 1316299 - Invert broken logic in DrawTargetSkia::CreateSimilarDrawTarget's warning. r=lsalzman
☠☠ backed out by 91b1add28ef6 ☠ ☠
authorJonathan Watt <jwatt@jwatt.org>
Mon, 07 Nov 2016 15:38:41 +0000
changeset 322496 5b62b77eb236e81ad833cfa57dad77902c51b823
parent 322495 ac5ea2dc6c60ba42d900b81051161110232c9949
child 322497 321e451a82b2ec6818cc12aba3edd9379019040e
push id21
push usermaklebus@msu.edu
push dateThu, 01 Dec 2016 06:22:08 +0000
reviewerslsalzman
bugs1316299
milestone52.0a1
Bug 1316299 - Invert broken logic in DrawTargetSkia::CreateSimilarDrawTarget's warning. r=lsalzman
gfx/2d/DrawTargetSkia.cpp
--- a/gfx/2d/DrawTargetSkia.cpp
+++ b/gfx/2d/DrawTargetSkia.cpp
@@ -1568,17 +1568,17 @@ DrawTargetSkia::CreateSimilarDrawTarget(
   }
 #endif
 
 #ifdef DEBUG
   // Check that our SkCanvas isn't backed by vector storage such as PDF.  If it
   // is then we want similar storage to avoid losing fidelity (if and when this
   // DrawTarget is Snapshot()'ed, drawning a raster back into this DrawTarget
   // will lose fidelity).
-  if (mCanvas->imageInfo().colorType() != kUnknown_SkColorType) {
+  if (mCanvas->imageInfo().colorType() == kUnknown_SkColorType) {
     NS_WARNING("Not backed by pixels - we need to handle PDF backed SkCanvas");
   }
 #endif
 
   if (!target->Init(aSize, aFormat)) {
     return nullptr;
   }
   return target.forget();