Add support for linking to a skia bitmap rather than always copying the data from the bitmap.
diff --git a/rsAllocation.h b/rsAllocation.h
index 778c904..516f8b7 100644
--- a/rsAllocation.h
+++ b/rsAllocation.h
@@ -29,11 +29,12 @@
 {
     // The graphics equilivent of malloc.  The allocation contains a structure of elements.
 
-
 public:
     // By policy this allocation will hold a pointer to the type
     // but will not destroy it on destruction.
     Allocation(Context *rsc, const Type *);
+    Allocation(Context *rsc, const Type *, void *bmp, void *callbackData, RsBitmapCallback_t callback);
+
     virtual ~Allocation();
 
     void setCpuWritable(bool);
@@ -82,6 +83,11 @@
 
     Vector<const Program *> mToDirtyList;
 
+    // Is we have a non-null user bitmap callback we do not own the bits and
+    // instead call this function to free the memort when its time.
+    RsBitmapCallback_t mUserBitmapCallback;
+    void *mUserBitmapCallbackData;
+
     // Usage restrictions
     bool mCpuWrite;
     bool mCpuRead;
@@ -109,6 +115,10 @@
     uint32_t mBufferID;
 
     bool mUploadDefered;
+
+private:
+    void init(Context *rsc, const Type *);
+
 };
 
 }