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

Unified Diff: src/image/SkDataPixelRef.h

Issue 68973005: Expand pixelref to return SkImageInfo and rowbytes (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 1 month 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/image/SkDataPixelRef.h
diff --git a/src/image/SkDataPixelRef.h b/src/image/SkDataPixelRef.h
index 6b15802b97c965b08e08211104c51eb96f2d2332..3d300ce199c5421616a6ca8ef3da3f9dd38f731f 100644
--- a/src/image/SkDataPixelRef.h
+++ b/src/image/SkDataPixelRef.h
@@ -14,20 +14,23 @@ class SkData;
class SkDataPixelRef : public SkPixelRef {
public:
- SkDataPixelRef(SkData* data);
+ SkDataPixelRef(const SkImageInfo&, SkData* data, size_t rowBytes);
virtual ~SkDataPixelRef();
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDataPixelRef)
protected:
- virtual void* onLockPixels(SkColorTable**) SK_OVERRIDE;
+ virtual void* onLockPixels(SkImageInfo*, size_t* rowBytes,
+ SkColorTable**) SK_OVERRIDE;
virtual void onUnlockPixels() SK_OVERRIDE;
SkDataPixelRef(SkFlattenableReadBuffer& buffer);
virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE;
private:
- SkData* fData;
+ SkImageInfo fInfo;
scroggo 2013/11/19 18:17:09 Can these be const?
reed1 2013/11/20 20:56:56 nope, since they get set late in the unflattening
+ SkData* fData;
+ size_t fRB;
typedef SkPixelRef INHERITED;
};

Powered by Google App Engine
This is Rietveld 408576698