Index: include/gpu/GrGpuResourceRef.h |
diff --git a/include/gpu/GrGpuResourceRef.h b/include/gpu/GrGpuResourceRef.h |
index 3320dc069fe841dc467288871cd623bca84c698f..0223f18977e1d99acf8fc38fd84b52a58842221a 100644 |
--- a/include/gpu/GrGpuResourceRef.h |
+++ b/include/gpu/GrGpuResourceRef.h |
@@ -52,11 +52,11 @@ protected: |
/** Adopts a ref from the caller. ioType expresses what type of IO operations will be marked as |
pending on the resource when markPendingIO is called. */ |
- GrGpuResourceRef(GrGpuResource*, GrIORef::IOType); |
+ GrGpuResourceRef(GrGpuResource*, GrIOType); |
/** Adopts a ref from the caller. ioType expresses what type of IO operations will be marked as |
pending on the resource when markPendingIO is called. */ |
- void setResource(GrGpuResource*, GrIORef::IOType); |
+ void setResource(GrGpuResource*, GrIOType); |
private: |
/** Called by owning GrProgramElement when the program element is first scheduled for |
@@ -79,10 +79,10 @@ private: |
friend class GrOptDrawState; |
friend class GrProgramElement; |
- GrGpuResource* fResource; |
- mutable bool fOwnRef; |
- mutable bool fPendingIO; |
- GrIORef::IOType fIOType; |
+ GrGpuResource* fResource; |
+ mutable bool fOwnRef; |
+ mutable bool fPendingIO; |
+ GrIOType fIOType; |
typedef SkNoncopyable INHERITED; |
}; |
@@ -96,13 +96,13 @@ public: |
/** Adopts a ref from the caller. ioType expresses what type of IO operations will be marked as |
pending on the resource when markPendingIO is called. */ |
- GrTGpuResourceRef(T* resource, GrIORef::IOType ioType) : INHERITED(resource, ioType) {} |
+ GrTGpuResourceRef(T* resource, GrIOType ioType) : INHERITED(resource, ioType) {} |
T* get() const { return static_cast<T*>(this->getResource()); } |
/** Adopts a ref from the caller. ioType expresses what type of IO operations will be marked as |
pending on the resource when markPendingIO is called. */ |
- void set(T* resource, GrIORef::IOType ioType) { this->setResource(resource, ioType); } |
+ void set(T* resource, GrIOType ioType) { this->setResource(resource, ioType); } |
private: |
typedef GrGpuResourceRef INHERITED; |
@@ -112,18 +112,18 @@ private: |
* This is similar to GrTGpuResourceRef but can only be in the pending IO state. It never owns a |
* ref. |
*/ |
-template <typename T, GrIORef::IOType IO_TYPE> class GrPendingIOResource : SkNoncopyable { |
+template <typename T, GrIOType IO_TYPE> class GrPendingIOResource : SkNoncopyable { |
public: |
GrPendingIOResource(T* resource) : fResource(resource) { |
if (NULL != fResource) { |
switch (IO_TYPE) { |
- 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; |
@@ -134,13 +134,13 @@ public: |
~GrPendingIOResource() { |
if (NULL != fResource) { |
switch (IO_TYPE) { |
- 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; |
@@ -151,6 +151,6 @@ public: |
T* get() const { return fResource; } |
private: |
- T* fResource; |
+ T* fResource; |
}; |
#endif |