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

Unified Diff: src/lazy/SkLazyCachingPixelRef.h

Issue 68973005: Expand pixelref to return SkImageInfo and rowbytes (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: new convention: require SkImageInfo in constructor Created 7 years 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: src/lazy/SkLazyCachingPixelRef.h
diff --git a/src/lazy/SkLazyCachingPixelRef.h b/src/lazy/SkLazyCachingPixelRef.h
index a9d2dad9902956119eb4fb45cea8eb976703c2dd..65bca776a196b26b49658bc956fca602e35c0f08 100644
--- a/src/lazy/SkLazyCachingPixelRef.h
+++ b/src/lazy/SkLazyCachingPixelRef.h
@@ -28,7 +28,7 @@ public:
* @param procedure Called to decode the pixels when
* needed. If NULL, use SkImageDecoder::DecodeMemoryToTarget.
*/
- SkLazyCachingPixelRef(SkData* data,
+ SkLazyCachingPixelRef(const SkImageInfo&, SkData* data,
SkBitmapFactory::DecodeProc procedure);
virtual ~SkLazyCachingPixelRef();
@@ -66,14 +66,6 @@ public:
protected:
/**
- * Return some information about the pixels, allowing this class
- * to allocate pixels. @return false if anything goes wrong.
- *
- * This implementation calls SkBitmapFactory::DecodeProc with a
- * NULL target.
- */
- virtual bool onDecodeInfo(SkImageInfo* info) SK_OVERRIDE;
- /**
* Decode into the given pixels, a block of memory of size
* (info.fHeight * rowBytes) bytes.
*
@@ -84,8 +76,7 @@ protected:
*
* @return false if anything goes wrong.
*/
- virtual bool onDecodePixels(const SkImageInfo& info,
- void* pixels,
+ virtual bool onDecodePixels(void* pixels,
size_t rowBytes) SK_OVERRIDE;
private:

Powered by Google App Engine
This is Rietveld 408576698