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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 } | 330 } |
331 | 331 |
332 // because occasionally optimized drawstate creation will fail for valid
reasons, we only | 332 // because occasionally optimized drawstate creation will fail for valid
reasons, we only |
333 // want to increment on success | 333 // want to increment on success |
334 ++t; | 334 ++t; |
335 } | 335 } |
336 return true; | 336 return true; |
337 } | 337 } |
338 | 338 |
339 DEF_GPUTEST(GLPrograms, reporter, factory) { | 339 DEF_GPUTEST(GLPrograms, reporter, factory) { |
| 340 // Set a locale that would cause shader compilation to fail because of , as
decimal separator. |
| 341 // skbug 3330 |
| 342 #ifdef SK_BUILD_FOR_WIN |
| 343 GrAutoLocaleSetter als("sv-SE"); |
| 344 #else |
| 345 GrAutoLocaleSetter als("sv_SE.UTF-8"); |
| 346 #endif |
| 347 |
340 for (int type = 0; type < GrContextFactory::kLastGLContextType; ++type) { | 348 for (int type = 0; type < GrContextFactory::kLastGLContextType; ++type) { |
341 GrContext* context = factory->get(static_cast<GrContextFactory::GLContex
tType>(type)); | 349 GrContext* context = factory->get(static_cast<GrContextFactory::GLContex
tType>(type)); |
342 if (context) { | 350 if (context) { |
343 GrGLGpu* gpu = static_cast<GrGLGpu*>(context->getGpu()); | 351 GrGLGpu* gpu = static_cast<GrGLGpu*>(context->getGpu()); |
344 | 352 |
345 /* | 353 /* |
346 * For the time being, we only support the test with desktop GL or f
or android on | 354 * For the time being, we only support the test with desktop GL or f
or android on |
347 * ARM platforms | 355 * ARM platforms |
348 * TODO When we run ES 3.00 GLSL in more places, test again | 356 * TODO When we run ES 3.00 GLSL in more places, test again |
349 */ | 357 */ |
(...skipping 14 matching lines...) Expand all Loading... |
364 } | 372 } |
365 #endif | 373 #endif |
366 GrTestTarget target; | 374 GrTestTarget target; |
367 context->getTestTarget(&target); | 375 context->getTestTarget(&target); |
368 REPORTER_ASSERT(reporter, target.target()->programUnitTest(maxStages
)); | 376 REPORTER_ASSERT(reporter, target.target()->programUnitTest(maxStages
)); |
369 } | 377 } |
370 } | 378 } |
371 } | 379 } |
372 | 380 |
373 #endif | 381 #endif |
OLD | NEW |