Fix vertex/index buffer leaks
TBR=robertphillips@google.com Review URL: https://codereview.chromium.org/1123823004
This commit is contained in:
parent
e3aeaec7dd
commit
301f989c65
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user