Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #ifndef SkComposeShader_DEFINED | 10 #ifndef SkComposeShader_DEFINED |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 81 Context* onCreateContext(const ContextRec&, void*) const override; | 81 Context* onCreateContext(const ContextRec&, void*) const override; |
| 82 | 82 |
| 83 private: | 83 private: |
| 84 SkShader* fShaderA; | 84 SkShader* fShaderA; |
| 85 SkShader* fShaderB; | 85 SkShader* fShaderB; |
| 86 SkXfermode* fMode; | 86 SkXfermode* fMode; |
| 87 | 87 |
| 88 typedef SkShader INHERITED; | 88 typedef SkShader INHERITED; |
| 89 }; | 89 }; |
| 90 | 90 |
| 91 #if SK_SUPPORT_GPU | |
|
bsalomon
2015/09/08 15:10:57
I don't think we should be exposing this object vi
wangyix
2015/09/09 17:32:35
GrComposeEffect::onCreateGLInstance() needs GrGLCo
bsalomon
2015/09/09 17:34:56
move it there too?
wangyix
2015/09/09 17:41:08
Is it weird to have GL-specific stuff in GrXfermod
| |
| 92 | |
| 93 #include "SkString.h" | |
|
tomhudson
2015/09/02 20:02:36
Move the #includes to the top, please.
egdaniel
2015/09/02 20:12:44
So I'm not sure what our official style is, but it
| |
| 94 #include "../gpu/GrFragmentProcessor.h" | |
| 95 | |
| 96 ///////////////////////////////////////////////////////////////////// | |
| 97 | |
| 98 class GrComposeEffect : public GrFragmentProcessor { | |
| 99 public: | |
| 100 GrComposeEffect(const GrFragmentProcessor* fpA, const GrFragmentProcessor* f pB, | |
| 101 SkXfermode::Mode mode); | |
| 102 const char* name() const override { return "ComposeShader"; } | |
| 103 void onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) c onst override; | |
| 104 | |
| 105 SkXfermode::Mode getMode() const { return fMode; } | |
| 106 | |
| 107 protected: | |
| 108 bool onIsEqual(const GrFragmentProcessor&) const override; | |
| 109 void onComputeInvariantOutput(GrInvariantOutput* inout) const override; | |
| 110 | |
| 111 private: | |
| 112 GrGLFragmentProcessor* onCreateGLInstance() const override; | |
| 113 | |
| 114 SkXfermode::Mode fMode; | |
| 115 | |
| 116 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; | |
| 117 | |
| 118 typedef GrFragmentProcessor INHERITED; | |
| 119 }; | |
| 91 #endif | 120 #endif |
| 121 | |
| 122 #endif | |
| OLD | NEW |