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

Unified Diff: include/gpu/GrGpuResource.h

Issue 586073002: Don't flush on read/write pixels unless necessary (Closed) Base URL: https://skia.googlesource.com/skia.git@iotype
Patch Set: Flush when drawing direct to GrGpu in GrContext Created 6 years, 3 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 | « no previous file | include/gpu/GrSurface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrGpuResource.h
diff --git a/include/gpu/GrGpuResource.h b/include/gpu/GrGpuResource.h
index f20bad3e9f57580ba416711a337bac071aada82c..61849e7232fd9f23df1219429d7355580a2606ef 100644
--- a/include/gpu/GrGpuResource.h
+++ b/include/gpu/GrGpuResource.h
@@ -80,9 +80,14 @@ public:
#endif
}
+
protected:
GrIORef() : fRefCnt(1), fPendingReads(0), fPendingWrites(0) {}
+ bool internalHasPendingRead() const { return SkToBool(fPendingReads); }
+ bool internalHasPendingWrite() const { return SkToBool(fPendingWrites); }
+ bool internalHasPendingIO() const { return SkToBool(fPendingWrites | fPendingReads); }
+
private:
void addPendingRead() const {
this->validate();
« no previous file with comments | « no previous file | include/gpu/GrSurface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698