aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrGpuResourceRef.h
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2018-02-01 09:10:04 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-02-01 15:00:53 +0000
commit620003692923dc6c6df5a1b66288988b6783a69f (patch)
tree5010067f4d26fb23f28964e74b5e37c38e3dddc3 /src/gpu/GrGpuResourceRef.h
parent5f9ee7cc53d28c8ff2d000436bfee195c493ccdf (diff)
Implement GPU/OpList DDLs
This relies on https://skia-review.googlesource.com/c/skia/+/102101 (Add SkSurface_Gpu::MakeWrappedRenderTarget method) landing first TBR=bsalomon@google.com Change-Id: I4d2d66af5800407f638ef32d7b19ce49084bd4e4 Reviewed-on: https://skia-review.googlesource.com/102263 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/gpu/GrGpuResourceRef.h')
-rw-r--r--src/gpu/GrGpuResourceRef.h60
1 files changed, 1 insertions, 59 deletions
diff --git a/src/gpu/GrGpuResourceRef.h b/src/gpu/GrGpuResourceRef.h
index f9e122d9e8..410513944f 100644
--- a/src/gpu/GrGpuResourceRef.h
+++ b/src/gpu/GrGpuResourceRef.h
@@ -87,65 +87,6 @@ private:
typedef SkNoncopyable INHERITED;
};
-class GrSurfaceProxy;
-
-class GrSurfaceProxyRef : SkNoncopyable {
-public:
- virtual ~GrSurfaceProxyRef();
-
- GrSurfaceProxy* get() const { return fProxy; }
-
- /** Does this object own a pending read or write on the resource it is wrapping. */
- bool ownsPendingIO() const { return fPendingIO; }
-
- /** What type of IO does this represent? This is independent of whether a normal ref or a
- pending IO is currently held. */
- GrIOType ioType() const { return fIOType; }
-
- /** Shortcut for calling setProxy() with NULL. It cannot be called after markingPendingIO
- is called. */
- void reset();
-
-protected:
- GrSurfaceProxyRef();
-
- /** ioType expresses what type of IO operations will be marked as
- pending on the resource when markPendingIO is called. */
- GrSurfaceProxyRef(sk_sp<GrSurfaceProxy>, GrIOType);
-
- /** ioType expresses what type of IO operations will be marked as
- pending on the resource when markPendingIO is called. */
- void setProxy(sk_sp<GrSurfaceProxy>, GrIOType);
-
-private:
- /** Called by owning GrProgramElement when the program element is first scheduled for
- execution. It can only be called once. */
- void markPendingIO() const;
-
- /** Called when the program element/draw state is no longer owned by GrOpList-client code.
- This lets the cache know that the drawing code will no longer schedule additional reads or
- writes to the resource using the program element or draw state. It can only be called once.
- */
- void removeRef() const;
-
- /** Called to indicate that the previous pending IO is complete. Useful when the owning object
- still has refs, so it is not about to destroy this GrGpuResourceRef, but its previously
- pending executions have been complete. Can only be called if removeRef() was not previously
- called. */
- void pendingIOComplete() const;
-
- friend class GrResourceIOProcessor;
- friend class GrOpList; // for setProxy
-
- GrSurfaceProxy* fProxy;
- mutable bool fOwnRef;
- mutable bool fPendingIO;
- GrIOType fIOType;
-
- typedef SkNoncopyable INHERITED;
-};
-
-
/**
* Templated version of GrGpuResourceRef to enforce type safety.
*/
@@ -233,4 +174,5 @@ private:
T* fResource;
};
+
#endif