OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 GrCustomXfermodePriv_DEFINED | 8 #ifndef GrCustomXfermodePriv_DEFINED |
9 #define GrCustomXfermodePriv_DEFINED | 9 #define GrCustomXfermodePriv_DEFINED |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 class GrTexture; | 22 class GrTexture; |
23 | 23 |
24 /////////////////////////////////////////////////////////////////////////////// | 24 /////////////////////////////////////////////////////////////////////////////// |
25 // Fragment Processor | 25 // Fragment Processor |
26 /////////////////////////////////////////////////////////////////////////////// | 26 /////////////////////////////////////////////////////////////////////////////// |
27 | 27 |
28 class GrCustomXferFP : public GrFragmentProcessor { | 28 class GrCustomXferFP : public GrFragmentProcessor { |
29 public: | 29 public: |
30 GrCustomXferFP(SkXfermode::Mode mode, GrTexture* background); | 30 GrCustomXferFP(SkXfermode::Mode mode, GrTexture* background); |
31 | 31 |
32 void getGLProcessorKey(const GrGLCaps& caps, GrProcessorKeyBuilder* b) const
override; | 32 void getGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) con
st override; |
33 | 33 |
34 GrGLFragmentProcessor* createGLInstance() const override; | 34 GrGLFragmentProcessor* createGLInstance() const override; |
35 | 35 |
36 const char* name() const override { return "Custom Xfermode"; } | 36 const char* name() const override { return "Custom Xfermode"; } |
37 | 37 |
38 SkXfermode::Mode mode() const { return fMode; } | 38 SkXfermode::Mode mode() const { return fMode; } |
39 const GrTextureAccess& backgroundAccess() const { return fBackgroundAccess;
} | 39 const GrTextureAccess& backgroundAccess() const { return fBackgroundAccess;
} |
40 | 40 |
41 private: | 41 private: |
42 bool onIsEqual(const GrFragmentProcessor& other) const override; | 42 bool onIsEqual(const GrFragmentProcessor& other) const override; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 } | 89 } |
90 | 90 |
91 GR_DECLARE_XP_FACTORY_TEST; | 91 GR_DECLARE_XP_FACTORY_TEST; |
92 | 92 |
93 SkXfermode::Mode fMode; | 93 SkXfermode::Mode fMode; |
94 | 94 |
95 typedef GrXPFactory INHERITED; | 95 typedef GrXPFactory INHERITED; |
96 }; | 96 }; |
97 #endif | 97 #endif |
98 | 98 |
OLD | NEW |