Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(573)

Unified Diff: src/gpu/GrDrawTarget.h

Issue 1763883005: Attempt to combine batches in forward direction before flush (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix extra space Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawTarget.h
diff --git a/src/gpu/GrDrawTarget.h b/src/gpu/GrDrawTarget.h
index 8b30ab9b6001dc5d291163f09d1559a6f02dea55..9a6dbc9e713b43dfc900ba24aa3c46da92753971 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;
};
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698