Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(665)

Unified Diff: tools/gpu/gl/debug/GrBufferObj.h

Issue 1845473004: Revert of Move SkGLContext and some GrGLInterface implementations to skgputest module (Closed) Base URL: https://chromium.googlesource.com/skia.git@debugobject
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gpu/gl/debug/DebugGLContext.cpp ('k') | tools/gpu/gl/debug/GrBufferObj.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gpu/gl/debug/GrBufferObj.h
diff --git a/tools/gpu/gl/debug/GrBufferObj.h b/tools/gpu/gl/debug/GrBufferObj.h
deleted file mode 100644
index 96aef6ed0a9bbaaab22549640d13efa2170bb78b..0000000000000000000000000000000000000000
--- a/tools/gpu/gl/debug/GrBufferObj.h
+++ /dev/null
@@ -1,76 +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 "gl/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
« no previous file with comments | « tools/gpu/gl/debug/DebugGLContext.cpp ('k') | tools/gpu/gl/debug/GrBufferObj.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698