OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 | 7 |
8 #ifndef GrPorterDuffXferProcessor_DEFINED | 8 #ifndef GrPorterDuffXferProcessor_DEFINED |
9 #define GrPorterDuffXferProcessor_DEFINED | 9 #define GrPorterDuffXferProcessor_DEFINED |
10 | 10 |
11 #include "GrTypes.h" | 11 #include "GrTypes.h" |
12 #include "GrXferProcessor.h" | 12 #include "GrXferProcessor.h" |
13 #include "SkXfermode.h" | 13 #include "SkXfermode.h" |
14 | 14 |
15 class GrDrawState; | 15 class GrDrawState; |
16 class GrInvariantOutput; | 16 class GrInvariantOutput; |
17 | 17 |
18 class GrPorterDuffXferProcessor : public GrXferProcessor { | 18 class GrPorterDuffXferProcessor : public GrXferProcessor { |
19 public: | 19 public: |
20 static GrXferProcessor* Create(GrBlendCoeff srcBlend, GrBlendCoeff dstBlend, | 20 static GrXferProcessor* Create(GrBlendCoeff srcBlend, GrBlendCoeff dstBlend, |
21 GrColor constant = 0) { | 21 GrColor constant = 0) { |
22 return SkNEW_ARGS(GrPorterDuffXferProcessor, (srcBlend, dstBlend, consta
nt)); | 22 return SkNEW_ARGS(GrPorterDuffXferProcessor, (srcBlend, dstBlend, consta
nt)); |
23 } | 23 } |
24 | 24 |
25 virtual ~GrPorterDuffXferProcessor(); | 25 virtual ~GrPorterDuffXferProcessor(); |
26 | 26 |
27 virtual const char* name() const { return "Porter Duff"; } | 27 virtual const char* name() const SK_OVERRIDE { return "Porter Duff"; } |
28 | 28 |
29 void getGLProcessorKey(const GrGLCaps& caps, GrProcessorKeyBuilder* b) const
SK_OVERRIDE; | 29 void getGLProcessorKey(const GrGLCaps& caps, GrProcessorKeyBuilder* b) const
SK_OVERRIDE; |
30 | 30 |
31 GrGLXferProcessor* createGLInstance() const SK_OVERRIDE; | 31 GrGLXferProcessor* createGLInstance() const SK_OVERRIDE; |
32 | 32 |
33 virtual bool hasSecondaryOutput() const SK_OVERRIDE; | 33 virtual bool hasSecondaryOutput() const SK_OVERRIDE; |
34 | 34 |
35 /////////////////////////////////////////////////////////////////////////// | 35 /////////////////////////////////////////////////////////////////////////// |
36 /// @name Stage Output Types | 36 /// @name Stage Output Types |
37 //// | 37 //// |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 | 157 |
158 GR_DECLARE_XP_FACTORY_TEST; | 158 GR_DECLARE_XP_FACTORY_TEST; |
159 | 159 |
160 GrBlendCoeff fSrcCoeff; | 160 GrBlendCoeff fSrcCoeff; |
161 GrBlendCoeff fDstCoeff; | 161 GrBlendCoeff fDstCoeff; |
162 | 162 |
163 typedef GrXPFactory INHERITED; | 163 typedef GrXPFactory INHERITED; |
164 }; | 164 }; |
165 | 165 |
166 #endif | 166 #endif |
OLD | NEW |