aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
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
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')
-rw-r--r--include/core/SkBitmap.h13
-rw-r--r--include/core/SkPixelRef.h53
-rw-r--r--include/core/SkPixmap.h50
3 files changed, 0 insertions, 116 deletions
diff --git a/include/core/SkBitmap.h b/include/core/SkBitmap.h
index e19f45232e..8818829a41 100644
--- a/include/core/SkBitmap.h
+++ b/include/core/SkBitmap.h
@@ -419,12 +419,6 @@ public:
*/
void setPixelRef(sk_sp<SkPixelRef>, int dx, int dy);
-#ifdef SK_SUPPORT_OBSOLETE_LOCKPIXELS
- void lockPixels() const {}
- void unlockPixels() const {}
- bool requestLock(SkAutoPixmapUnlock* result) const;
-#endif
-
/** Call this to be sure that the bitmap is valid enough to be drawn (i.e.
it has non-null pixels, and if required by its colortype, it has a
non-null colortable. Returns true if all of the above are met.
@@ -756,13 +750,6 @@ private:
friend class SkBinaryWriteBuffer; // rawpixels
};
-#ifdef SK_SUPPORT_OBSOLETE_LOCKPIXELS
-class SkAutoLockPixels : SkNoncopyable {
-public:
- SkAutoLockPixels(const SkBitmap&, bool = true) {}
-};
-#endif
-
///////////////////////////////////////////////////////////////////////////////
inline uint32_t* SkBitmap::getAddr32(int x, int y) const {
diff --git a/include/core/SkPixelRef.h b/include/core/SkPixelRef.h
index 56e0caf7c8..e9225fd01f 100644
--- a/include/core/SkPixelRef.h
+++ b/include/core/SkPixelRef.h
@@ -43,59 +43,6 @@ public:
SkColorTable* colorTable() const { return fCTable.get(); }
size_t rowBytes() const { return fRowBytes; }
-#ifdef SK_SUPPORT_OBSOLETE_LOCKPIXELS
- struct LockRec {
- LockRec() : fPixels(NULL), fColorTable(NULL) {}
-
- void* fPixels;
- SkColorTable* fColorTable;
- size_t fRowBytes;
-
- void zero() { sk_bzero(this, sizeof(*this)); }
-
- bool isZero() const {
- return NULL == fPixels && NULL == fColorTable && 0 == fRowBytes;
- }
- };
-
- bool lockPixels() { return true; }
- void unlockPixels() {}
-
- /**
- * Call to access the pixel memory. On success, return true and fill out
- * the specified rec. On failure, return false and ignore the rec parameter.
- * Balance this with a call to unlockPixels().
- */
- bool lockPixels(LockRec* rec);
-
- struct LockRequest {
- SkISize fSize;
- SkFilterQuality fQuality;
- };
-
- struct LockResult {
- LockResult() : fPixels(NULL), fCTable(NULL) {}
-
- void (*fUnlockProc)(void* ctx);
- void* fUnlockContext;
-
- const void* fPixels;
- SkColorTable* fCTable; // should be NULL unless colortype is kIndex8
- size_t fRowBytes;
- SkISize fSize;
-
- void unlock() {
- if (fUnlockProc) {
- fUnlockProc(fUnlockContext);
- fUnlockProc = NULL; // can't unlock twice!
- }
- }
- };
-
- bool requestLock(const LockRequest&, LockResult*);
-#endif
-
-
/** Returns a non-zero, unique value corresponding to the pixels in this
pixelref. Each time the pixels are changed (and notifyPixelsChanged is
called), a different generation ID will be returned.
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