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

Side by Side Diff: tests/GrDrawTargetTest.cpp

Issue 132293005: Add a DEF_GPUTEST() macro. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: fatory -> factory 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/GrContextFactoryTest.cpp ('k') | tests/GrSurfaceTest.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 /* 2 /*
3 * Copyright 2013 Google Inc. 3 * Copyright 2013 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 #if SK_SUPPORT_GPU 9 #if SK_SUPPORT_GPU
10 10
11 #include "GrContext.h" 11 #include "GrContext.h"
12 #include "GrContextFactory.h" 12 #include "GrContextFactory.h"
13 #include "GrGpu.h" 13 #include "GrGpu.h"
14 #include "GrDrawTargetCaps.h" 14 #include "GrDrawTargetCaps.h"
15 #include "Test.h" 15 #include "Test.h"
16 #include "TestClassDef.h"
16 17
17 static void test_print(skiatest::Reporter*, const GrDrawTargetCaps* caps) { 18 static void test_print(skiatest::Reporter*, const GrDrawTargetCaps* caps) {
18 // This used to assert. 19 // This used to assert.
19 SkString result = caps->dump(); 20 SkString result = caps->dump();
20 SkASSERT(!result.isEmpty()); 21 SkASSERT(!result.isEmpty());
21 } 22 }
22 23
23 static void TestGrDrawTarget(skiatest::Reporter* reporter, GrContextFactory* fac tory) { 24 DEF_GPUTEST(GrDrawTarget, reporter, factory) {
24 for (int type = 0; type < GrContextFactory::kLastGLContextType; ++type) { 25 for (int type = 0; type < GrContextFactory::kLastGLContextType; ++type) {
25 GrContextFactory::GLContextType glType = static_cast<GrContextFactory::G LContextType>(type); 26 GrContextFactory::GLContextType glType = static_cast<GrContextFactory::G LContextType>(type);
26 27
27 GrContext* grContext = factory->get(glType); 28 GrContext* grContext = factory->get(glType);
28 if (NULL == grContext) { 29 if (NULL == grContext) {
29 continue; 30 continue;
30 } 31 }
31 32
32 test_print(reporter, grContext->getGpu()->caps()); 33 test_print(reporter, grContext->getGpu()->caps());
33 } 34 }
34 } 35 }
35 36
36 #include "TestClassDef.h"
37 DEFINE_GPUTESTCLASS("GrDrawTarget", TestGrDrawTargetClass, TestGrDrawTarget)
38
39 #endif 37 #endif
OLDNEW
« no previous file with comments | « tests/GrContextFactoryTest.cpp ('k') | tests/GrSurfaceTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698