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

Unified Diff: src/gpu/GrInOrderDrawBuffer.h

Issue 912413002: Pass in ProcOptInfos into willNeedDstCopy on XPs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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
Index: src/gpu/GrInOrderDrawBuffer.h
diff --git a/src/gpu/GrInOrderDrawBuffer.h b/src/gpu/GrInOrderDrawBuffer.h
index f271207abcf002c7ab0004e5dbbebf1fdb1cb9ef..326ed4ad8dfa6ed68be4588c0defd102db0d7a3a 100644
--- a/src/gpu/GrInOrderDrawBuffer.h
+++ b/src/gpu/GrInOrderDrawBuffer.h
@@ -188,20 +188,14 @@ private:
// TODO: rename to SetPipeline once pp, batch tracker, and desc are removed
struct SetState : public Cmd {
- // TODO get rid of the prim proc version of this when we use batch everywhere
- SetState(const GrPipelineBuilder& pipelineBuilder, const GrPrimitiveProcessor* primProc,
- const GrDrawTargetCaps& caps,
- const GrScissorState& scissor, const GrDeviceCoordTexture* dstCopy)
+ // TODO get rid of the prim proc parameter when we use batch everywhere
+ SetState(const GrPipelineBuilder& pipelineBuilder, const GrProcOptInfo& colorPOI,
+ const GrProcOptInfo& coveragePOI, const GrDrawTargetCaps& caps,
+ const GrScissorState& scissor, const GrDeviceCoordTexture* dstCopy,
+ const GrPrimitiveProcessor* primProc = NULL)
: Cmd(kSetState_Cmd)
, fPrimitiveProcessor(primProc)
- , fPipeline(pipelineBuilder, primProc, caps, scissor, dstCopy) {}
-
- SetState(GrBatch* batch,
- const GrPipelineBuilder& pipelineBuilder,
- const GrDrawTargetCaps& caps,
- const GrScissorState& scissor, const GrDeviceCoordTexture* dstCopy)
- : Cmd(kSetState_Cmd)
- , fPipeline(batch, pipelineBuilder, caps, scissor, dstCopy) {}
+ , fPipeline(pipelineBuilder, colorPOI, coveragePOI, caps, scissor, dstCopy) {}
void execute(GrInOrderDrawBuffer*, const SetState*) SK_OVERRIDE;
@@ -284,14 +278,14 @@ private:
// records it. If the draw can be skipped false is returned and no new GrPipeline is
// recorded.
// TODO delete the primproc variant when we have batches everywhere
- bool SK_WARN_UNUSED_RESULT recordStateAndShouldDraw(const GrPipelineBuilder&,
- const GrPrimitiveProcessor*,
- const GrScissorState&,
- const SkRect*);
- bool SK_WARN_UNUSED_RESULT recordStateAndShouldDraw(GrBatch*,
- const GrPipelineBuilder&,
- const GrScissorState&,
- const SkRect*);
+ bool SK_WARN_UNUSED_RESULT recordStateAndSetupPipeline(const GrPrimitiveProcessor*,
bsalomon 2015/02/11 15:38:03 savePipelineAndShouldDraw?
+ const GrPipelineBuilder&,
+ const GrScissorState&,
+ const SkRect*);
+ bool SK_WARN_UNUSED_RESULT recordStateAndSetupPipeline(GrBatch*,
+ const GrPipelineBuilder&,
+ const GrScissorState&,
+ const SkRect*);
// We lazily record clip changes in order to skip clips that have no effect.
void recordClipIfNecessary();

Powered by Google App Engine
This is Rietveld 408576698