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

Unified Diff: src/gpu/GrDrawTarget.cpp

Issue 699733002: removing setVertexArraySource from drawtarget (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: a bit more cleanup Created 6 years, 1 month 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/GrDrawTarget.h ('k') | src/gpu/GrGpu.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawTarget.cpp
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
index 2f25272e31c356e935bce4e9b9784bcfb061a34f..903c91d93ff23407e80f9f1cc2df4af922cbd795 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -232,9 +232,6 @@ void GrDrawTarget::releasePreviousVertexSource() {
switch (geoSrc.fVertexSrc) {
case kNone_GeometrySrcType:
break;
- case kArray_GeometrySrcType:
- this->releaseVertexArray();
- break;
case kReserved_GeometrySrcType:
this->releaseReservedVertexSpace();
break;
@@ -255,9 +252,6 @@ void GrDrawTarget::releasePreviousIndexSource() {
switch (geoSrc.fIndexSrc) {
case kNone_GeometrySrcType: // these two don't require
break;
- case kArray_GeometrySrcType:
- this->releaseIndexArray();
- break;
case kReserved_GeometrySrcType:
this->releaseReservedIndexSpace();
break;
@@ -273,25 +267,6 @@ void GrDrawTarget::releasePreviousIndexSource() {
}
}
-void GrDrawTarget::setVertexSourceToArray(const void* vertexArray,
- int vertexCount) {
- this->releasePreviousVertexSource();
- GeometrySrcState& geoSrc = fGeoSrcStateStack.back();
- geoSrc.fVertexSrc = kArray_GeometrySrcType;
- geoSrc.fVertexSize = this->drawState()->getVertexStride();
- geoSrc.fVertexCount = vertexCount;
- this->onSetVertexSourceToArray(vertexArray, vertexCount);
-}
-
-void GrDrawTarget::setIndexSourceToArray(const void* indexArray,
- int indexCount) {
- this->releasePreviousIndexSource();
- GeometrySrcState& geoSrc = fGeoSrcStateStack.back();
- geoSrc.fIndexSrc = kArray_GeometrySrcType;
- geoSrc.fIndexCount = indexCount;
- this->onSetIndexSourceToArray(indexArray, indexCount);
-}
-
void GrDrawTarget::setVertexSourceToBuffer(const GrVertexBuffer* buffer) {
this->releasePreviousVertexSource();
GeometrySrcState& geoSrc = fGeoSrcStateStack.back();
@@ -358,7 +333,6 @@ bool GrDrawTarget::checkDraw(GrPrimitiveType type, int startVertex,
case kNone_GeometrySrcType:
SkFAIL("Attempting to draw without vertex src.");
case kReserved_GeometrySrcType: // fallthrough
- case kArray_GeometrySrcType:
maxValidVertex = geoSrc.fVertexCount;
break;
case kBuffer_GeometrySrcType:
@@ -375,7 +349,6 @@ bool GrDrawTarget::checkDraw(GrPrimitiveType type, int startVertex,
case kNone_GeometrySrcType:
SkFAIL("Attempting to draw indexed geom without index src.");
case kReserved_GeometrySrcType: // fallthrough
- case kArray_GeometrySrcType:
maxValidIndex = geoSrc.fIndexCount;
break;
case kBuffer_GeometrySrcType:
« no previous file with comments | « src/gpu/GrDrawTarget.h ('k') | src/gpu/GrGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698