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

Side by Side Diff: tests/GLProgramsTest.cpp

Issue 1414733007: Stop creating static GrProcessor instances (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 2 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 | « src/gpu/effects/GrDitherEffect.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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 } 60 }
61 } 61 }
62 62
63 private: 63 private:
64 typedef GrGLFragmentProcessor INHERITED; 64 typedef GrGLFragmentProcessor INHERITED;
65 }; 65 };
66 66
67 class BigKeyProcessor : public GrFragmentProcessor { 67 class BigKeyProcessor : public GrFragmentProcessor {
68 public: 68 public:
69 static GrFragmentProcessor* Create() { 69 static GrFragmentProcessor* Create() {
70 static BigKeyProcessor gBigKeyProcessor; 70 return new BigKeyProcessor;
71 return SkRef(&gBigKeyProcessor);
72 } 71 }
73 72
74 const char* name() const override { return "Big Ole Key"; } 73 const char* name() const override { return "Big Ole Key"; }
75 74
76 GrGLFragmentProcessor* onCreateGLInstance() const override { 75 GrGLFragmentProcessor* onCreateGLInstance() const override {
77 return new GLBigKeyProcessor(*this); 76 return new GLBigKeyProcessor(*this);
78 } 77 }
79 78
80 private: 79 private:
81 BigKeyProcessor() { 80 BigKeyProcessor() {
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 } 438 }
440 #endif 439 #endif
441 GrTestTarget target; 440 GrTestTarget target;
442 context->getTestTarget(&target); 441 context->getTestTarget(&target);
443 REPORTER_ASSERT(reporter, target.target()->programUnitTest(context, maxStages)); 442 REPORTER_ASSERT(reporter, target.target()->programUnitTest(context, maxStages));
444 } 443 }
445 } 444 }
446 } 445 }
447 446
448 #endif 447 #endif
OLDNEW
« no previous file with comments | « src/gpu/effects/GrDitherEffect.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698