| OLD | NEW |
| 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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 if (random->nextBool()) { | 193 if (random->nextBool()) { |
| 194 pipelineBuilder->setStencil(kDoesWriteStencil); | 194 pipelineBuilder->setStencil(kDoesWriteStencil); |
| 195 } else { | 195 } else { |
| 196 pipelineBuilder->setStencil(kDoesNotWriteStencil); | 196 pipelineBuilder->setStencil(kDoesNotWriteStencil); |
| 197 } | 197 } |
| 198 } | 198 } |
| 199 | 199 |
| 200 bool GrDrawTarget::programUnitTest(GrContext* context, int maxStages) { | 200 bool GrDrawTarget::programUnitTest(GrContext* context, int maxStages) { |
| 201 // setup dummy textures | 201 // setup dummy textures |
| 202 GrSurfaceDesc dummyDesc; | 202 GrSurfaceDesc dummyDesc; |
| 203 dummyDesc.fFlags = kRenderTarget_GrSurfaceFlag; |
| 203 dummyDesc.fConfig = kSkia8888_GrPixelConfig; | 204 dummyDesc.fConfig = kSkia8888_GrPixelConfig; |
| 204 dummyDesc.fWidth = 34; | 205 dummyDesc.fWidth = 34; |
| 205 dummyDesc.fHeight = 18; | 206 dummyDesc.fHeight = 18; |
| 206 SkAutoTUnref<GrTexture> dummyTexture1( | 207 SkAutoTUnref<GrTexture> dummyTexture1( |
| 207 fResourceProvider->createTexture(dummyDesc, false, NULL, 0)); | 208 fResourceProvider->createTexture(dummyDesc, false, NULL, 0)); |
| 208 dummyDesc.fFlags = kNone_GrSurfaceFlags; | 209 dummyDesc.fFlags = kNone_GrSurfaceFlags; |
| 209 dummyDesc.fConfig = kAlpha_8_GrPixelConfig; | 210 dummyDesc.fConfig = kAlpha_8_GrPixelConfig; |
| 210 dummyDesc.fWidth = 16; | 211 dummyDesc.fWidth = 16; |
| 211 dummyDesc.fHeight = 22; | 212 dummyDesc.fHeight = 22; |
| 212 SkAutoTUnref<GrTexture> dummyTexture2( | 213 SkAutoTUnref<GrTexture> dummyTexture2( |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 } | 299 } |
| 299 #endif | 300 #endif |
| 300 GrTestTarget target; | 301 GrTestTarget target; |
| 301 context->getTestTarget(&target); | 302 context->getTestTarget(&target); |
| 302 REPORTER_ASSERT(reporter, target.target()->programUnitTest(context,
maxStages)); | 303 REPORTER_ASSERT(reporter, target.target()->programUnitTest(context,
maxStages)); |
| 303 } | 304 } |
| 304 } | 305 } |
| 305 } | 306 } |
| 306 | 307 |
| 307 #endif | 308 #endif |
| OLD | NEW |