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

Side by Side Diff: tests/GLProgramsTest.cpp

Issue 755363002: remove proc key (Closed) Base URL: https://skia.googlesource.com/skia.git@fixkey
Patch Set: address nit Created 6 years 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 | « src/gpu/gl/builders/GrGLProgramBuilder.cpp ('k') | no next file » | 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 2011 Google Inc. 3 * Copyright 2011 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 // This is a GPU-backend specific test. It relies on static intializers to work 9 // This is a GPU-backend specific test. It relies on static intializers to work
10 10
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 return BigKeyProcessor::Create(); 67 return BigKeyProcessor::Create();
68 } 68 }
69 69
70 class GLBigKeyProcessor : public GrGLFragmentProcessor { 70 class GLBigKeyProcessor : public GrGLFragmentProcessor {
71 public: 71 public:
72 GLBigKeyProcessor(const GrBackendProcessorFactory& factory, const GrProcesso r&) 72 GLBigKeyProcessor(const GrBackendProcessorFactory& factory, const GrProcesso r&)
73 : INHERITED(factory) {} 73 : INHERITED(factory) {}
74 74
75 virtual void emitCode(GrGLFPBuilder* builder, 75 virtual void emitCode(GrGLFPBuilder* builder,
76 const GrFragmentProcessor& fp, 76 const GrFragmentProcessor& fp,
77 const GrProcessorKey& key,
78 const char* outputColor, 77 const char* outputColor,
79 const char* inputColor, 78 const char* inputColor,
80 const TransformedCoordsArray&, 79 const TransformedCoordsArray&,
81 const TextureSamplerArray&) { 80 const TextureSamplerArray&) {}
82 for (uint32_t i = 0; i < kMaxKeySize; i++) {
83 SkASSERT(key.get32(i) == i);
84 }
85 }
86 81
87 static void GenKey(const GrProcessor& processor, const GrGLCaps&, GrProcesso rKeyBuilder* b) { 82 static void GenKey(const GrProcessor& processor, const GrGLCaps&, GrProcesso rKeyBuilder* b) {
88 for (uint32_t i = 0; i < kMaxKeySize; i++) { 83 for (uint32_t i = 0; i < kMaxKeySize; i++) {
89 b->add32(i); 84 b->add32(i);
90 } 85 }
91 } 86 }
92 87
93 private: 88 private:
94 typedef GrGLFragmentProcessor INHERITED; 89 typedef GrGLFragmentProcessor INHERITED;
95 }; 90 };
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 } 509 }
515 #endif 510 #endif
516 GrTestTarget target; 511 GrTestTarget target;
517 context->getTestTarget(&target); 512 context->getTestTarget(&target);
518 REPORTER_ASSERT(reporter, target.target()->programUnitTest(maxStages )); 513 REPORTER_ASSERT(reporter, target.target()->programUnitTest(maxStages ));
519 } 514 }
520 } 515 }
521 } 516 }
522 517
523 #endif 518 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/builders/GrGLProgramBuilder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698