aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Salomon <bsalomon@google.com>2019-01-28 12:09:44 -0500
committerSkia Commit-Bot <skia-commit-bot@chromium.org>2019-01-28 17:41:56 +0000
commiteceb19f37e0ab68a77618239c33e163ea697bb04 (patch)
treecc440782c707c42af271865a4382b4d0935e716a /src
parentede88ab2b4144bef441a928003cb2147abbdbb2c (diff)
downloadskqp-eceb19f37e0ab68a77618239c33e163ea697bb04.tar.gz
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>
Diffstat (limited to 'src')
-rw-r--r--src/gpu/GrBuffer.h8
-rw-r--r--src/gpu/GrBufferAllocPool.cpp5
2 files changed, 1 insertions, 12 deletions
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
@@ -69,14 +69,6 @@ public:
}
/**
- * 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.
@return true if the buffer is mapped, false otherwise.
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 {