aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrTargetCommands.h
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2015-05-05 08:41:50 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-05-05 08:41:50 -0700
commite46760e8b2b2fc4a11a43a3b7cc9da7166c83c46 (patch)
tree3352ef7702062da1e143d152ac4a2605d1cff84c /src/gpu/GrTargetCommands.h
parentf4e0857fe9e7b606c36302a252f23a790427f899 (diff)
Create GrCommandBuilder
Diffstat (limited to 'src/gpu/GrTargetCommands.h')
-rw-r--r--src/gpu/GrTargetCommands.h44
1 files changed, 5 insertions, 39 deletions
diff --git a/src/gpu/GrTargetCommands.h b/src/gpu/GrTargetCommands.h
index 4dfad2f409..aaecac6989 100644
--- a/src/gpu/GrTargetCommands.h
+++ b/src/gpu/GrTargetCommands.h
@@ -24,9 +24,6 @@ class GrVertexBufferAllocPool;
class GrIndexBufferAllocPool;
class GrTargetCommands : ::SkNoncopyable {
- struct State;
- struct SetState;
-
public:
GrTargetCommands(GrGpu* gpu,
GrVertexBufferAllocPool* vertexPool,
@@ -68,43 +65,9 @@ public:
void reset();
void flush(GrInOrderDrawBuffer*);
- Cmd* recordClearStencilClip(const SkIRect& rect,
- bool insideClip,
- GrRenderTarget* renderTarget);
-
- Cmd* recordDiscard(GrRenderTarget*);
- Cmd* recordDrawBatch(State*, GrBatch*);
- Cmd* recordStencilPath(const GrPipelineBuilder&,
- const GrPathProcessor*,
- const GrPath*,
- const GrScissorState&,
- const GrStencilSettings&);
- Cmd* recordDrawPath(State*,
- const GrPathProcessor*,
- const GrPath*,
- const GrStencilSettings&);
- Cmd* recordDrawPaths(State*,
- GrInOrderDrawBuffer*,
- const GrPathProcessor*,
- const GrPathRange*,
- const void*,
- GrDrawTarget::PathIndexType,
- const float transformValues[],
- GrDrawTarget::PathTransformType ,
- int,
- const GrStencilSettings&,
- const GrDrawTarget::PipelineInfo&);
- Cmd* recordClear(const SkIRect* rect,
- GrColor,
- bool canIgnoreRect,
- GrRenderTarget*);
- Cmd* recordCopySurface(GrSurface* dst,
- GrSurface* src,
- const SkIRect& srcRect,
- const SkIPoint& dstPoint);
-
private:
- friend class GrInOrderDrawBuffer;
+ friend class GrCommandBuilder;
+ friend class GrInOrderDrawBuffer; // This goes away when State becomes just a pipeline
typedef GrGpu::DrawArgs DrawArgs;
@@ -293,6 +256,9 @@ private:
typedef void* TCmdAlign; // This wouldn't be enough align if a command used long double.
typedef GrTRecorder<Cmd, TCmdAlign> CmdBuffer;
+ CmdBuffer* cmdBuffer() { return &fCmdBuffer; }
+ GrBatchTarget* batchTarget() { return &fBatchTarget; }
+
CmdBuffer fCmdBuffer;
GrBatchTarget fBatchTarget;
};