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

Unified Diff: src/gpu/GrMesh.h

Issue 1825393002: Consolidate GPU buffer implementations (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: asserts 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 | « src/gpu/GrIndexBuffer.h ('k') | src/gpu/GrOvalRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrMesh.h
diff --git a/src/gpu/GrMesh.h b/src/gpu/GrMesh.h
index 5ff23dcfd095c199d8444ca6a9602d8ad8532777..964e0b4a8e166d880ac5865a13f1556ebee6ff97 100644
--- a/src/gpu/GrMesh.h
+++ b/src/gpu/GrMesh.h
@@ -8,8 +8,8 @@
#ifndef GrMesh_DEFINED
#define GrMesh_DEFINED
-#include "GrIndexBuffer.h"
-#include "GrVertexBuffer.h"
+#include "GrBuffer.h"
+#include "GrGpuResourceRef.h"
class GrNonInstancedMesh {
public:
@@ -20,8 +20,8 @@ public:
int indexCount() const { return fIndexCount; }
bool isIndexed() const { return fIndexCount > 0; }
- const GrVertexBuffer* vertexBuffer() const { return fVertexBuffer.get(); }
- const GrIndexBuffer* indexBuffer() const { return fIndexBuffer.get(); }
+ const GrBuffer* vertexBuffer() const { return fVertexBuffer.get(); }
+ const GrBuffer* indexBuffer() const { return fIndexBuffer.get(); }
protected:
GrPrimitiveType fPrimitiveType;
@@ -29,8 +29,8 @@ protected:
int fStartIndex;
int fVertexCount;
int fIndexCount;
- GrPendingIOResource<const GrVertexBuffer, kRead_GrIOType> fVertexBuffer;
- GrPendingIOResource<const GrIndexBuffer, kRead_GrIOType> fIndexBuffer;
+ GrPendingIOResource<const GrBuffer, kRead_GrIOType> fVertexBuffer;
+ GrPendingIOResource<const GrBuffer, 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 GrVertexBuffer* vertexBuffer, int startVertex,
+ void init(GrPrimitiveType primType, const GrBuffer* vertexBuffer, int startVertex,
int vertexCount) {
SkASSERT(vertexBuffer);
SkASSERT(vertexCount);
@@ -65,8 +65,8 @@ public:
}
void initIndexed(GrPrimitiveType primType,
- const GrVertexBuffer* vertexBuffer,
- const GrIndexBuffer* indexBuffer,
+ const GrBuffer* vertexBuffer,
+ const GrBuffer* 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 GrVertexBuffer* vertexBuffer,
- const GrIndexBuffer* indexBuffer,
+ const GrBuffer* vertexBuffer,
+ const GrBuffer* indexBuffer,
int startVertex,
int verticesPerInstance,
int indicesPerInstance,
« no previous file with comments | « src/gpu/GrIndexBuffer.h ('k') | src/gpu/GrOvalRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698