Remove GrBuffer::mapPtr()

Only used in an assert.

Change-Id: Iecfd853a71d7dd1c22096886465843c7a0122c74
Reviewed-on: https://skia-review.googlesource.com/c/187380
Auto-Submit: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
This commit is contained in:
Brian Salomon 2019-01-28 12:09:44 -05:00 committed by Skia Commit-Bot
parent ede88ab2b4
commit eceb19f37e
2 changed files with 1 additions and 12 deletions

View File

@ -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.

View File

@ -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 {