Bug 798053 - Do a more accurate test for the return value of Scale(). r=gw280
authorJoe Drew <joe@drew.ca>
Wed, 10 Oct 2012 11:35:23 -0400
changeset 110687 dbcb02897678243cb0f1f2b2d491246217cb1273
parent 110686 df7e936ddfd3d3af7b36cb43bb0447dc232e1c24
child 110688 0e3e4275119519096133d0967bf703a769b93952
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersgw280
bugs798053
milestone19.0a1
Bug 798053 - Do a more accurate test for the return value of Scale(). r=gw280
gfx/2d/Scale.cpp
--- a/gfx/2d/Scale.cpp
+++ b/gfx/2d/Scale.cpp
@@ -39,16 +39,16 @@ bool Scale(uint8_t* srcData, int32_t src
 
   // This returns an SkBitmap backed by dstData; since it also wrote to dstData,
   // we don't need to look at that SkBitmap.
   SkBitmap result = skia::ImageOperations::Resize(imgSrc,
                                                   skia::ImageOperations::RESIZE_BEST,
                                                   dstWidth, dstHeight,
                                                   dstData);
 
-  return result.readyToDraw();
+  return !result.isNull();
 #else
   return false;
 #endif
 }
 
 }
 }