diff options
author | 2015-08-05 12:02:27 -0700 | |
---|---|---|
committer | 2015-08-05 12:02:27 -0700 | |
commit | 2fe7923f7e74f901a17afba7609d71a1220bdc60 (patch) | |
tree | 72bddf6848c8bfd12ae18dfa4c7bfb6bb8edb59d /src/gpu/GrPipeline.h | |
parent | b2aa7cb90f4c66125056bac70dbca2093dd5ba41 (diff) |
Expose coord transforms from GrPipeline
BUG=skia:
Review URL: https://codereview.chromium.org/1275603002
Diffstat (limited to 'src/gpu/GrPipeline.h')
-rw-r--r-- | src/gpu/GrPipeline.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/gpu/GrPipeline.h b/src/gpu/GrPipeline.h index 3b5181831a..77adb368d7 100644 --- a/src/gpu/GrPipeline.h +++ b/src/gpu/GrPipeline.h @@ -37,9 +37,12 @@ public: const GrXferProcessor::DstTexture*); /* - * Returns true if these pipelines are equivalent. + * Returns true if these pipelines are equivalent. Coord transforms may be applied either on + * the GPU or the CPU. When we apply them on the CPU then the matrices need not agree in order + * to combine draws. Therefore we take a param that indicates whether coord transforms should be + * compared." */ - bool isEqual(const GrPipeline& that) const; + bool isEqual(const GrPipeline& that, bool ignoreCoordTransforms = false) const; /// @} @@ -100,6 +103,10 @@ public: return fInfoForPrimitiveProcessor; } + const SkTArray<const GrCoordTransform*, true>& coordTransforms() const { + return fCoordTransforms; + } + private: /** * Alter the program desc and inputs (attribs and processors) based on the blend optimization. @@ -141,7 +148,9 @@ private: // This function is equivalent to the offset into fFragmentStages where coverage stages begin. int fNumColorStages; - GrProgramDesc fDesc; + SkSTArray<8, const GrCoordTransform*, true> fCoordTransforms; + int fNumCoordTransforms; + GrProgramDesc fDesc; typedef SkRefCnt INHERITED; }; |