| 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" |
| 11 #include "SkRect.h" | 11 #include "SkRect.h" |
| 12 #include "glsl/GrGLSLFragmentProcessor.h" | 12 #include "glsl/GrGLSLFragmentProcessor.h" |
| 13 #include "glsl/GrGLSLFragmentShaderBuilder.h" | 13 #include "glsl/GrGLSLFragmentShaderBuilder.h" |
| 14 #include "glsl/GrGLSLProgramBuilder.h" | |
| 15 | 14 |
| 16 ////////////////////////////////////////////////////////////////////////////// | 15 ////////////////////////////////////////////////////////////////////////////// |
| 17 | 16 |
| 18 class DitherEffect : public GrFragmentProcessor { | 17 class DitherEffect : public GrFragmentProcessor { |
| 19 public: | 18 public: |
| 20 static GrFragmentProcessor* Create() { | 19 static GrFragmentProcessor* Create() { |
| 21 return new DitherEffect; | 20 return new DitherEffect; |
| 22 } | 21 } |
| 23 | 22 |
| 24 virtual ~DitherEffect() {}; | 23 virtual ~DitherEffect() {}; |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 void DitherEffect::onGetGLSLProcessorKey(const GrGLSLCaps& caps, | 94 void DitherEffect::onGetGLSLProcessorKey(const GrGLSLCaps& caps, |
| 96 GrProcessorKeyBuilder* b) const { | 95 GrProcessorKeyBuilder* b) const { |
| 97 GLDitherEffect::GenKey(*this, caps, b); | 96 GLDitherEffect::GenKey(*this, caps, b); |
| 98 } | 97 } |
| 99 | 98 |
| 100 GrGLSLFragmentProcessor* DitherEffect::onCreateGLSLInstance() const { | 99 GrGLSLFragmentProcessor* DitherEffect::onCreateGLSLInstance() const { |
| 101 return new GLDitherEffect(*this); | 100 return new GLDitherEffect(*this); |
| 102 } | 101 } |
| 103 | 102 |
| 104 GrFragmentProcessor* GrDitherEffect::Create() { return DitherEffect::Create(); } | 103 GrFragmentProcessor* GrDitherEffect::Create() { return DitherEffect::Create(); } |
| OLD | NEW |