| 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 } | 220 } |
| 221 if (NULL == program.get()) { | 221 if (NULL == program.get()) { |
| 222 return false; | 222 return false; |
| 223 } | 223 } |
| 224 } | 224 } |
| 225 return true; | 225 return true; |
| 226 } | 226 } |
| 227 | 227 |
| 228 DEF_GPUTEST(GLPrograms, reporter, factory) { | 228 DEF_GPUTEST(GLPrograms, reporter, factory) { |
| 229 for (int type = 0; type < GrContextFactory::kLastGLContextType; ++type) { | 229 for (int type = 0; type < GrContextFactory::kLastGLContextType; ++type) { |
| 230 GrContext* context = factory->get(static_cast<GrContextFactory::GLContex
tType>(type)); | 230 GrContext* context = factory->get(static_cast<GrContextFactory::GLContex
tType>(type), |
| 231 kNone_GrGLStandard); |
| 231 if (NULL != context) { | 232 if (NULL != context) { |
| 232 GrGpuGL* gpu = static_cast<GrGpuGL*>(context->getGpu()); | 233 GrGpuGL* gpu = static_cast<GrGpuGL*>(context->getGpu()); |
| 233 int maxStages = 6; | 234 int maxStages = 6; |
| 234 #if SK_ANGLE | 235 #if SK_ANGLE |
| 235 // Some long shaders run out of temporary registers in the D3D compi
ler on ANGLE. | 236 // Some long shaders run out of temporary registers in the D3D compi
ler on ANGLE. |
| 236 if (type == GrContextFactory::kANGLE_GLContextType) { | 237 if (type == GrContextFactory::kANGLE_GLContextType) { |
| 237 maxStages = 3; | 238 maxStages = 3; |
| 238 } | 239 } |
| 239 #endif | 240 #endif |
| 240 REPORTER_ASSERT(reporter, gpu->programUnitTest(maxStages)); | 241 REPORTER_ASSERT(reporter, gpu->programUnitTest(maxStages)); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 261 SkRect::MakeWH(SK_Scalar1, SK_Scalar1), SK_Scalar1)); | 262 SkRect::MakeWH(SK_Scalar1, SK_Scalar1), SK_Scalar1)); |
| 262 GrConfigConversionEffect::Create(NULL, | 263 GrConfigConversionEffect::Create(NULL, |
| 263 false, | 264 false, |
| 264 GrConfigConversionEffect::kNone_PMConversio
n, | 265 GrConfigConversionEffect::kNone_PMConversio
n, |
| 265 SkMatrix::I()); | 266 SkMatrix::I()); |
| 266 SkScalar matrix[20]; | 267 SkScalar matrix[20]; |
| 267 SkAutoTUnref<SkColorMatrixFilter> cmf(SkColorMatrixFilter::Create(matrix)); | 268 SkAutoTUnref<SkColorMatrixFilter> cmf(SkColorMatrixFilter::Create(matrix)); |
| 268 } | 269 } |
| 269 | 270 |
| 270 #endif | 271 #endif |
| OLD | NEW |