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

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

Issue 643743003: Create helper functions to use in computeInvariantOutput calls (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update blurMaskFilter Created 6 years, 2 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 private: 107 private:
108 typedef GrGLFragmentProcessor INHERITED; 108 typedef GrGLFragmentProcessor INHERITED;
109 }; 109 };
110 110
111 private: 111 private:
112 virtual bool onIsEqual(const GrProcessor&) const SK_OVERRIDE { 112 virtual bool onIsEqual(const GrProcessor&) const SK_OVERRIDE {
113 return true; 113 return true;
114 } 114 }
115 115
116 virtual void onComputeInvariantOutput(InvariantOutput* inout) const SK_OVERR IDE { 116 virtual void onComputeInvariantOutput(InvariantOutput* inout) const SK_OVERR IDE {
117 // The output is always black. 117 // The output is always black. The alpha value for the color passed in i s arbitrary.
118 inout->fColor = GrColorPackRGBA(0, 0, 0, GrColorUnpackA(inout->fColor)); 118 inout->setToOther(kRGB_GrColorComponentFlags, GrColorPackRGBA(0, 0, 0, 0 ));
119 inout->fValidFlags = kRGB_GrColorComponentFlags;
120 inout->fIsSingleComponent = false;
121 } 119 }
122 }; 120 };
123 121
124 GrFragmentProcessor* SkLumaColorFilter::asFragmentProcessor(GrContext*) const { 122 GrFragmentProcessor* SkLumaColorFilter::asFragmentProcessor(GrContext*) const {
125 return LumaColorFilterEffect::Create(); 123 return LumaColorFilterEffect::Create();
126 } 124 }
127 #endif 125 #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