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

Unified Diff: src/gpu/GrInOrderDrawBuffer.h

Issue 579403003: Move IOType to GrGpuRef and rename that to GrIORef. Template GrPendingIORef on IOType. (Closed) Base URL: https://skia.googlesource.com/skia.git@ref
Patch Set: rebase again 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 | « src/gpu/GrGpuResourceRef.cpp ('k') | src/gpu/GrRODrawState.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrInOrderDrawBuffer.h
diff --git a/src/gpu/GrInOrderDrawBuffer.h b/src/gpu/GrInOrderDrawBuffer.h
index 532b83f1d1ca9f1c50adc1d9b3401982f577fc26..e6ed06eadbf518b326f3df3a952bea0c524a4f0b 100644
--- a/src/gpu/GrInOrderDrawBuffer.h
+++ b/src/gpu/GrInOrderDrawBuffer.h
@@ -102,30 +102,30 @@ private:
public:
Draw(const DrawInfo& info, const GrVertexBuffer* vb, const GrIndexBuffer* ib)
: DrawInfo(info)
- , fVertexBuffer(vb, GrGpuResourceRef::kRead_IOType)
- , fIndexBuffer(ib, GrGpuResourceRef::kRead_IOType) {}
+ , fVertexBuffer(vb)
+ , fIndexBuffer(ib) {}
const GrVertexBuffer* vertexBuffer() const { return fVertexBuffer.get(); }
const GrIndexBuffer* indexBuffer() const { return fIndexBuffer.get(); }
private:
- GrPendingIOResource<const GrVertexBuffer> fVertexBuffer;
- GrPendingIOResource<const GrIndexBuffer> fIndexBuffer;
+ GrPendingIOResource<const GrVertexBuffer, GrIORef::kRead_IOType> fVertexBuffer;
+ GrPendingIOResource<const GrIndexBuffer, GrIORef::kRead_IOType> fIndexBuffer;
};
struct StencilPath : public ::SkNoncopyable {
- StencilPath(const GrPath* path) : fPath(path, GrGpuResourceRef::kRead_IOType) {}
+ StencilPath(const GrPath* path) : fPath(path) {}
const GrPath* path() const { return fPath.get(); }
SkPath::FillType fFill;
private:
- GrPendingIOResource<const GrPath> fPath;
+ GrPendingIOResource<const GrPath, GrIORef::kRead_IOType> fPath;
};
struct DrawPath : public ::SkNoncopyable {
- DrawPath(const GrPath* path) : fPath(path, GrGpuResourceRef::kRead_IOType) {}
+ DrawPath(const GrPath* path) : fPath(path) {}
const GrPath* path() const { return fPath.get(); }
@@ -133,12 +133,12 @@ private:
GrDeviceCoordTexture fDstCopy;
private:
- GrPendingIOResource<const GrPath> fPath;
+ GrPendingIOResource<const GrPath, GrIORef::kRead_IOType> fPath;
};
struct DrawPaths : public ::SkNoncopyable {
DrawPaths(const GrPathRange* pathRange)
- : fPathRange(pathRange, GrGpuResourceRef::kRead_IOType) {}
+ : fPathRange(pathRange) {}
~DrawPaths() {
if (fTransforms) {
@@ -159,12 +159,12 @@ private:
GrDeviceCoordTexture fDstCopy;
private:
- GrPendingIOResource<const GrPathRange> fPathRange;
+ GrPendingIOResource<const GrPathRange, GrIORef::kRead_IOType> fPathRange;
};
// This is also used to record a discard by setting the color to GrColor_ILLEGAL
struct Clear : public ::SkNoncopyable {
- Clear(GrRenderTarget* rt) : fRenderTarget(rt, GrGpuResourceRef::kWrite_IOType) {}
+ Clear(GrRenderTarget* rt) : fRenderTarget(rt) {}
~Clear() { }
GrRenderTarget* renderTarget() const { return fRenderTarget.get(); }
@@ -173,13 +173,11 @@ private:
bool fCanIgnoreRect;
private:
- GrPendingIOResource<GrRenderTarget> fRenderTarget;
+ GrPendingIOResource<GrRenderTarget, GrIORef::kWrite_IOType> fRenderTarget;
};
struct CopySurface : public ::SkNoncopyable {
- CopySurface(GrSurface* dst, GrSurface* src)
- : fDst(dst, GrGpuResourceRef::kWrite_IOType)
- , fSrc(src, GrGpuResourceRef::kRead_IOType) {}
+ CopySurface(GrSurface* dst, GrSurface* src) : fDst(dst), fSrc(src) {}
GrSurface* dst() const { return fDst.get(); }
GrSurface* src() const { return fSrc.get(); }
@@ -188,8 +186,8 @@ private:
SkIRect fSrcRect;
private:
- GrPendingIOResource<GrSurface> fDst;
- GrPendingIOResource<GrSurface> fSrc;
+ GrPendingIOResource<GrSurface, GrIORef::kWrite_IOType> fDst;
+ GrPendingIOResource<GrSurface, GrIORef::kRead_IOType> fSrc;
};
struct Clip : public ::SkNoncopyable {
« no previous file with comments | « src/gpu/GrGpuResourceRef.cpp ('k') | src/gpu/GrRODrawState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698