aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrMesh.h
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2016-03-25 04:55:58 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-25 04:55:59 -0700
commitf8c3ba40cf4f42b2c2ba1b473c28d7733383223e (patch)
tree00c671765311aaa35c8a9d6fa0a6b84907c871b9 /src/gpu/GrMesh.h
parentf299e7105435829c47e94f4cf6e408cad675bc77 (diff)
Revert of Consolidate GPU buffer implementations (patchset #10 id:180001 of https://codereview.chromium.org/1825393002/ )
Reason for revert: Lots of Android redness Original issue's description: > Consolidate GPU buffer implementations > > Consolidates all the different buffer implementations into a single > GrBuffer class. This will allow us to add new buffer types, use DSA in > OpenGL, track buffer bindings by unique ID, cache buffers without > respect to the type of data they have been used for previously, etc. > This change is strictly a refactor; it introduces no change in > functionality. > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1825393002 > > Committed: https://skia.googlesource.com/skia/+/8b1bff29675afd25843439eade634a57f68fe16f TBR=bsalomon@google.com,egdaniel@google.com,jvanverth@google.com,cdalton@nvidia.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1831133004
Diffstat (limited to 'src/gpu/GrMesh.h')
-rw-r--r--src/gpu/GrMesh.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/gpu/GrMesh.h b/src/gpu/GrMesh.h
index 964e0b4a8e..5ff23dcfd0 100644
--- a/src/gpu/GrMesh.h
+++ b/src/gpu/GrMesh.h
@@ -8,8 +8,8 @@
#ifndef GrMesh_DEFINED
#define GrMesh_DEFINED
-#include "GrBuffer.h"
-#include "GrGpuResourceRef.h"
+#include "GrIndexBuffer.h"
+#include "GrVertexBuffer.h"
class GrNonInstancedMesh {
public:
@@ -20,8 +20,8 @@ public:
int indexCount() const { return fIndexCount; }
bool isIndexed() const { return fIndexCount > 0; }
- const GrBuffer* vertexBuffer() const { return fVertexBuffer.get(); }
- const GrBuffer* indexBuffer() const { return fIndexBuffer.get(); }
+ const GrVertexBuffer* vertexBuffer() const { return fVertexBuffer.get(); }
+ const GrIndexBuffer* indexBuffer() const { return fIndexBuffer.get(); }
protected:
GrPrimitiveType fPrimitiveType;
@@ -29,8 +29,8 @@ protected:
int fStartIndex;
int fVertexCount;
int fIndexCount;
- GrPendingIOResource<const GrBuffer, kRead_GrIOType> fVertexBuffer;
- GrPendingIOResource<const GrBuffer, kRead_GrIOType> fIndexBuffer;
+ GrPendingIOResource<const GrVertexBuffer, kRead_GrIOType> fVertexBuffer;
+ GrPendingIOResource<const GrIndexBuffer, kRead_GrIOType> fIndexBuffer;
friend class GrMesh;
};
@@ -46,7 +46,7 @@ public:
GrMesh(const GrMesh& di) { (*this) = di; }
GrMesh& operator =(const GrMesh& di);
- void init(GrPrimitiveType primType, const GrBuffer* vertexBuffer, int startVertex,
+ void init(GrPrimitiveType primType, const GrVertexBuffer* vertexBuffer, int startVertex,
int vertexCount) {
SkASSERT(vertexBuffer);
SkASSERT(vertexCount);
@@ -65,8 +65,8 @@ public:
}
void initIndexed(GrPrimitiveType primType,
- const GrBuffer* vertexBuffer,
- const GrBuffer* indexBuffer,
+ const GrVertexBuffer* vertexBuffer,
+ const GrIndexBuffer* indexBuffer,
int startVertex,
int startIndex,
int vertexCount,
@@ -95,8 +95,8 @@ public:
the number of instances supported by the index buffer. To be used with
nextInstances() to draw in max-sized batches.*/
void initInstanced(GrPrimitiveType primType,
- const GrBuffer* vertexBuffer,
- const GrBuffer* indexBuffer,
+ const GrVertexBuffer* vertexBuffer,
+ const GrIndexBuffer* indexBuffer,
int startVertex,
int verticesPerInstance,
int indicesPerInstance,