aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrDrawTarget.h
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2016-03-07 11:50:44 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-07 11:50:44 -0800
commitaecc018f86d911198b7c7775cee04f61bd10b430 (patch)
treee952d99ee53a5437878203018a2e955152457eac /src/gpu/GrDrawTarget.h
parent673748a3201a1611bc1c484e18ba558661d2839c (diff)
Attempt to combine batches in forward direction before flush
Diffstat (limited to 'src/gpu/GrDrawTarget.h')
-rw-r--r--src/gpu/GrDrawTarget.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/gpu/GrDrawTarget.h b/src/gpu/GrDrawTarget.h
index 8b30ab9b60..9a6dbc9e71 100644
--- a/src/gpu/GrDrawTarget.h
+++ b/src/gpu/GrDrawTarget.h
@@ -45,10 +45,15 @@ class GrDrawTarget final : public SkRefCnt {
public:
/** Options for GrDrawTarget behavior. */
struct Options {
- Options () : fClipBatchToBounds(false), fDrawBatchBounds(false), fMaxBatchLookback(-1) {}
+ Options ()
+ : fClipBatchToBounds(false)
+ , fDrawBatchBounds(false)
+ , fMaxBatchLookback(-1)
+ , fMaxBatchLookahead(-1) {}
bool fClipBatchToBounds;
bool fDrawBatchBounds;
int fMaxBatchLookback;
+ int fMaxBatchLookahead;
};
GrDrawTarget(GrRenderTarget*, GrGpu*, GrResourceProvider*, GrAuditTrail*, const Options&);
@@ -61,7 +66,9 @@ public:
#ifdef ENABLE_MDB
this->setFlag(kClosed_Flag);
#endif
+ this->forwardCombine();
}
+
bool isClosed() const { return this->isSetFlag(kClosed_Flag); }
// TODO: this entry point is only needed in the non-MDB world. Remove when
@@ -216,6 +223,7 @@ private:
};
void recordBatch(GrBatch*);
+ void forwardCombine();
bool installPipelineInDrawBatch(const GrPipelineBuilder* pipelineBuilder,
const GrScissorState* scissor,
GrDrawBatch* batch);
@@ -232,11 +240,6 @@ private:
void getPathStencilSettingsForFilltype(GrPathRendering::FillType,
const GrStencilAttachment*,
GrStencilSettings*);
- bool setupClip(const GrPipelineBuilder&,
- GrPipelineBuilder::AutoRestoreFragmentProcessorState*,
- GrPipelineBuilder::AutoRestoreStencil*,
- GrScissorState*,
- const SkRect* devBounds);
void addDependency(GrDrawTarget* dependedOn);
@@ -260,6 +263,7 @@ private:
bool fDrawBatchBounds;
int fMaxBatchLookback;
+ int fMaxBatchLookahead;
typedef SkRefCnt INHERITED;
};