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

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

Issue 659803004: Some cleanup in processor header files. (Closed) Base URL: https://skia.googlesource.com/skia.git@ccmat
Patch Set: rebase 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 | « include/gpu/GrProcessor.h ('k') | src/gpu/GrAAConvexPathRenderer.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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 #ifndef SK_IGNORE_TO_STRING 56 #ifndef SK_IGNORE_TO_STRING
57 void SkLumaColorFilter::toString(SkString* str) const { 57 void SkLumaColorFilter::toString(SkString* str) const {
58 str->append("SkLumaColorFilter "); 58 str->append("SkLumaColorFilter ");
59 } 59 }
60 #endif 60 #endif
61 61
62 #if SK_SUPPORT_GPU 62 #if SK_SUPPORT_GPU
63 class LumaColorFilterEffect : public GrFragmentProcessor { 63 class LumaColorFilterEffect : public GrFragmentProcessor {
64 public: 64 public:
65 static GrFragmentProcessor* Create() { 65 static GrFragmentProcessor* Create() {
66 GR_CREATE_STATIC_FRAGMENT_PROCESSOR(gLumaEffect, LumaColorFilterEffect, ()); 66 GR_CREATE_STATIC_PROCESSOR(gLumaEffect, LumaColorFilterEffect, ());
67 return SkRef(gLumaEffect); 67 return SkRef(gLumaEffect);
68 } 68 }
69 69
70 static const char* Name() { return "Luminance-to-Alpha"; } 70 static const char* Name() { return "Luminance-to-Alpha"; }
71 71
72 virtual const GrBackendFragmentProcessorFactory& getFactory() const SK_OVERR IDE { 72 virtual const GrBackendFragmentProcessorFactory& getFactory() const SK_OVERR IDE {
73 return GrTBackendFragmentProcessorFactory<LumaColorFilterEffect>::getIns tance(); 73 return GrTBackendFragmentProcessorFactory<LumaColorFilterEffect>::getIns tance();
74 } 74 }
75 75
76 class GLProcessor : public GrGLFragmentProcessor { 76 class GLProcessor : public GrGLFragmentProcessor {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
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. The alpha value for the color passed in i s arbitrary. 117 // The output is always black. The alpha value for the color passed in i s arbitrary.
118 inout->setToOther(kRGB_GrColorComponentFlags, GrColorPackRGBA(0, 0, 0, 0 )); 118 inout->setToOther(kRGB_GrColorComponentFlags, GrColorPackRGBA(0, 0, 0, 0 ));
119 } 119 }
120 }; 120 };
121 121
122 GrFragmentProcessor* SkLumaColorFilter::asFragmentProcessor(GrContext*) const { 122 GrFragmentProcessor* SkLumaColorFilter::asFragmentProcessor(GrContext*) const {
123 return LumaColorFilterEffect::Create(); 123 return LumaColorFilterEffect::Create();
124 } 124 }
125 #endif 125 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrProcessor.h ('k') | src/gpu/GrAAConvexPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698