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

Unified Diff: src/gpu/GrInOrderDrawBuffer.h

Issue 746243002: Create GrOptDrawState directly in the cmd buffer in GrIODB. (Closed) Base URL: https://skia.googlesource.com/skia.git@recorder
Patch Set: Address comments Created 6 years, 1 month 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/GrGpuResourceRef.h ('k') | src/gpu/GrInOrderDrawBuffer.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 ab7dd77a6d646955fdae7d36e12179c27442f312..9d9f23cd1f95d9269ffea7344fcb9d039dce0937 100644
--- a/src/gpu/GrInOrderDrawBuffer.h
+++ b/src/gpu/GrInOrderDrawBuffer.h
@@ -118,7 +118,7 @@ private:
struct Draw : public Cmd {
Draw(const DrawInfo& info) : Cmd(kDraw_Cmd), fInfo(info) {}
- virtual void execute(GrInOrderDrawBuffer*, const GrOptDrawState*);
+ void execute(GrInOrderDrawBuffer*, const GrOptDrawState*) SK_OVERRIDE;
DrawInfo fInfo;
};
@@ -128,7 +128,7 @@ private:
const GrPath* path() const { return fPath.get(); }
- virtual void execute(GrInOrderDrawBuffer*, const GrOptDrawState*);
+ void execute(GrInOrderDrawBuffer*, const GrOptDrawState*) SK_OVERRIDE;
GrStencilSettings fStencilSettings;
@@ -141,7 +141,7 @@ private:
const GrPath* path() const { return fPath.get(); }
- virtual void execute(GrInOrderDrawBuffer*, const GrOptDrawState*);
+ void execute(GrInOrderDrawBuffer*, const GrOptDrawState*) SK_OVERRIDE;
GrStencilSettings fStencilSettings;
@@ -154,7 +154,7 @@ private:
const GrPathRange* pathRange() const { return fPathRange.get(); }
- virtual void execute(GrInOrderDrawBuffer*, const GrOptDrawState*);
+ void execute(GrInOrderDrawBuffer*, const GrOptDrawState*) SK_OVERRIDE;
int fIndicesLocation;
size_t fCount;
@@ -172,7 +172,7 @@ private:
GrRenderTarget* renderTarget() const { return fRenderTarget.get(); }
- virtual void execute(GrInOrderDrawBuffer*, const GrOptDrawState*);
+ void execute(GrInOrderDrawBuffer*, const GrOptDrawState*) SK_OVERRIDE;
SkIRect fRect;
GrColor fColor;
@@ -188,7 +188,7 @@ private:
GrRenderTarget* renderTarget() const { return fRenderTarget.get(); }
- virtual void execute(GrInOrderDrawBuffer*, const GrOptDrawState*);
+ void execute(GrInOrderDrawBuffer*, const GrOptDrawState*) SK_OVERRIDE;
SkIRect fRect;
bool fInsideClip;
@@ -203,7 +203,7 @@ private:
GrSurface* dst() const { return fDst.get(); }
GrSurface* src() const { return fSrc.get(); }
- virtual void execute(GrInOrderDrawBuffer*, const GrOptDrawState*);
+ void execute(GrInOrderDrawBuffer*, const GrOptDrawState*) SK_OVERRIDE;
SkIPoint fDstPoint;
SkIRect fSrcRect;
@@ -214,12 +214,15 @@ private:
};
struct SetState : public Cmd {
- SetState(const GrOptDrawState* state) : Cmd(kSetState_Cmd), fState(SkRef(state)) {}
+ SetState(const GrDrawState& drawState, GrGpu* gpu, const ScissorState& scissor,
+ const GrDeviceCoordTexture* dstCopy, GrGpu::DrawType drawType)
+ : Cmd(kSetState_Cmd)
+ , fState(drawState, gpu, scissor, dstCopy, drawType) {}
- virtual void execute(GrInOrderDrawBuffer*, const GrOptDrawState*);
+ void execute(GrInOrderDrawBuffer*, const GrOptDrawState*) SK_OVERRIDE;
- SkAutoTUnref<const GrOptDrawState> fState;
- GrGpu::DrawType fDrawType;
+ const GrOptDrawState fState;
+ GrGpu::DrawType fDrawType;
};
typedef void* TCmdAlign; // This wouldn't be enough align if a command used long double.
@@ -310,7 +313,7 @@ private:
typedef SkSTArray<kGeoPoolStatePreAllocCnt, GeometryPoolState> GeoPoolStateStack;
CmdBuffer fCmdBuffer;
- SkAutoTUnref<const GrOptDrawState> fLastState;
+ const GrOptDrawState* fPrevState;
SkTArray<GrTraceMarkerSet, false> fGpuCmdMarkers;
GrGpu* fDstGpu;
GrVertexBufferAllocPool& fVertexPool;
« no previous file with comments | « include/gpu/GrGpuResourceRef.h ('k') | src/gpu/GrInOrderDrawBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698