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

Unified Diff: src/gpu/GrGpuResourceRef.cpp

Issue 608883003: GrResourceCache2 manages scratch texture. (Closed) Base URL: https://skia.googlesource.com/skia.git@surfimpl
Patch Set: remove todo Created 6 years, 2 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/GrGpuResource.cpp ('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/GrGpuResourceRef.cpp
diff --git a/src/gpu/GrGpuResourceRef.cpp b/src/gpu/GrGpuResourceRef.cpp
index 7c521df462e8888b3257f922834d7a067f220313..9e0e6f8e50b6e94cdf105a6463b074fbdc434d37 100644
--- a/src/gpu/GrGpuResourceRef.cpp
+++ b/src/gpu/GrGpuResourceRef.cpp
@@ -13,7 +13,7 @@ GrGpuResourceRef::GrGpuResourceRef() {
fPendingIO = false;
}
-GrGpuResourceRef::GrGpuResourceRef(GrGpuResource* resource, GrIORef::IOType ioType) {
+GrGpuResourceRef::GrGpuResourceRef(GrGpuResource* resource, GrIOType ioType) {
fResource = NULL;
fOwnRef = false;
fPendingIO = false;
@@ -27,13 +27,13 @@ GrGpuResourceRef::~GrGpuResourceRef() {
}
if (fPendingIO) {
switch (fIOType) {
- case GrIORef::kRead_IOType:
+ case kRead_GrIOType:
fResource->completedRead();
break;
- case GrIORef::kWrite_IOType:
+ case kWrite_GrIOType:
fResource->completedWrite();
break;
- case GrIORef::kRW_IOType:
+ case kRW_GrIOType:
fResource->completedRead();
fResource->completedWrite();
break;
@@ -51,7 +51,7 @@ void GrGpuResourceRef::reset() {
}
}
-void GrGpuResourceRef::setResource(GrGpuResource* resource, GrIORef::IOType ioType) {
+void GrGpuResourceRef::setResource(GrGpuResource* resource, GrIOType ioType) {
SkASSERT(!fPendingIO);
SkASSERT(SkToBool(fResource) == fOwnRef);
SkSafeUnref(fResource);
@@ -72,13 +72,13 @@ void GrGpuResourceRef::markPendingIO() const {
SkASSERT(fResource);
fPendingIO = true;
switch (fIOType) {
- case GrIORef::kRead_IOType:
+ case kRead_GrIOType:
fResource->addPendingRead();
break;
- case GrIORef::kWrite_IOType:
+ case kWrite_GrIOType:
fResource->addPendingWrite();
break;
- case GrIORef::kRW_IOType:
+ case kRW_GrIOType:
fResource->addPendingRead();
fResource->addPendingWrite();
break;
@@ -91,13 +91,13 @@ void GrGpuResourceRef::pendingIOComplete() const {
SkASSERT(fOwnRef);
SkASSERT(fPendingIO);
switch (fIOType) {
- case GrIORef::kRead_IOType:
+ case kRead_GrIOType:
fResource->completedRead();
break;
- case GrIORef::kWrite_IOType:
+ case kWrite_GrIOType:
fResource->completedWrite();
break;
- case GrIORef::kRW_IOType:
+ case kRW_GrIOType:
fResource->completedRead();
fResource->completedWrite();
break;
« no previous file with comments | « src/gpu/GrGpuResource.cpp ('k') | src/gpu/GrInOrderDrawBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698