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 #include "effects/GrDisableColorXP.h" | 8 #include "effects/GrDisableColorXP.h" |
9 #include "GrProcessor.h" | 9 #include "GrProcessor.h" |
10 #include "glsl/GrGLSLFragmentShaderBuilder.h" | 10 #include "glsl/GrGLSLFragmentShaderBuilder.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 const char* name() const override { return "Disable Color"; } | 25 const char* name() const override { return "Disable Color"; } |
26 | 26 |
27 GrGLSLXferProcessor* createGLSLInstance() const override; | 27 GrGLSLXferProcessor* createGLSLInstance() const override; |
28 | 28 |
29 private: | 29 private: |
30 DisableColorXP(); | 30 DisableColorXP(); |
31 | 31 |
32 GrXferProcessor::OptFlags onGetOptimizations(const GrPipelineOptimizations&
optimizations, | 32 GrXferProcessor::OptFlags onGetOptimizations(const GrPipelineOptimizations&
optimizations, |
33 bool doesStencilWrite, | 33 bool doesStencilWrite, |
34 GrColor* color, | 34 GrColor* color, |
35 const GrCaps& caps) override { | 35 const GrCaps& caps) const overr
ide { |
36 return GrXferProcessor::kIgnoreColor_OptFlag | GrXferProcessor::kIgnoreC
overage_OptFlag; | 36 return GrXferProcessor::kIgnoreColor_OptFlag | GrXferProcessor::kIgnoreC
overage_OptFlag; |
37 } | 37 } |
38 | 38 |
39 void onGetGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b)
const override; | 39 void onGetGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b)
const override; |
40 | 40 |
41 void onGetBlendInfo(GrXferProcessor::BlendInfo* blendInfo) const override; | 41 void onGetBlendInfo(GrXferProcessor::BlendInfo* blendInfo) const override; |
42 | 42 |
43 bool onIsEqual(const GrXferProcessor& xpBase) const override { | 43 bool onIsEqual(const GrXferProcessor& xpBase) const override { |
44 return true; | 44 return true; |
45 } | 45 } |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 const DstTexture* dst) const { | 100 const DstTexture* dst) const { |
101 return DisableColorXP::Create(); | 101 return DisableColorXP::Create(); |
102 } | 102 } |
103 | 103 |
104 GR_DEFINE_XP_FACTORY_TEST(GrDisableColorXPFactory); | 104 GR_DEFINE_XP_FACTORY_TEST(GrDisableColorXPFactory); |
105 | 105 |
106 const GrXPFactory* GrDisableColorXPFactory::TestCreate(GrProcessorTestData*) { | 106 const GrXPFactory* GrDisableColorXPFactory::TestCreate(GrProcessorTestData*) { |
107 return GrDisableColorXPFactory::Create(); | 107 return GrDisableColorXPFactory::Create(); |
108 } | 108 } |
109 | 109 |
OLD | NEW |