Index: Source/platform/graphics/test/MockDiscardablePixelRef.h |
diff --git a/Source/platform/graphics/test/MockDiscardablePixelRef.h b/Source/platform/graphics/test/MockDiscardablePixelRef.h |
index ec1b71f0346a5ce3e3d2d837d6a7066421350216..890f1ce41b4d1dadffcb2d7f3131cd126f779a34 100644 |
--- a/Source/platform/graphics/test/MockDiscardablePixelRef.h |
+++ b/Source/platform/graphics/test/MockDiscardablePixelRef.h |
@@ -51,10 +51,9 @@ public: |
class Allocator : public SkBitmap::Allocator { |
public: |
virtual bool allocPixelRef(SkBitmap* dst, SkColorTable* ct) SK_OVERRIDE { |
- SkImageInfo info; |
- if (!dst->asImageInfo(&info)) { |
+ const SkImageInfo info = dst->info(); |
f(malita)
2014/05/29 12:51:38
const SkImageInfo&
|
+ if (kUnknown_SkColorType == info.colorType()) |
return false; |
- } |
SkAutoTUnref<SkPixelRef> pr(new MockDiscardablePixelRef(info, dst->rowBytes())); |
dst->setPixelRef(pr); |
return true; |