diff options
Diffstat (limited to 'gpu/GrGpu.cpp')
-rw-r--r-- | gpu/GrGpu.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/gpu/GrGpu.cpp b/gpu/GrGpu.cpp index d8f65d52..bc929525 100644 --- a/gpu/GrGpu.cpp +++ b/gpu/GrGpu.cpp @@ -57,11 +57,11 @@ void GrGpu::abandonResources() { fClipMaskManager.releaseResources(); - while (NULL != fResourceList.head()) { - fResourceList.head()->abandon(); + while (NULL != fObjectList.head()) { + fObjectList.head()->abandon(); } - SkASSERT(NULL == fQuadIndexBuffer || !fQuadIndexBuffer->isValid()); + SkASSERT(NULL == fQuadIndexBuffer || fQuadIndexBuffer->wasDestroyed()); SkSafeSetNull(fQuadIndexBuffer); delete fVertexPool; fVertexPool = NULL; @@ -73,11 +73,11 @@ void GrGpu::releaseResources() { fClipMaskManager.releaseResources(); - while (NULL != fResourceList.head()) { - fResourceList.head()->release(); + while (NULL != fObjectList.head()) { + fObjectList.head()->release(); } - SkASSERT(NULL == fQuadIndexBuffer || !fQuadIndexBuffer->isValid()); + SkASSERT(NULL == fQuadIndexBuffer || fQuadIndexBuffer->wasDestroyed()); SkSafeSetNull(fQuadIndexBuffer); delete fVertexPool; fVertexPool = NULL; @@ -85,18 +85,18 @@ void GrGpu::releaseResources() { fIndexPool = NULL; } -void GrGpu::insertResource(GrResource* resource) { - SkASSERT(NULL != resource); - SkASSERT(this == resource->getGpu()); +void GrGpu::insertObject(GrGpuObject* object) { + SkASSERT(NULL != object); + SkASSERT(this == object->getGpu()); - fResourceList.addToHead(resource); + fObjectList.addToHead(object); } -void GrGpu::removeResource(GrResource* resource) { - SkASSERT(NULL != resource); - SkASSERT(this == resource->getGpu()); +void GrGpu::removeObject(GrGpuObject* object) { + SkASSERT(NULL != object); + SkASSERT(this == object->getGpu()); - fResourceList.remove(resource); + fObjectList.remove(object); } @@ -265,7 +265,7 @@ void GrGpu::getPathStencilSettingsForFillType(SkPath::FillType fill, GrStencilSe switch (fill) { default: - GrCrash("Unexpected path fill."); + SkFAIL("Unexpected path fill."); /* fallthrough */; case SkPath::kWinding_FillType: case SkPath::kInverseWinding_FillType: @@ -313,7 +313,7 @@ const GrIndexBuffer* GrGpu::getQuadIndexBuffer() const { if (!fQuadIndexBuffer->updateData(indices, SIZE)) { fQuadIndexBuffer->unref(); fQuadIndexBuffer = NULL; - GrCrash("Can't get indices into buffer!"); + SkFAIL("Can't get indices into buffer!"); } sk_free(indices); } |