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

Unified Diff: src/gpu/GrPipeline.h

Issue 1273803004: Use a factory function to create GrPipeline and remove unused member (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 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/GrDrawTarget.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrPipeline.h
diff --git a/src/gpu/GrPipeline.h b/src/gpu/GrPipeline.h
index 77adb368d74dab81ccd385271f6a5d9428b37e93..61e6e9247dcc36941f09b92200cda15c4a26efeb 100644
--- a/src/gpu/GrPipeline.h
+++ b/src/gpu/GrPipeline.h
@@ -29,12 +29,17 @@ class GrPipelineBuilder;
*/
class GrPipeline : public GrNonAtomicRef {
public:
- GrPipeline(const GrPipelineBuilder&,
- const GrProcOptInfo& colorPOI,
- const GrProcOptInfo& coveragePOI,
- const GrCaps&,
- const GrScissorState&,
- const GrXferProcessor::DstTexture*);
+ /** Creates a pipeline into a pre-allocated buffer */
+ static GrPipeline* CreateAt(void* memory,
+ const GrPipelineBuilder& pb,
+ const GrProcOptInfo& colorPOI,
+ const GrProcOptInfo& coveragePOI,
+ const GrCaps& caps,
+ const GrScissorState& scissor,
+ const GrXferProcessor::DstTexture* dst) {
+ return SkNEW_PLACEMENT_ARGS(memory, GrPipeline, (pb, colorPOI, coveragePOI, caps, scissor,
+ dst));
+ }
/*
* Returns true if these pipelines are equivalent. Coord transforms may be applied either on
@@ -108,6 +113,13 @@ public:
}
private:
+ GrPipeline(const GrPipelineBuilder&,
+ const GrProcOptInfo& colorPOI,
+ const GrProcOptInfo& coveragePOI,
+ const GrCaps&,
+ const GrScissorState&,
+ const GrXferProcessor::DstTexture*);
+
/**
* Alter the program desc and inputs (attribs and processors) based on the blend optimization.
*/
@@ -149,7 +161,6 @@ private:
int fNumColorStages;
SkSTArray<8, const GrCoordTransform*, true> fCoordTransforms;
- int fNumCoordTransforms;
GrProgramDesc fDesc;
typedef SkRefCnt INHERITED;
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698