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

Unified Diff: src/gpu/GrGpu.cpp

Issue 251013002: Split GrResource into GrCacheable/GrGpuObject (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase Created 6 years, 8 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 | « src/gpu/GrGpu.h ('k') | src/gpu/GrGpuObject.cpp » ('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 82da8c2fe2a04cce4609cd7a839e39d9b2a62a47..bc9295252aed58ed327a4261bd8de761bb9174e9 100644
--- a/src/gpu/GrGpu.cpp
+++ b/src/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);
}
« no previous file with comments | « src/gpu/GrGpu.h ('k') | src/gpu/GrGpuObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698