| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2014 Google Inc. | 3 * Copyright 2014 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #include "gm.h" | 9 #include "gm.h" |
| 10 #if SK_SUPPORT_GPU | 10 #if SK_SUPPORT_GPU |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 return SkNEW_ARGS(DCShader, (matrix)); | 53 return SkNEW_ARGS(DCShader, (matrix)); |
| 54 } | 54 } |
| 55 | 55 |
| 56 class DCFP : public GrFragmentProcessor { | 56 class DCFP : public GrFragmentProcessor { |
| 57 public: | 57 public: |
| 58 DCFP(const SkMatrix& m) : fDeviceTransform(kDevice_GrCoordSet, m) { | 58 DCFP(const SkMatrix& m) : fDeviceTransform(kDevice_GrCoordSet, m) { |
| 59 this->addCoordTransform(&fDeviceTransform); | 59 this->addCoordTransform(&fDeviceTransform); |
| 60 this->initClassID<DCFP>(); | 60 this->initClassID<DCFP>(); |
| 61 } | 61 } |
| 62 | 62 |
| 63 void getGLProcessorKey(const GrGLCaps& caps, | 63 void getGLProcessorKey(const GrGLSLCaps& caps, |
| 64 GrProcessorKeyBuilder* b) const override {} | 64 GrProcessorKeyBuilder* b) const override {} |
| 65 | 65 |
| 66 GrGLFragmentProcessor* createGLInstance() const override { | 66 GrGLFragmentProcessor* createGLInstance() const override { |
| 67 class DCGLFP : public GrGLFragmentProcessor { | 67 class DCGLFP : public GrGLFragmentProcessor { |
| 68 void emitCode(GrGLFPBuilder* builder, | 68 void emitCode(GrGLFPBuilder* builder, |
| 69 const GrFragmentProcessor& fp, | 69 const GrFragmentProcessor& fp, |
| 70 const char* outputColor, | 70 const char* outputColor, |
| 71 const char* inputColor, | 71 const char* inputColor, |
| 72 const TransformedCoordsArray& coords, | 72 const TransformedCoordsArray& coords, |
| 73 const TextureSamplerArray& samplers) { | 73 const TextureSamplerArray& samplers) { |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 }; | 311 }; |
| 312 | 312 |
| 313 SkTArray<Prim*> fPrims; | 313 SkTArray<Prim*> fPrims; |
| 314 | 314 |
| 315 typedef GM INHERITED; | 315 typedef GM INHERITED; |
| 316 }; | 316 }; |
| 317 | 317 |
| 318 DEF_GM( return SkNEW(DCShaderGM); ) | 318 DEF_GM( return SkNEW(DCShaderGM); ) |
| 319 } | 319 } |
| 320 #endif | 320 #endif |
| OLD | NEW |