| 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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 0xffff, | 294 0xffff, |
| 295 0xffff); | 295 0xffff); |
| 296 | 296 |
| 297 if (random->nextBool()) { | 297 if (random->nextBool()) { |
| 298 pipelineBuilder->setStencil(kDoesWriteStencil); | 298 pipelineBuilder->setStencil(kDoesWriteStencil); |
| 299 } else { | 299 } else { |
| 300 pipelineBuilder->setStencil(kDoesNotWriteStencil); | 300 pipelineBuilder->setStencil(kDoesNotWriteStencil); |
| 301 } | 301 } |
| 302 } | 302 } |
| 303 | 303 |
| 304 bool GrDrawingManager::ProgramUnitTest(GrContext* context, GrDrawTarget* drawTar
get, int maxStages) { | 304 bool GrDrawingManager::ProgramUnitTest(GrContext* context, |
| 305 | 305 GrDrawTarget* drawTarget, |
| 306 int maxStages) { |
| 306 GrDrawingManager* drawingManager = context->drawingManager(); | 307 GrDrawingManager* drawingManager = context->drawingManager(); |
| 307 | 308 |
| 308 // setup dummy textures | 309 // setup dummy textures |
| 309 GrSurfaceDesc dummyDesc; | 310 GrSurfaceDesc dummyDesc; |
| 310 dummyDesc.fFlags = kRenderTarget_GrSurfaceFlag; | 311 dummyDesc.fFlags = kRenderTarget_GrSurfaceFlag; |
| 311 dummyDesc.fConfig = kSkia8888_GrPixelConfig; | 312 dummyDesc.fConfig = kSkia8888_GrPixelConfig; |
| 312 dummyDesc.fWidth = 34; | 313 dummyDesc.fWidth = 34; |
| 313 dummyDesc.fHeight = 18; | 314 dummyDesc.fHeight = 18; |
| 314 SkAutoTUnref<GrTexture> dummyTexture1( | 315 SkAutoTUnref<GrTexture> dummyTexture1( |
| 315 context->textureProvider()->createTexture(dummyDesc, false, nullptr, 0))
; | 316 context->textureProvider()->createTexture(dummyDesc, false, nullptr, 0))
; |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 #endif | 445 #endif |
| 445 GrTestTarget testTarget; | 446 GrTestTarget testTarget; |
| 446 context->getTestTarget(&testTarget); | 447 context->getTestTarget(&testTarget); |
| 447 REPORTER_ASSERT(reporter, GrDrawingManager::ProgramUnitTest( | 448 REPORTER_ASSERT(reporter, GrDrawingManager::ProgramUnitTest( |
| 448 context, testTarget.target(), maxSta
ges)); | 449 context, testTarget.target(), maxSta
ges)); |
| 449 } | 450 } |
| 450 } | 451 } |
| 451 } | 452 } |
| 452 | 453 |
| 453 #endif | 454 #endif |
| OLD | NEW |