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

Side by Side Diff: gm/dcshader.cpp

Issue 1109863004: Use GLSLCaps for creating processor keys and GLSL-specific programs (Closed) Base URL: https://chromium.googlesource.com/skia@master
Patch Set: Created 5 years, 8 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 | « no previous file | include/effects/SkTableColorFilter.h » ('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 /* 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
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
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
OLDNEW
« no previous file with comments | « no previous file | include/effects/SkTableColorFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698