| 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 |
| 11 #include "GrCaps.h" | 11 #include "GrCaps.h" |
| 12 #include "GrCoordTransform.h" | 12 #include "GrCoordTransform.h" |
| 13 #include "GrFragmentProcessor.h" | 13 #include "GrFragmentProcessor.h" |
| 14 #include "GrTextureAccess.h" | 14 #include "GrTextureAccess.h" |
| 15 #include "GrXferProcessor.h" | 15 #include "GrXferProcessor.h" |
| 16 #include "SkXfermode.h" | 16 #include "SkXfermode.h" |
| 17 | 17 |
| 18 class GrGLCaps; | 18 class GrGLCaps; |
| 19 class GrGLFragmentProcessor; | 19 class GrGLFragmentProcessor; |
| 20 class GrInvariantOutput; | 20 class GrInvariantOutput; |
| 21 class GrProcessorKeyBuilder; | 21 class GrProcessorKeyBuilder; |
| 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(GrShaderDataManager*, SkXfermode::Mode mode, GrTexture* backg
round); |
| 31 | 31 |
| 32 void getGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) con
st 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 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 | 86 |
| 87 GR_DECLARE_XP_FACTORY_TEST; | 87 GR_DECLARE_XP_FACTORY_TEST; |
| 88 | 88 |
| 89 SkXfermode::Mode fMode; | 89 SkXfermode::Mode fMode; |
| 90 GrBlendEquation fHWBlendEquation; | 90 GrBlendEquation fHWBlendEquation; |
| 91 | 91 |
| 92 typedef GrXPFactory INHERITED; | 92 typedef GrXPFactory INHERITED; |
| 93 }; | 93 }; |
| 94 #endif | 94 #endif |
| 95 | 95 |
| OLD | NEW |