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

Side by Side Diff: tests/GLInterfaceValidation.cpp

Issue 138563004: Move macros from TestClassDef.h to Test.h (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: upload Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « tests/FrontBufferedStreamTest.cpp ('k') | tests/GLProgramsTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "Test.h" 8 #include "Test.h"
9 #include "TestClassDef.h"
10 9
11 // This is a GPU-backend specific test 10 // This is a GPU-backend specific test
12 #if SK_SUPPORT_GPU 11 #if SK_SUPPORT_GPU
13 12
14 #include "GrContextFactory.h" 13 #include "GrContextFactory.h"
15 14
16 DEF_GPUTEST(GLInterfaceValidation, reporter, factory) { 15 DEF_GPUTEST(GLInterfaceValidation, reporter, factory) {
17 for (int i = 0; i <= GrContextFactory::kLastGLContextType; ++i) { 16 for (int i = 0; i <= GrContextFactory::kLastGLContextType; ++i) {
18 GrContextFactory::GLContextType glCtxType = (GrContextFactory::GLContext Type)i; 17 GrContextFactory::GLContextType glCtxType = (GrContextFactory::GLContext Type)i;
19 // this forces the factory to make the context if it hasn't yet 18 // this forces the factory to make the context if it hasn't yet
20 factory->get(glCtxType); 19 factory->get(glCtxType);
21 SkGLContextHelper* glCtxHelper = factory->getGLContext(glCtxType); 20 SkGLContextHelper* glCtxHelper = factory->getGLContext(glCtxType);
22 REPORTER_ASSERT(reporter, NULL != glCtxHelper); 21 REPORTER_ASSERT(reporter, NULL != glCtxHelper);
23 if (NULL != glCtxHelper) { 22 if (NULL != glCtxHelper) {
24 const GrGLInterface* interface = glCtxHelper->gl(); 23 const GrGLInterface* interface = glCtxHelper->gl();
25 for (GrGLBinding binding = kFirstGrGLBinding; 24 for (GrGLBinding binding = kFirstGrGLBinding;
26 binding <= kLastGrGLBinding; 25 binding <= kLastGrGLBinding;
27 binding = static_cast<GrGLBinding>(binding << 1)) { 26 binding = static_cast<GrGLBinding>(binding << 1)) {
28 if (interface->fBindingsExported & binding) { 27 if (interface->fBindingsExported & binding) {
29 REPORTER_ASSERT(reporter, interface->validate(binding)); 28 REPORTER_ASSERT(reporter, interface->validate(binding));
30 } 29 }
31 } 30 }
32 } 31 }
33 } 32 }
34 } 33 }
35 34
36 #endif 35 #endif
OLDNEW
« no previous file with comments | « tests/FrontBufferedStreamTest.cpp ('k') | tests/GLProgramsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698