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

Side by Side Diff: tests/GLProgramsTest.cpp

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT Created 5 years, 3 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 | « tests/GLInterfaceValidationTest.cpp ('k') | tests/GeometryTest.cpp » ('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 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 builder[1] = texDesc.fSampleCnt; 120 builder[1] = texDesc.fSampleCnt;
121 builder.finish(); 121 builder.finish();
122 122
123 GrTexture* texture = textureProvider->findAndRefTextureByUniqueKey(key); 123 GrTexture* texture = textureProvider->findAndRefTextureByUniqueKey(key);
124 if (!texture) { 124 if (!texture) {
125 texture = textureProvider->createTexture(texDesc, true); 125 texture = textureProvider->createTexture(texDesc, true);
126 if (texture) { 126 if (texture) {
127 textureProvider->assignUniqueKeyToTexture(key, texture); 127 textureProvider->assignUniqueKeyToTexture(key, texture);
128 } 128 }
129 } 129 }
130 return texture ? texture->asRenderTarget() : NULL; 130 return texture ? texture->asRenderTarget() : nullptr;
131 } 131 }
132 132
133 static void set_random_xpf(GrPipelineBuilder* pipelineBuilder, GrProcessorTestDa ta* d) { 133 static void set_random_xpf(GrPipelineBuilder* pipelineBuilder, GrProcessorTestDa ta* d) {
134 SkAutoTUnref<const GrXPFactory> xpf(GrProcessorTestFactory<GrXPFactory>::Cre ateStage(d)); 134 SkAutoTUnref<const GrXPFactory> xpf(GrProcessorTestFactory<GrXPFactory>::Cre ateStage(d));
135 SkASSERT(xpf); 135 SkASSERT(xpf);
136 pipelineBuilder->setXPFactory(xpf.get()); 136 pipelineBuilder->setXPFactory(xpf.get());
137 } 137 }
138 138
139 static void set_random_color_coverage_stages(GrPipelineBuilder* pipelineBuilder, 139 static void set_random_color_coverage_stages(GrPipelineBuilder* pipelineBuilder,
140 GrProcessorTestData* d, int maxStag es) { 140 GrProcessorTestData* d, int maxStag es) {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 } 195 }
196 196
197 bool GrDrawTarget::programUnitTest(GrContext* context, int maxStages) { 197 bool GrDrawTarget::programUnitTest(GrContext* context, int maxStages) {
198 // setup dummy textures 198 // setup dummy textures
199 GrSurfaceDesc dummyDesc; 199 GrSurfaceDesc dummyDesc;
200 dummyDesc.fFlags = kRenderTarget_GrSurfaceFlag; 200 dummyDesc.fFlags = kRenderTarget_GrSurfaceFlag;
201 dummyDesc.fConfig = kSkia8888_GrPixelConfig; 201 dummyDesc.fConfig = kSkia8888_GrPixelConfig;
202 dummyDesc.fWidth = 34; 202 dummyDesc.fWidth = 34;
203 dummyDesc.fHeight = 18; 203 dummyDesc.fHeight = 18;
204 SkAutoTUnref<GrTexture> dummyTexture1( 204 SkAutoTUnref<GrTexture> dummyTexture1(
205 context->textureProvider()->createTexture(dummyDesc, false, NULL, 0)); 205 context->textureProvider()->createTexture(dummyDesc, false, nullptr, 0)) ;
206 dummyDesc.fFlags = kNone_GrSurfaceFlags; 206 dummyDesc.fFlags = kNone_GrSurfaceFlags;
207 dummyDesc.fConfig = kAlpha_8_GrPixelConfig; 207 dummyDesc.fConfig = kAlpha_8_GrPixelConfig;
208 dummyDesc.fWidth = 16; 208 dummyDesc.fWidth = 16;
209 dummyDesc.fHeight = 22; 209 dummyDesc.fHeight = 22;
210 SkAutoTUnref<GrTexture> dummyTexture2( 210 SkAutoTUnref<GrTexture> dummyTexture2(
211 context->textureProvider()->createTexture(dummyDesc, false, NULL, 0)); 211 context->textureProvider()->createTexture(dummyDesc, false, nullptr, 0)) ;
212 212
213 if (!dummyTexture1 || ! dummyTexture2) { 213 if (!dummyTexture1 || ! dummyTexture2) {
214 SkDebugf("Could not allocate dummy textures"); 214 SkDebugf("Could not allocate dummy textures");
215 return false; 215 return false;
216 } 216 }
217 217
218 GrTexture* dummyTextures[] = {dummyTexture1.get(), dummyTexture2.get()}; 218 GrTexture* dummyTextures[] = {dummyTexture1.get(), dummyTexture2.get()};
219 219
220 // dummy scissor state 220 // dummy scissor state
221 GrScissorState scissor; 221 GrScissorState scissor;
(...skipping 74 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 | « tests/GLInterfaceValidationTest.cpp ('k') | tests/GeometryTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698