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

Unified Diff: src/gpu/GrVertices.h

Issue 1123823004: Fix vertex/index buffer leaks (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrVertices.h
diff --git a/src/gpu/GrVertices.h b/src/gpu/GrVertices.h
index cce5627c29e7fb50e046400e6a8c25734a3500fc..f03482662e40d2613fcf9a1d0ef56834d1cf6e51 100644
--- a/src/gpu/GrVertices.h
+++ b/src/gpu/GrVertices.h
@@ -29,7 +29,7 @@ public:
SkASSERT(vertexCount);
SkASSERT(startVertex >= 0);
fPrimitiveType = primType;
- fVertexBuffer.reset(SkRef(vertexBuffer));
+ fVertexBuffer.reset(vertexBuffer);
fIndexBuffer.reset(NULL);
fStartVertex = startVertex;
fStartIndex = 0;
@@ -54,8 +54,8 @@ public:
SkASSERT(startIndex >= 0);
SkASSERT(startVertex >= 0);
fPrimitiveType = primType;
- fVertexBuffer.reset(SkRef(vertexBuffer));
- fIndexBuffer.reset(SkRef(indexBuffer));
+ fVertexBuffer.reset(vertexBuffer);
+ fIndexBuffer.reset(indexBuffer);
fStartVertex = startVertex;
fStartIndex = startIndex;
fVertexCount = vertexCount;
@@ -79,8 +79,8 @@ public:
SkASSERT(indicesPerInstance);
SkASSERT(startVertex >= 0);
fPrimitiveType = primType;
- fVertexBuffer.reset(SkRef(vertexBuffer));
- fIndexBuffer.reset(SkRef(indexBuffer));
+ fVertexBuffer.reset(vertexBuffer);
+ fIndexBuffer.reset(indexBuffer);
fStartVertex = startVertex;
fStartIndex = 0;
fVerticesPerInstance = verticesPerInstance;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698