diff --git a/src/gpu/GrBuffer.h b/src/gpu/GrBuffer.h index 33a7f354fa..db9b1aee36 100644 --- a/src/gpu/GrBuffer.h +++ b/src/gpu/GrBuffer.h @@ -68,14 +68,6 @@ public: fMapPtr = nullptr; } - /** - * Returns the same ptr that map() returned at time of map or nullptr if the - * is not mapped. - * - * @return ptr to mapped buffer data or nullptr if buffer is not mapped. - */ - void* mapPtr() const { return fMapPtr; } - /** Queries whether the buffer has been mapped. diff --git a/src/gpu/GrBufferAllocPool.cpp b/src/gpu/GrBufferAllocPool.cpp index b0fa58fb06..65dc01f656 100644 --- a/src/gpu/GrBufferAllocPool.cpp +++ b/src/gpu/GrBufferAllocPool.cpp @@ -94,10 +94,7 @@ void GrBufferAllocPool::validate(bool unusedBlockAllowed) const { bool wasDestroyed = false; if (fBufferPtr) { SkASSERT(!fBlocks.empty()); - if (fBlocks.back().fBuffer->isMapped()) { - GrBuffer* buf = fBlocks.back().fBuffer; - SkASSERT(buf->mapPtr() == fBufferPtr); - } else { + if (!fBlocks.back().fBuffer->isMapped()) { SkASSERT(fCpuData == fBufferPtr); } } else {