Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(304)

Side by Side Diff: src/effects/SkLumaColorFilter.cpp

Issue 571163002: removing GrDrawEffect (Closed) Base URL: https://skia.googlesource.com/skia.git@gp3
Patch Set: rebase after revert Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/effects/SkLightingImageFilter.cpp ('k') | src/effects/SkMagnifierImageFilter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 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 "SkLumaColorFilter.h" 8 #include "SkLumaColorFilter.h"
9 9
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 virtual void getConstantColorComponents(GrColor* color, 76 virtual void getConstantColorComponents(GrColor* color,
77 uint32_t* validFlags) const SK_OVERR IDE { 77 uint32_t* validFlags) const SK_OVERR IDE {
78 // The output is always black. 78 // The output is always black.
79 *color = GrColorPackRGBA(0, 0, 0, GrColorUnpackA(*color)); 79 *color = GrColorPackRGBA(0, 0, 0, GrColorUnpackA(*color));
80 *validFlags = kRGB_GrColorComponentFlags; 80 *validFlags = kRGB_GrColorComponentFlags;
81 } 81 }
82 82
83 class GLEffect : public GrGLEffect { 83 class GLEffect : public GrGLEffect {
84 public: 84 public:
85 GLEffect(const GrBackendEffectFactory& factory, 85 GLEffect(const GrBackendEffectFactory& factory,
86 const GrDrawEffect&) 86 const GrEffect&)
87 : INHERITED(factory) { 87 : INHERITED(factory) {
88 } 88 }
89 89
90 static void GenKey(const GrDrawEffect&, const GrGLCaps&, GrEffectKeyBuil der* b) {} 90 static void GenKey(const GrEffect&, const GrGLCaps&, GrEffectKeyBuilder* b) {}
91 91
92 virtual void emitCode(GrGLProgramBuilder* builder, 92 virtual void emitCode(GrGLProgramBuilder* builder,
93 const GrDrawEffect&, 93 const GrEffect&,
94 const GrEffectKey&, 94 const GrEffectKey&,
95 const char* outputColor, 95 const char* outputColor,
96 const char* inputColor, 96 const char* inputColor,
97 const TransformedCoordsArray&, 97 const TransformedCoordsArray&,
98 const TextureSamplerArray&) SK_OVERRIDE { 98 const TextureSamplerArray&) SK_OVERRIDE {
99 if (NULL == inputColor) { 99 if (NULL == inputColor) {
100 inputColor = "vec4(1)"; 100 inputColor = "vec4(1)";
101 } 101 }
102 102
103 GrGLFragmentShaderBuilder* fsBuilder = builder->getFragmentShaderBui lder(); 103 GrGLFragmentShaderBuilder* fsBuilder = builder->getFragmentShaderBui lder();
(...skipping 14 matching lines...) Expand all
118 private: 118 private:
119 virtual bool onIsEqual(const GrEffect&) const SK_OVERRIDE { 119 virtual bool onIsEqual(const GrEffect&) const SK_OVERRIDE {
120 return true; 120 return true;
121 } 121 }
122 }; 122 };
123 123
124 GrEffect* SkLumaColorFilter::asNewEffect(GrContext*) const { 124 GrEffect* SkLumaColorFilter::asNewEffect(GrContext*) const {
125 return LumaColorFilterEffect::Create(); 125 return LumaColorFilterEffect::Create();
126 } 126 }
127 #endif 127 #endif
OLDNEW
« no previous file with comments | « src/effects/SkLightingImageFilter.cpp ('k') | src/effects/SkMagnifierImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698