aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/SkBitmap.cpp31
-rw-r--r--src/core/SkPixelRef.cpp31
-rw-r--r--src/core/SkPixmap.cpp12
3 files changed, 0 insertions, 74 deletions
diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp
index 7e3b2c97b3..8f131d15f5 100644
--- a/src/core/SkBitmap.cpp
+++ b/src/core/SkBitmap.cpp
@@ -994,37 +994,6 @@ void SkBitmap::toString(SkString* str) const {
///////////////////////////////////////////////////////////////////////////////
-#ifdef SK_SUPPORT_OBSOLETE_LOCKPIXELS
-bool SkBitmap::requestLock(SkAutoPixmapUnlock* result) const {
- SkASSERT(result);
-
- SkPixelRef* pr = fPixelRef.get();
- if (nullptr == pr) {
- return false;
- }
-
- // We have to lock the whole thing (using the pixelref's dimensions) until the api supports
- // a partial lock (with offset/origin). Hence we can't use our fInfo.
- SkPixelRef::LockRequest req = { pr->info().dimensions(), kNone_SkFilterQuality };
- SkPixelRef::LockResult res;
- if (pr->requestLock(req, &res)) {
- SkASSERT(res.fPixels);
- // The bitmap may be a subset of the pixelref's dimensions
- SkASSERT(fPixelRefOrigin.x() + fInfo.width() <= res.fSize.width());
- SkASSERT(fPixelRefOrigin.y() + fInfo.height() <= res.fSize.height());
- const void* addr = (const char*)res.fPixels + SkColorTypeComputeOffset(fInfo.colorType(),
- fPixelRefOrigin.x(),
- fPixelRefOrigin.y(),
- res.fRowBytes);
-
- result->reset(SkPixmap(this->info(), addr, res.fRowBytes, res.fCTable),
- res.fUnlockProc, res.fUnlockContext);
- return true;
- }
- return false;
-}
-#endif
-
bool SkBitmap::peekPixels(SkPixmap* pmap) const {
if (fPixels) {
if (pmap) {
diff --git a/src/core/SkPixelRef.cpp b/src/core/SkPixelRef.cpp
index 5b562b1ea6..5834b66936 100644
--- a/src/core/SkPixelRef.cpp
+++ b/src/core/SkPixelRef.cpp
@@ -110,37 +110,6 @@ void SkPixelRef::cloneGenID(const SkPixelRef& that) {
SkASSERT(!that. genIDIsUnique());
}
-#ifdef SK_SUPPORT_OBSOLETE_LOCKPIXELS
-bool SkPixelRef::lockPixels(LockRec* rec) {
- if (fPixels) {
- rec->fPixels = fPixels;
- rec->fRowBytes = fRowBytes;
- rec->fColorTable = fCTable.get();
- return true;
- }
- return false;
-}
-
-bool SkPixelRef::requestLock(const LockRequest& request, LockResult* result) {
- SkASSERT(result);
- if (request.fSize.isEmpty()) {
- return false;
- }
- // until we support subsets, we have to check this...
- if (request.fSize.width() != fInfo.width() || request.fSize.height() != fInfo.height()) {
- return false;
- }
-
- result->fUnlockProc = nullptr;
- result->fUnlockContext = nullptr;
- result->fCTable = fCTable.get();
- result->fPixels = fPixels;
- result->fRowBytes = fRowBytes;
- result->fSize.set(fInfo.width(), fInfo.height());
- return true;
-}
-#endif
-
uint32_t SkPixelRef::getGenerationID() const {
uint32_t id = fTaggedGenID.load();
if (0 == id) {
diff --git a/src/core/SkPixmap.cpp b/src/core/SkPixmap.cpp
index 4d482181a5..02090b77c6 100644
--- a/src/core/SkPixmap.cpp
+++ b/src/core/SkPixmap.cpp
@@ -20,18 +20,6 @@
#include "SkSurface.h"
#include "SkUtils.h"
-#ifdef SK_SUPPORT_OBSOLETE_LOCKPIXELS
-void SkAutoPixmapUnlock::reset(const SkPixmap& pm, void (*unlock)(void*), void* ctx) {
- SkASSERT(pm.addr() != nullptr);
-
- this->unlock();
- fPixmap = pm;
- fUnlockProc = unlock;
- fUnlockContext = ctx;
- fIsLocked = true;
-}
-#endif
-
/////////////////////////////////////////////////////////////////////////////////////////////////
void SkPixmap::reset() {