| OLD | NEW |
| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 void DitherEffect::onComputeInvariantOutput(GrInvariantOutput* inout) const { | 49 void DitherEffect::onComputeInvariantOutput(GrInvariantOutput* inout) const { |
| 50 inout->setToUnknown(GrInvariantOutput::kWill_ReadInput); | 50 inout->setToUnknown(GrInvariantOutput::kWill_ReadInput); |
| 51 } | 51 } |
| 52 | 52 |
| 53 ////////////////////////////////////////////////////////////////////////////// | 53 ////////////////////////////////////////////////////////////////////////////// |
| 54 | 54 |
| 55 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(DitherEffect); | 55 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(DitherEffect); |
| 56 | 56 |
| 57 GrFragmentProcessor* DitherEffect::TestCreate(SkRandom*, | 57 GrFragmentProcessor* DitherEffect::TestCreate(SkRandom*, |
| 58 GrContext*, | 58 GrContext*, |
| 59 const GrDrawTargetCaps&, | 59 const GrCaps&, |
| 60 GrTexture*[]) { | 60 GrTexture*[]) { |
| 61 return DitherEffect::Create(); | 61 return DitherEffect::Create(); |
| 62 } | 62 } |
| 63 | 63 |
| 64 ////////////////////////////////////////////////////////////////////////////// | 64 ////////////////////////////////////////////////////////////////////////////// |
| 65 | 65 |
| 66 class GLDitherEffect : public GrGLFragmentProcessor { | 66 class GLDitherEffect : public GrGLFragmentProcessor { |
| 67 public: | 67 public: |
| 68 GLDitherEffect(const GrProcessor&); | 68 GLDitherEffect(const GrProcessor&); |
| 69 | 69 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 void DitherEffect::getGLProcessorKey(const GrGLSLCaps& caps, | 109 void DitherEffect::getGLProcessorKey(const GrGLSLCaps& caps, |
| 110 GrProcessorKeyBuilder* b) const { | 110 GrProcessorKeyBuilder* b) const { |
| 111 GLDitherEffect::GenKey(*this, caps, b); | 111 GLDitherEffect::GenKey(*this, caps, b); |
| 112 } | 112 } |
| 113 | 113 |
| 114 GrGLFragmentProcessor* DitherEffect::createGLInstance() const { | 114 GrGLFragmentProcessor* DitherEffect::createGLInstance() const { |
| 115 return SkNEW_ARGS(GLDitherEffect, (*this)); | 115 return SkNEW_ARGS(GLDitherEffect, (*this)); |
| 116 } | 116 } |
| 117 | 117 |
| 118 GrFragmentProcessor* GrDitherEffect::Create() { return DitherEffect::Create(); } | 118 GrFragmentProcessor* GrDitherEffect::Create() { return DitherEffect::Create(); } |
| OLD | NEW |