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 "gl/GrGLXferProcessor.h" | 10 #include "gl/GrGLXferProcessor.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 | 29 |
30 bool hasSecondaryOutput() const override { return false; } | 30 bool hasSecondaryOutput() const override { return false; } |
31 | 31 |
32 private: | 32 private: |
33 DisableColorXP(); | 33 DisableColorXP(); |
34 | 34 |
35 GrXferProcessor::OptFlags onGetOptimizations(const GrProcOptInfo& colorPOI, | 35 GrXferProcessor::OptFlags onGetOptimizations(const GrProcOptInfo& colorPOI, |
36 const GrProcOptInfo& coveragePO
I, | 36 const GrProcOptInfo& coveragePO
I, |
37 bool doesStencilWrite, | 37 bool doesStencilWrite, |
38 GrColor* color, | 38 GrColor* color, |
39 const GrDrawTargetCaps& caps) o
verride { | 39 const GrCaps& caps) override { |
40 return GrXferProcessor::kIgnoreColor_OptFlag | GrXferProcessor::kIgnoreC
overage_OptFlag; | 40 return GrXferProcessor::kIgnoreColor_OptFlag | GrXferProcessor::kIgnoreC
overage_OptFlag; |
41 } | 41 } |
42 | 42 |
43 void onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) c
onst override; | 43 void onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) c
onst override; |
44 | 44 |
45 void onGetBlendInfo(GrXferProcessor::BlendInfo* blendInfo) const override; | 45 void onGetBlendInfo(GrXferProcessor::BlendInfo* blendInfo) const override; |
46 | 46 |
47 bool onIsEqual(const GrXferProcessor& xpBase) const override { | 47 bool onIsEqual(const GrXferProcessor& xpBase) const override { |
48 return true; | 48 return true; |
49 } | 49 } |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 blendInfo->fWriteColor = false; | 93 blendInfo->fWriteColor = false; |
94 } | 94 } |
95 | 95 |
96 /////////////////////////////////////////////////////////////////////////////// | 96 /////////////////////////////////////////////////////////////////////////////// |
97 | 97 |
98 GrDisableColorXPFactory::GrDisableColorXPFactory() { | 98 GrDisableColorXPFactory::GrDisableColorXPFactory() { |
99 this->initClassID<GrDisableColorXPFactory>(); | 99 this->initClassID<GrDisableColorXPFactory>(); |
100 } | 100 } |
101 | 101 |
102 GrXferProcessor* | 102 GrXferProcessor* |
103 GrDisableColorXPFactory::onCreateXferProcessor(const GrDrawTargetCaps& caps, | 103 GrDisableColorXPFactory::onCreateXferProcessor(const GrCaps& caps, |
104 const GrProcOptInfo& colorPOI, | 104 const GrProcOptInfo& colorPOI, |
105 const GrProcOptInfo& covPOI, | 105 const GrProcOptInfo& covPOI, |
106 const GrDeviceCoordTexture* dstCo
py) const { | 106 const GrDeviceCoordTexture* dstCo
py) const { |
107 return DisableColorXP::Create(); | 107 return DisableColorXP::Create(); |
108 } | 108 } |
109 | 109 |
110 GR_DEFINE_XP_FACTORY_TEST(GrDisableColorXPFactory); | 110 GR_DEFINE_XP_FACTORY_TEST(GrDisableColorXPFactory); |
111 | 111 |
112 GrXPFactory* GrDisableColorXPFactory::TestCreate(SkRandom* random, | 112 GrXPFactory* GrDisableColorXPFactory::TestCreate(SkRandom* random, |
113 GrContext*, | 113 GrContext*, |
114 const GrDrawTargetCaps&, | 114 const GrCaps&, |
115 GrTexture*[]) { | 115 GrTexture*[]) { |
116 return GrDisableColorXPFactory::Create(); | 116 return GrDisableColorXPFactory::Create(); |
117 } | 117 } |
118 | 118 |
OLD | NEW |