Index: src/gpu/GrTargetCommands.h |
diff --git a/src/gpu/GrTargetCommands.h b/src/gpu/GrTargetCommands.h |
index 57e2971baa280d8668414964b2a52aa46c85cf98..206b626da217ec4e6ed4aed387f43ca3e8549dc9 100644 |
--- a/src/gpu/GrTargetCommands.h |
+++ b/src/gpu/GrTargetCommands.h |
@@ -33,7 +33,8 @@ public: |
: fCmdBuffer(kCmdBufferInitialSizeInBytes) |
, fPrevState(NULL) |
, fBatchTarget(gpu, vertexPool, indexPool) |
- , fDrawBatch(NULL) { |
+ , fDrawBatch(NULL) |
+ , fXferBarrier(NULL) { |
} |
class Cmd : ::SkNoncopyable { |
@@ -305,14 +306,20 @@ private: |
}; |
struct XferBarrier : public Cmd { |
- XferBarrier(GrXferBarrierType type) |
+ XferBarrier(GrXferBarrierType type, GrRenderTarget* rt) |
: Cmd(kXferBarrier_CmdType) |
- , fType(type) {} |
+ , fType(type) |
+ , fRenderTarget(rt) {} |
void execute(GrGpu*, const SetState*) override; |
const GrXferBarrierType fType; |
- SkIRect fBounds; |
+ SkIRect fReadBounds; |
+ SkIRect fInvalidBounds; |
+ |
+ // The cmd buffer keeps these ptrs alive. |
+ GrRenderTarget* const fRenderTarget; |
+ SkSTArray<4, const GrXferProcessor*, true> fXferProcessors; |
}; |
static const int kCmdBufferInitialSizeInBytes = 8 * 1024; |
@@ -325,6 +332,7 @@ private: |
GrBatchTarget fBatchTarget; |
// TODO hack until batch is everywhere |
GrTargetCommands::DrawBatch* fDrawBatch; |
+ XferBarrier* fXferBarrier; |
// This will go away when everything uses batch. However, in the short term anything which |
// might be put into the GrInOrderDrawBuffer needs to make sure it closes the last batch |