diff options
author | bsalomon <bsalomon@google.com> | 2016-03-30 18:56:19 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-30 18:56:20 -0700 |
commit | 3724e574a744491b7cfb8187ac865a70ef3d4528 (patch) | |
tree | eb3dd729cbc0adef5ce2b4a2fa048fe21baeb35a /src/gpu/gl/debug/GrBufferObj.h | |
parent | 2238c9dbca4b791edc512957728a18ce14d55912 (diff) |
Move SkGLContext and some GrGLInterface implementations to skgputest module
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1815823002
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot
Committed: https://skia.googlesource.com/skia/+/fe3456cb006110d045b26ff3f8681b893a757b58
Review URL: https://codereview.chromium.org/1815823002
Diffstat (limited to 'src/gpu/gl/debug/GrBufferObj.h')
-rw-r--r-- | src/gpu/gl/debug/GrBufferObj.h | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/src/gpu/gl/debug/GrBufferObj.h b/src/gpu/gl/debug/GrBufferObj.h deleted file mode 100644 index 5b5015be96..0000000000 --- a/src/gpu/gl/debug/GrBufferObj.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright 2012 Google Inc. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#ifndef GrBufferObj_DEFINED -#define GrBufferObj_DEFINED - -#include "GrFakeRefObj.h" -#include "../GrGLDefines.h" - -//////////////////////////////////////////////////////////////////////////////// -class GrBufferObj : public GrFakeRefObj { - GR_DEFINE_CREATOR(GrBufferObj); - -public: - GrBufferObj() - : GrFakeRefObj() - , fDataPtr(nullptr) - , fMapped(false) - , fBound(false) - , fSize(0) - , fUsage(GR_GL_STATIC_DRAW) { - } - virtual ~GrBufferObj() { - delete[] fDataPtr; - } - - void access() { - // cannot access the buffer if it is currently mapped - GrAlwaysAssert(!fMapped); - } - - void setMapped(GrGLintptr offset, GrGLsizeiptr length) { - fMapped = true; - fMappedOffset = offset; - fMappedLength = length; - } - void resetMapped() { fMapped = false; } - bool getMapped() const { return fMapped; } - GrGLintptr getMappedOffset() const { return fMappedOffset; } - GrGLsizeiptr getMappedLength() const { return fMappedLength; } - - void setBound() { fBound = true; } - void resetBound() { fBound = false; } - bool getBound() const { return fBound; } - - void allocate(GrGLsizeiptr size, const GrGLchar *dataPtr); - GrGLsizeiptr getSize() const { return fSize; } - GrGLchar *getDataPtr() { return fDataPtr; } - - void setUsage(GrGLint usage) { fUsage = usage; } - GrGLint getUsage() const { return fUsage; } - - void deleteAction() override; - -protected: -private: - - GrGLchar* fDataPtr; - bool fMapped; // is the buffer object mapped via "glMapBuffer[Range]"? - GrGLintptr fMappedOffset; // the offset of the buffer range that is mapped - GrGLsizeiptr fMappedLength; // the size of the buffer range that is mapped - bool fBound; // is the buffer object bound via "glBindBuffer"? - GrGLsizeiptr fSize; // size in bytes - GrGLint fUsage; // one of: GL_STREAM_DRAW, - // GL_STATIC_DRAW, - // GL_DYNAMIC_DRAW - - typedef GrFakeRefObj INHERITED; -}; - -#endif // GrBufferObj_DEFINED |