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

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

Issue 1314763009: Remove overly complicated GR_CREATE_STATIC_PROCESSOR macro (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 5 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 | « include/gpu/GrProcessor.h ('k') | src/gpu/effects/GrDitherEffect.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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 #ifndef SK_IGNORE_TO_STRING 48 #ifndef SK_IGNORE_TO_STRING
49 void SkLumaColorFilter::toString(SkString* str) const { 49 void SkLumaColorFilter::toString(SkString* str) const {
50 str->append("SkLumaColorFilter "); 50 str->append("SkLumaColorFilter ");
51 } 51 }
52 #endif 52 #endif
53 53
54 #if SK_SUPPORT_GPU 54 #if SK_SUPPORT_GPU
55 class LumaColorFilterEffect : public GrFragmentProcessor { 55 class LumaColorFilterEffect : public GrFragmentProcessor {
56 public: 56 public:
57 static GrFragmentProcessor* Create() { 57 static GrFragmentProcessor* Create() {
58 GR_CREATE_STATIC_PROCESSOR(gLumaEffect, LumaColorFilterEffect, ()); 58 static LumaColorFilterEffect gLumaEffect;
59 return SkRef(gLumaEffect); 59 return SkRef(&gLumaEffect);
60 } 60 }
61 61
62 const char* name() const override { return "Luminance-to-Alpha"; } 62 const char* name() const override { return "Luminance-to-Alpha"; }
63 63
64 class GLProcessor : public GrGLFragmentProcessor { 64 class GLProcessor : public GrGLFragmentProcessor {
65 public: 65 public:
66 GLProcessor(const GrProcessor&) {} 66 GLProcessor(const GrProcessor&) {}
67 67
68 static void GenKey(const GrProcessor&, const GrGLSLCaps&, GrProcessorKey Builder* b) {} 68 static void GenKey(const GrProcessor&, const GrGLSLCaps&, GrProcessorKey Builder* b) {}
69 69
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 *array->append() = frag; 117 *array->append() = frag;
118 } else { 118 } else {
119 frag->unref(); 119 frag->unref();
120 SkDEBUGCODE(frag = NULL;) 120 SkDEBUGCODE(frag = NULL;)
121 } 121 }
122 return true; 122 return true;
123 } 123 }
124 return false; 124 return false;
125 } 125 }
126 #endif 126 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrProcessor.h ('k') | src/gpu/effects/GrDitherEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698