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

Unified Diff: src/gpu/GrGpu.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/GrGpu.h ('k') | src/gpu/GrInOrderDrawBuffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrGpu.cpp
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
index f7b9537ecc8eb7f98e372b73cc69d214488a8cc9..8cccd35fff4dfa844f38e4e78ee4a2e8ac2fc9ca 100644
--- a/src/gpu/GrGpu.cpp
+++ b/src/gpu/GrGpu.cpp
@@ -291,12 +291,10 @@ bool GrGpu::setupClipAndFlushState(DrawType type,
void GrGpu::geometrySourceWillPush() {
const GeometrySrcState& geoSrc = this->getGeomSrc();
- if (kArray_GeometrySrcType == geoSrc.fVertexSrc ||
- kReserved_GeometrySrcType == geoSrc.fVertexSrc) {
+ if (kReserved_GeometrySrcType == geoSrc.fVertexSrc) {
this->finalizeReservedVertices();
}
- if (kArray_GeometrySrcType == geoSrc.fIndexSrc ||
- kReserved_GeometrySrcType == geoSrc.fIndexSrc) {
+ if (kReserved_GeometrySrcType == geoSrc.fIndexSrc) {
this->finalizeReservedIndices();
}
GeometryPoolState& newState = fGeomPoolStateStack.push_back();
@@ -514,50 +512,3 @@ void GrGpu::releaseReservedIndexSpace() {
fIndexPool->putBack(bytes);
--fIndexPoolUseCnt;
}
-
-void GrGpu::onSetVertexSourceToArray(const void* vertexArray, int vertexCount) {
- this->prepareVertexPool();
- GeometryPoolState& geomPoolState = fGeomPoolStateStack.back();
-#ifdef SK_DEBUG
- bool success =
-#endif
- fVertexPool->appendVertices(this->getVertexSize(),
- vertexCount,
- vertexArray,
- &geomPoolState.fPoolVertexBuffer,
- &geomPoolState.fPoolStartVertex);
- ++fVertexPoolUseCnt;
- GR_DEBUGASSERT(success);
-}
-
-void GrGpu::onSetIndexSourceToArray(const void* indexArray, int indexCount) {
- this->prepareIndexPool();
- GeometryPoolState& geomPoolState = fGeomPoolStateStack.back();
-#ifdef SK_DEBUG
- bool success =
-#endif
- fIndexPool->appendIndices(indexCount,
- indexArray,
- &geomPoolState.fPoolIndexBuffer,
- &geomPoolState.fPoolStartIndex);
- ++fIndexPoolUseCnt;
- GR_DEBUGASSERT(success);
-}
-
-void GrGpu::releaseVertexArray() {
- // if vertex source was array, we stowed data in the pool
- const GeometrySrcState& geoSrc = this->getGeomSrc();
- SkASSERT(kArray_GeometrySrcType == geoSrc.fVertexSrc);
- size_t bytes = geoSrc.fVertexCount * geoSrc.fVertexSize;
- fVertexPool->putBack(bytes);
- --fVertexPoolUseCnt;
-}
-
-void GrGpu::releaseIndexArray() {
- // if index source was array, we stowed data in the pool
- const GeometrySrcState& geoSrc = this->getGeomSrc();
- SkASSERT(kArray_GeometrySrcType == geoSrc.fIndexSrc);
- size_t bytes = geoSrc.fIndexCount * sizeof(uint16_t);
- fIndexPool->putBack(bytes);
- --fIndexPoolUseCnt;
-}
« no previous file with comments | « src/gpu/GrGpu.h ('k') | src/gpu/GrInOrderDrawBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698