diff options
Diffstat (limited to 'src/gpu/gl/GrGLTransferBuffer.cpp')
-rwxr-xr-x | src/gpu/gl/GrGLTransferBuffer.cpp | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/src/gpu/gl/GrGLTransferBuffer.cpp b/src/gpu/gl/GrGLTransferBuffer.cpp deleted file mode 100755 index b7ee766d92..0000000000 --- a/src/gpu/gl/GrGLTransferBuffer.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2015 Google Inc. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#include "GrGLTransferBuffer.h" -#include "GrGLGpu.h" -#include "SkTraceMemoryDump.h" - -GrGLTransferBuffer::GrGLTransferBuffer(GrGLGpu* gpu, const Desc& desc, GrGLenum type) - : INHERITED(gpu, desc.fSizeInBytes) - , fImpl(gpu, desc, type) { - this->registerWithCache(); -} - -void GrGLTransferBuffer::onRelease() { - if (!this->wasDestroyed()) { - fImpl.release(this->getGpuGL()); - } - - INHERITED::onRelease(); -} - -void GrGLTransferBuffer::onAbandon() { - fImpl.abandon(); - INHERITED::onAbandon(); -} - -void* GrGLTransferBuffer::onMap() { - if (!this->wasDestroyed()) { - return fImpl.map(this->getGpuGL()); - } else { - return nullptr; - } -} - -void GrGLTransferBuffer::onUnmap() { - if (!this->wasDestroyed()) { - fImpl.unmap(this->getGpuGL()); - } -} - -void GrGLTransferBuffer::setMemoryBacking(SkTraceMemoryDump* traceMemoryDump, - const SkString& dumpName) const { - SkString buffer_id; - buffer_id.appendU32(this->bufferID()); - traceMemoryDump->setMemoryBacking(dumpName.c_str(), "gl_buffer", - buffer_id.c_str()); -} |