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

Side by Side Diff: tests/GLProgramsTest.cpp

Issue 1287023009: Added tree structure to GrGLFragmentProcessor, i.e. GL instances (Closed) Base URL: https://skia.googlesource.com/skia@cs3_isequal_nonrecursive
Patch Set: moved onSetData from public to protected, onCreateGLInstance from public to private in subclasses Created 5 years, 4 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/gl/GrGLProgram.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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 class BigKeyProcessor : public GrFragmentProcessor { 62 class BigKeyProcessor : public GrFragmentProcessor {
63 public: 63 public:
64 static GrFragmentProcessor* Create() { 64 static GrFragmentProcessor* Create() {
65 GR_CREATE_STATIC_PROCESSOR(gBigKeyProcessor, BigKeyProcessor, ()) 65 GR_CREATE_STATIC_PROCESSOR(gBigKeyProcessor, BigKeyProcessor, ())
66 return SkRef(gBigKeyProcessor); 66 return SkRef(gBigKeyProcessor);
67 } 67 }
68 68
69 const char* name() const override { return "Big Ole Key"; } 69 const char* name() const override { return "Big Ole Key"; }
70 70
71 GrGLFragmentProcessor* createGLInstance() const override { 71 GrGLFragmentProcessor* onCreateGLInstance() const override {
72 return SkNEW_ARGS(GLBigKeyProcessor, (*this)); 72 return SkNEW_ARGS(GLBigKeyProcessor, (*this));
73 } 73 }
74 74
75 private: 75 private:
76 BigKeyProcessor() { 76 BigKeyProcessor() {
77 this->initClassID<BigKeyProcessor>(); 77 this->initClassID<BigKeyProcessor>();
78 } 78 }
79 virtual void onGetGLProcessorKey(const GrGLSLCaps& caps, 79 virtual void onGetGLProcessorKey(const GrGLSLCaps& caps,
80 GrProcessorKeyBuilder* b) const override { 80 GrProcessorKeyBuilder* b) const override {
81 GLBigKeyProcessor::GenKey(*this, caps, b); 81 GLBigKeyProcessor::GenKey(*this, caps, b);
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 } 296 }
297 #endif 297 #endif
298 GrTestTarget target; 298 GrTestTarget target;
299 context->getTestTarget(&target); 299 context->getTestTarget(&target);
300 REPORTER_ASSERT(reporter, target.target()->programUnitTest(context, maxStages)); 300 REPORTER_ASSERT(reporter, target.target()->programUnitTest(context, maxStages));
301 } 301 }
302 } 302 }
303 } 303 }
304 304
305 #endif 305 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLProgram.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698