aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkPixmap.h
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2017-04-20 10:32:02 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-20 15:15:58 +0000
commitad8b5dc69cd613cc8974999f9e7c94a19eb01fec (patch)
treef5050988f450990974e41cab7a8a7b0190ca022c /include/core/SkPixmap.h
parentad5a81b06446a7415cf82e1ef3bce1795cf27830 (diff)
remove vestigle code for lockpixels
Bug: skia:6481 Change-Id: Icfd53981b8588fbea74fca2e3be58bc6f13ef923 Reviewed-on: https://skia-review.googlesource.com/13968 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'include/core/SkPixmap.h')
-rw-r--r--include/core/SkPixmap.h50
1 files changed, 0 insertions, 50 deletions
diff --git a/include/core/SkPixmap.h b/include/core/SkPixmap.h
index d028124222..af8618b4de 100644
--- a/include/core/SkPixmap.h
+++ b/include/core/SkPixmap.h
@@ -219,54 +219,4 @@ private:
SkImageInfo fInfo;
};
-/////////////////////////////////////////////////////////////////////////////////////////////
-
-#ifdef SK_SUPPORT_OBSOLETE_LOCKPIXELS
-class SK_API SkAutoPixmapUnlock : ::SkNoncopyable {
-public:
- SkAutoPixmapUnlock() : fUnlockProc(NULL), fIsLocked(false) {}
- SkAutoPixmapUnlock(const SkPixmap& pm, void (*unlock)(void*), void* ctx)
- : fUnlockProc(unlock), fUnlockContext(ctx), fPixmap(pm), fIsLocked(true)
- {}
- ~SkAutoPixmapUnlock() { this->unlock(); }
-
- /**
- * Return the currently locked pixmap. Undefined if it has been unlocked.
- */
- const SkPixmap& pixmap() const {
- SkASSERT(this->isLocked());
- return fPixmap;
- }
-
- bool isLocked() const { return fIsLocked; }
-
- /**
- * Unlocks the pixmap. Can safely be called more than once as it will only call the underlying
- * unlock-proc once.
- */
- void unlock() {
- if (fUnlockProc) {
- SkASSERT(fIsLocked);
- fUnlockProc(fUnlockContext);
- fUnlockProc = NULL;
- fIsLocked = false;
- }
- }
-
- /**
- * If there is a currently locked pixmap, unlock it, then copy the specified pixmap
- * and (optional) unlock proc/context.
- */
- void reset(const SkPixmap& pm, void (*unlock)(void*), void* ctx);
-
-private:
- void (*fUnlockProc)(void*);
- void* fUnlockContext;
- SkPixmap fPixmap;
- bool fIsLocked;
-
- friend class SkBitmap;
-};
-#endif
-
#endif