Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1749)

Unified Diff: Source/platform/graphics/DiscardablePixelRef.cpp

Issue 302923003: stop calling deprecated asImageInfo (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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())));

Powered by Google App Engine
This is Rietveld 408576698