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

Unified Diff: src/lazy/SkLazyCachingPixelRef.h

Issue 103033002: Big Cleanup: SkBitmapFactory, SkLazyPixelRef, SkImageCache (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: 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..02b63fb91928a294ee5f797fb8e43451c2955ed8 100644
--- a/src/lazy/SkLazyCachingPixelRef.h
+++ b/src/lazy/SkLazyCachingPixelRef.h
@@ -8,8 +8,8 @@
#ifndef SkLazyCachingPixelRef_DEFINED
#define SkLazyCachingPixelRef_DEFINED
-#include "SkBitmapFactory.h"
#include "SkCachingPixelRef.h"
+#include "SkImageDecoder.h"
class SkData;
@@ -20,6 +20,10 @@ class SkData;
*/
class SkLazyCachingPixelRef : public SkCachingPixelRef {
public:
+ typedef bool (*DecodeProc)(const void* data,
+ size_t length,
+ SkImageInfo*,
+ const SkImageDecoder::Target*);
/**
* @param data Encoded data representing the pixels. NULL is
* equivalent to an empty data, and will be passed to
@@ -28,8 +32,7 @@ public:
* @param procedure Called to decode the pixels when
* needed. If NULL, use SkImageDecoder::DecodeMemoryToTarget.
*/
- SkLazyCachingPixelRef(SkData* data,
- SkBitmapFactory::DecodeProc procedure);
+ SkLazyCachingPixelRef(SkData* data, DecodeProc procedure);
virtual ~SkLazyCachingPixelRef();
@@ -53,7 +56,7 @@ public:
*
* @returns true on success.
*/
- static bool Install(SkBitmapFactory::DecodeProc procedure,
+ static bool Install(DecodeProc procedure,
SkData* data,
SkBitmap* destination);
@@ -89,8 +92,8 @@ protected:
size_t rowBytes) SK_OVERRIDE;
private:
- SkData* fData;
- SkBitmapFactory::DecodeProc fDecodeProc;
+ SkData* fData;
+ DecodeProc fDecodeProc;
typedef SkCachingPixelRef INHERITED;
};

Powered by Google App Engine
This is Rietveld 408576698