aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/lazy/SkDiscardablePixelRef.h
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-12-11 18:38:46 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-12-11 18:38:46 +0000
commitf3aead2829fa515f790631ee65784a7b9b073343 (patch)
tree24de164e4a739d5aa0d03b875775b94b86e0c9e6 /src/lazy/SkDiscardablePixelRef.h
parent6a32add491cc736aab95561d137909cd7c5d65ef (diff)
remvoe duplicate impl for SkImageInfo flattening
Revert "Revert "PixelRef now returns (nearly) everything that is currently in SkBitmap. The goal is to refactor bitmap later to remove redundancy, and more interestingly, remove the chance for a disconnect between the actual (pixelref) rowbytes and config, and the one claimed by the bitmap."""""" This reverts commit eabd6b2ed4e494b323c08f32358f45950a0368c3. BUG= Review URL: https://codereview.chromium.org/108773003 git-svn-id: http://skia.googlecode.com/svn/trunk@12624 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/lazy/SkDiscardablePixelRef.h')
-rw-r--r--src/lazy/SkDiscardablePixelRef.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/lazy/SkDiscardablePixelRef.h b/src/lazy/SkDiscardablePixelRef.h
index 44c6df9637..0a727b6367 100644
--- a/src/lazy/SkDiscardablePixelRef.h
+++ b/src/lazy/SkDiscardablePixelRef.h
@@ -19,7 +19,8 @@ public:
protected:
~SkDiscardablePixelRef();
- virtual void* onLockPixels(SkColorTable**) SK_OVERRIDE;
+
+ virtual bool onNewLockPixels(LockRec*) SK_OVERRIDE;
virtual void onUnlockPixels() SK_OVERRIDE;
virtual bool onLockPixelsAreWritable() const SK_OVERRIDE { return false; }
@@ -30,8 +31,6 @@ protected:
private:
SkImageGenerator* const fGenerator;
SkDiscardableMemory::Factory* const fDMFactory;
- const SkImageInfo fInfo;
- const size_t fSize; // size of memory to be allocated
const size_t fRowBytes;
// These const members should not change over the life of the
// PixelRef, since the SkBitmap doesn't expect them to change.
@@ -41,12 +40,14 @@ private:
/* Takes ownership of SkImageGenerator. */
SkDiscardablePixelRef(SkImageGenerator* generator,
const SkImageInfo& info,
- size_t size,
size_t rowBytes,
SkDiscardableMemory::Factory* factory);
+
friend bool SkInstallDiscardablePixelRef(SkImageGenerator*,
SkBitmap*,
SkDiscardableMemory::Factory*);
+
typedef SkPixelRef INHERITED;
};
+
#endif // SkDiscardablePixelRef_DEFINED