Chromium Code Reviews| Index: Source/platform/graphics/DiscardablePixelRef.cpp |
| diff --git a/Source/platform/graphics/DiscardablePixelRef.cpp b/Source/platform/graphics/DiscardablePixelRef.cpp |
| index 3c1ad5c4d7a331884dcabeb7038df6ab3e4097b7..2029a32897a73ea1294f043c3c2d2e79d090ed7a 100644 |
| --- a/Source/platform/graphics/DiscardablePixelRef.cpp |
| +++ b/Source/platform/graphics/DiscardablePixelRef.cpp |
| @@ -48,8 +48,8 @@ bool DiscardablePixelRefAllocator::allocPixelRef(SkBitmap* dst, SkColorTable* ct |
| if (size < 0 || !sk_64_isS32(size)) |
| return false; |
| - SkImageInfo info; |
| - if (!dst->asImageInfo(&info)) |
| + const SkImageInfo& info = dst->info(); |
| + if (kUnknown_SkColorType == info.colorType()) |
|
pdr.
2014/05/29 04:52:14
Are these colorType checks just checking if the Sk
reed1
2014/05/29 12:10:57
Not really a question of valid. kUnknown is valid
|
| return false; |
| SkAutoTUnref<DiscardablePixelRef> pixelRef(new DiscardablePixelRef(info, dst->rowBytes(), adoptPtr(new SkMutex()))); |