| Index: src/gpu/GrTargetCommands.h
|
| diff --git a/src/gpu/GrTargetCommands.h b/src/gpu/GrTargetCommands.h
|
| index cff9898dadcbab75c606ec7284646dd26b11bbf7..4ab41dbaf1e311b01bfc87e86d1b28116c9b5890 100644
|
| --- a/src/gpu/GrTargetCommands.h
|
| +++ b/src/gpu/GrTargetCommands.h
|
| @@ -56,6 +56,7 @@ public:
|
| kDrawPath_CmdType = 6,
|
| kDrawPaths_CmdType = 7,
|
| kDrawBatch_CmdType = 8,
|
| + kXferBarrier_CmdType = 9,
|
| };
|
|
|
| Cmd(CmdType type) : fMarkerID(-1), fType(type) {}
|
| @@ -151,6 +152,8 @@ private:
|
| GrBatch*,
|
| const GrDrawTarget::PipelineInfo&);
|
|
|
| + void recordXferBarrierIfNecessary(GrInOrderDrawBuffer*, const GrDrawTarget::PipelineInfo&);
|
| +
|
| struct Draw : public Cmd {
|
| Draw(const GrDrawTarget::DrawInfo& info) : Cmd(kDraw_CmdType), fInfo(info) {}
|
|
|
| @@ -276,6 +279,12 @@ private:
|
| const GrPipeline* getPipeline() const {
|
| return reinterpret_cast<const GrPipeline*>(fPipeline.get());
|
| }
|
| + GrRenderTarget* getRenderTarget() const {
|
| + return this->getPipeline()->getRenderTarget();
|
| + }
|
| + const GrXferProcessor* getXferProcessor() const {
|
| + return this->getPipeline()->getXferProcessor();
|
| + }
|
|
|
| void execute(GrGpu*, const SetState*) override;
|
|
|
| @@ -303,6 +312,14 @@ private:
|
| GrBatchTarget* fBatchTarget;
|
| };
|
|
|
| + struct XferBarrier : public Cmd {
|
| + XferBarrier() : Cmd(kXferBarrier_CmdType) {}
|
| +
|
| + void execute(GrGpu*, const SetState*) override;
|
| +
|
| + GrXferBarrierType fBarrierType;
|
| + };
|
| +
|
| static const int kCmdBufferInitialSizeInBytes = 8 * 1024;
|
|
|
| typedef void* TCmdAlign; // This wouldn't be enough align if a command used long double.
|
|
|