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

Unified Diff: src/gpu/GrDrawTarget.h

Issue 1333943002: Simplify installation of pipeling into GrDrawBatch in GrDrawTarget.h (Closed) Base URL: https://skia.googlesource.com/skia.git@cleanup
Patch Set: rebase Created 5 years, 3 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 | « no previous file | 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 059c1b3ed20adbbf1ee39b00cf40b7493f25b0d0..63d637803f02b6f6a5f493a09d74a5f94f4c7698 100644
--- a/src/gpu/GrDrawTarget.h
+++ b/src/gpu/GrDrawTarget.h
@@ -177,40 +177,28 @@ public:
bool programUnitTest(GrContext* owner, int maxStages);
- struct PipelineInfo {
- PipelineInfo(const GrPipelineBuilder* pipelineBuilder, const GrScissorState* scissor,
- const GrDrawBatch* batch, const SkRect* devBounds,
- GrDrawTarget* target);
-
- bool valid() const { return SkToBool(fArgs.fPipelineBuilder); }
-
- const GrPipeline::CreateArgs& pipelineCreateArgs() const {
- SkASSERT(this->valid());
- return fArgs;
- }
-
- private:
- GrPipeline::CreateArgs fArgs;
- };
-
protected:
GrGpu* getGpu() { return fGpu; }
const GrGpu* getGpu() const { return fGpu; }
- // Makes a copy of the dst if it is necessary for the draw. Returns false if a copy is required
- // but couldn't be made. Otherwise, returns true. This method needs to be protected because it
- // needs to be accessed by GLPrograms to setup a correct drawstate
- bool setupDstReadIfNecessary(const GrPipelineBuilder&,
- const GrProcOptInfo& colorPOI,
- const GrProcOptInfo& coveragePOI,
- GrXferProcessor::DstTexture*,
- const SkRect* drawBounds);
-
void recordBatch(GrBatch*);
private:
SkSTArray<256, SkAutoTUnref<GrBatch>, true> fBatches;
+ bool installPipelineInDrawBatch(const GrPipelineBuilder* pipelineBuilder,
+ const GrScissorState* scissor,
+ GrDrawBatch* batch);
+
+ // Makes a copy of the dst if it is necessary for the draw. Returns false if a copy is required
+ // but couldn't be made. Otherwise, returns true. This method needs to be protected because it
+ // needs to be accessed by GLPrograms to setup a correct drawstate
+ bool setupDstReadIfNecessary(const GrPipelineBuilder&,
+ const GrProcOptInfo& colorPOI,
+ const GrProcOptInfo& coveragePOI,
+ GrXferProcessor::DstTexture*,
+ const SkRect& batchBounds);
+
void drawPathBatch(const GrPipelineBuilder& pipelineBuilder, GrDrawPathBatchBase* batch,
GrPathRendering::FillType fill);
// Check to see if this set of draw commands has been sent out
« no previous file with comments | « no previous file | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698