Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Side by Side Diff: tests/GLProgramsTest.cpp

Issue 319043005: Support using OpenGL ES context on desktop (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698