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

Unified Diff: src/image/SkImage_Raster.cpp

Issue 305483005: remove SkBitmap::asImageInfo (Closed) Base URL: https://skia.googlecode.com/svn/trunk
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
« no previous file with comments | « src/image/SkImagePriv.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkImage_Raster.cpp
diff --git a/src/image/SkImage_Raster.cpp b/src/image/SkImage_Raster.cpp
index abf6dc8af08a761914aa59a29bed9cb0a7705fa0..7a8091c8af4cecb2618ab39330df61afd8689a86 100644
--- a/src/image/SkImage_Raster.cpp
+++ b/src/image/SkImage_Raster.cpp
@@ -133,8 +133,8 @@ bool SkImage_Raster::onReadPixels(SkBitmap* dst, const SkIRect& subset) const {
const void* SkImage_Raster::onPeekPixels(SkImageInfo* infoPtr,
size_t* rowBytesPtr) const {
- SkImageInfo info;
- if (!fBitmap.asImageInfo(&info) || !fBitmap.getPixels()) {
+ const SkImageInfo info = fBitmap.info();
+ if ((kUnknown_SkColorType == info.colorType()) || !fBitmap.getPixels()) {
return NULL;
}
*infoPtr = info;
« no previous file with comments | « src/image/SkImagePriv.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698