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

Side by Side Diff: src/gpu/effects/GrDitherEffect.cpp

Issue 1213623022: fix up test create functions (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: more cleanup Created 5 years, 5 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
OLDNEW
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 "GrDitherEffect.h" 8 #include "GrDitherEffect.h"
9 #include "GrFragmentProcessor.h" 9 #include "GrFragmentProcessor.h"
10 #include "GrInvariantOutput.h" 10 #include "GrInvariantOutput.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 }; 46 };
47 47
48 void DitherEffect::onComputeInvariantOutput(GrInvariantOutput* inout) const { 48 void DitherEffect::onComputeInvariantOutput(GrInvariantOutput* inout) const {
49 inout->setToUnknown(GrInvariantOutput::kWill_ReadInput); 49 inout->setToUnknown(GrInvariantOutput::kWill_ReadInput);
50 } 50 }
51 51
52 ////////////////////////////////////////////////////////////////////////////// 52 //////////////////////////////////////////////////////////////////////////////
53 53
54 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(DitherEffect); 54 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(DitherEffect);
55 55
56 GrFragmentProcessor* DitherEffect::TestCreate(SkRandom*, 56 GrFragmentProcessor* DitherEffect::TestCreate(GrProcessorTestData*) {
57 GrContext*,
58 const GrCaps&,
59 GrTexture*[]) {
60 return DitherEffect::Create(); 57 return DitherEffect::Create();
61 } 58 }
62 59
63 ////////////////////////////////////////////////////////////////////////////// 60 //////////////////////////////////////////////////////////////////////////////
64 61
65 class GLDitherEffect : public GrGLFragmentProcessor { 62 class GLDitherEffect : public GrGLFragmentProcessor {
66 public: 63 public:
67 GLDitherEffect(const GrProcessor&); 64 GLDitherEffect(const GrProcessor&);
68 65
69 virtual void emitCode(GrGLFPBuilder* builder, 66 virtual void emitCode(GrGLFPBuilder* builder,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 void DitherEffect::getGLProcessorKey(const GrGLSLCaps& caps, 105 void DitherEffect::getGLProcessorKey(const GrGLSLCaps& caps,
109 GrProcessorKeyBuilder* b) const { 106 GrProcessorKeyBuilder* b) const {
110 GLDitherEffect::GenKey(*this, caps, b); 107 GLDitherEffect::GenKey(*this, caps, b);
111 } 108 }
112 109
113 GrGLFragmentProcessor* DitherEffect::createGLInstance() const { 110 GrGLFragmentProcessor* DitherEffect::createGLInstance() const {
114 return SkNEW_ARGS(GLDitherEffect, (*this)); 111 return SkNEW_ARGS(GLDitherEffect, (*this));
115 } 112 }
116 113
117 GrFragmentProcessor* GrDitherEffect::Create() { return DitherEffect::Create(); } 114 GrFragmentProcessor* GrDitherEffect::Create() { return DitherEffect::Create(); }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrDistanceFieldGeoProc.cpp ('k') | src/gpu/effects/GrMatrixConvolutionEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698