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

Unified Diff: include/gpu/GrGpuResourceRef.h

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 | « include/gpu/GrGpuResource.h ('k') | include/gpu/GrTexture.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « include/gpu/GrGpuResource.h ('k') | include/gpu/GrTexture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698