Index: src/gpu/GrTargetCommands.h |
diff --git a/src/gpu/GrTargetCommands.h b/src/gpu/GrTargetCommands.h |
index 4b3dd574e3a537c05b0aaaee4ef33caf5100000e..65ee80d42c131d5a91070c314a68784160f63c78 100644 |
--- a/src/gpu/GrTargetCommands.h |
+++ b/src/gpu/GrTargetCommands.h |
@@ -47,6 +47,7 @@ public: |
kDrawPath_CmdType = 6, |
kDrawPaths_CmdType = 7, |
kDrawBatch_CmdType = 8, |
+ kXferBarrier_CmdType = 9, |
}; |
Cmd(CmdType type) : fMarkerID(-1), fType(type) {} |
@@ -143,6 +144,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) {} |
@@ -268,6 +271,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; |
@@ -295,6 +304,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. |