| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 // This is a GPU-backend specific test. It relies on static intializers to work | 8 // This is a GPU-backend specific test. It relies on static intializers to work |
| 9 | 9 |
| 10 #include "SkTypes.h" | 10 #include "SkTypes.h" |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 | 324 |
| 325 GrTexture* dummyTextures[] = {dummyTexture1.get(), dummyTexture2.get()}; | 325 GrTexture* dummyTextures[] = {dummyTexture1.get(), dummyTexture2.get()}; |
| 326 | 326 |
| 327 // dummy scissor state | 327 // dummy scissor state |
| 328 GrScissorState scissor; | 328 GrScissorState scissor; |
| 329 | 329 |
| 330 // wide open clip | 330 // wide open clip |
| 331 GrClip clip; | 331 GrClip clip; |
| 332 | 332 |
| 333 SkRandom random; | 333 SkRandom random; |
| 334 static const int NUM_TESTS = 2048; | 334 static const int NUM_TESTS = 1024; |
| 335 for (int t = 0; t < NUM_TESTS; t++) { | 335 for (int t = 0; t < NUM_TESTS; t++) { |
| 336 // setup random render target(can fail) | 336 // setup random render target(can fail) |
| 337 SkAutoTUnref<GrRenderTarget> rt(random_render_target( | 337 SkAutoTUnref<GrRenderTarget> rt(random_render_target( |
| 338 context->textureProvider(), &random, context->caps())); | 338 context->textureProvider(), &random, context->caps())); |
| 339 if (!rt.get()) { | 339 if (!rt.get()) { |
| 340 SkDebugf("Could not allocate render target"); | 340 SkDebugf("Could not allocate render target"); |
| 341 return false; | 341 return false; |
| 342 } | 342 } |
| 343 | 343 |
| 344 GrPipelineBuilder pipelineBuilder; | 344 GrPipelineBuilder pipelineBuilder; |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 GrContextOptions opts; | 456 GrContextOptions opts; |
| 457 opts.fSuppressPrints = true; | 457 opts.fSuppressPrints = true; |
| 458 sk_gpu_test::GrContextFactory debugFactory(opts); | 458 sk_gpu_test::GrContextFactory debugFactory(opts); |
| 459 skiatest::RunWithGPUTestContexts(test_glprograms_native, skiatest::kNative_G
PUTestContexts, | 459 skiatest::RunWithGPUTestContexts(test_glprograms_native, skiatest::kNative_G
PUTestContexts, |
| 460 reporter, &debugFactory); | 460 reporter, &debugFactory); |
| 461 skiatest::RunWithGPUTestContexts(test_glprograms_other_contexts, | 461 skiatest::RunWithGPUTestContexts(test_glprograms_other_contexts, |
| 462 skiatest::kOther_GPUTestContexts, reporter,
&debugFactory); | 462 skiatest::kOther_GPUTestContexts, reporter,
&debugFactory); |
| 463 } | 463 } |
| 464 | 464 |
| 465 #endif | 465 #endif |
| OLD | NEW |