Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 #ifndef GrClipMaskManager_DEFINED | 7 #ifndef GrClipMaskManager_DEFINED |
| 8 #define GrClipMaskManager_DEFINED | 8 #define GrClipMaskManager_DEFINED |
| 9 | 9 |
| 10 #include "GrPipelineBuilder.h" | 10 #include "GrPipelineBuilder.h" |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 26 class SkPath; | 26 class SkPath; |
| 27 | 27 |
| 28 /** | 28 /** |
| 29 * Produced by GrClipMaskManager. It provides a set of modifications to the draw ing state that | 29 * Produced by GrClipMaskManager. It provides a set of modifications to the draw ing state that |
| 30 * are used to create the final GrPipeline for a GrBatch. This is a work in prog ress. It will | 30 * are used to create the final GrPipeline for a GrBatch. This is a work in prog ress. It will |
| 31 * eventually encapsulate all mechanisms for modifying the scissor, shaders, and stencil state | 31 * eventually encapsulate all mechanisms for modifying the scissor, shaders, and stencil state |
| 32 * to implement clipping. | 32 * to implement clipping. |
| 33 */ | 33 */ |
| 34 class GrAppliedClip : public SkNoncopyable { | 34 class GrAppliedClip : public SkNoncopyable { |
| 35 public: | 35 public: |
| 36 GrAppliedClip() {} | 36 GrAppliedClip() : fAdditionalPipelineFlags(0), fBlockedPipelineFlags(0) {} |
| 37 const GrFragmentProcessor* clipCoverageFragmentProcessor() const { return fC lipCoverageFP; } | 37 const GrFragmentProcessor* clipCoverageFragmentProcessor() const { return fC lipCoverageFP; } |
| 38 const GrScissorState& scissorState() const { return fScissorState; } | 38 const GrScissorState& scissorState() const { return fScissorState; } |
| 39 uint32_t additionalPipelineFlags() const { return fAdditionalPipelineFlags; } | |
| 40 uint32_t blockedPipelineFlags() const { return fBlockedPipelineFlags; } | |
|
Chris Dalton
2015/11/09 18:41:58
This seemed like the right place to override the h
bsalomon
2015/11/09 19:26:46
Are the blocked flags used anywhere?
Chris Dalton
2015/11/09 19:49:36
No, I only added it for philosophical reasons.. Ho
| |
| 39 | 41 |
| 40 private: | 42 private: |
| 41 SkAutoTUnref<const GrFragmentProcessor> fClipCoverageFP; | 43 SkAutoTUnref<const GrFragmentProcessor> fClipCoverageFP; |
| 42 GrScissorState fScissorState; | 44 GrScissorState fScissorState; |
| 45 uint32_t fAdditionalPipelineFlags; | |
| 46 uint32_t fBlockedPipelineFlags; | |
| 47 | |
| 43 friend class GrClipMaskManager; | 48 friend class GrClipMaskManager; |
| 44 | 49 |
| 45 typedef SkNoncopyable INHERITED; | 50 typedef SkNoncopyable INHERITED; |
| 46 }; | 51 }; |
| 47 | 52 |
| 48 /** | 53 /** |
| 49 * The clip mask creator handles the generation of the clip mask. If anti | 54 * The clip mask creator handles the generation of the clip mask. If anti |
| 50 * aliasing is requested it will (in the future) generate a single channel | 55 * aliasing is requested it will (in the future) generate a single channel |
| 51 * (8bit) mask. If no anti aliasing is requested it will generate a 1-bit | 56 * (8bit) mask. If no anti aliasing is requested it will generate a 1-bit |
| 52 * mask in the stencil buffer. In the non anti-aliasing case, if the clip | 57 * mask in the stencil buffer. In the non anti-aliasing case, if the clip |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 168 GrTexture* createCachedMask(int width, int height, const GrUniqueKey& key, b ool renderTarget); | 173 GrTexture* createCachedMask(int width, int height, const GrUniqueKey& key, b ool renderTarget); |
| 169 | 174 |
| 170 static const int kMaxAnalyticElements = 4; | 175 static const int kMaxAnalyticElements = 4; |
| 171 | 176 |
| 172 GrDrawTarget* fDrawTarget; // This is our owning draw target. | 177 GrDrawTarget* fDrawTarget; // This is our owning draw target. |
| 173 StencilClipMode fClipMode; | 178 StencilClipMode fClipMode; |
| 174 | 179 |
| 175 typedef SkNoncopyable INHERITED; | 180 typedef SkNoncopyable INHERITED; |
| 176 }; | 181 }; |
| 177 #endif // GrClipMaskManager_DEFINED | 182 #endif // GrClipMaskManager_DEFINED |
| OLD | NEW |