OLD | NEW |
---|---|
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 | 16 |
17 static void test_print(skiatest::Reporter*, const GrDrawTargetCaps* caps) { | 17 static void test_print(skiatest::Reporter*, const GrDrawTargetCaps* caps) { |
18 // This used to assert. | 18 // This used to assert. |
19 caps->print(); | 19 SkString result = caps->dump(); |
20 SkASSERT(!result.isEmpty()); | |
caryclark
2013/11/14 12:52:16
For now, the only change necessary is:
// Disable
| |
20 } | 21 } |
21 | 22 |
22 static void TestGrDrawTarget(skiatest::Reporter* reporter, GrContextFactory* fac tory) { | 23 static void TestGrDrawTarget(skiatest::Reporter* reporter, GrContextFactory* fac tory) { |
23 for (int type = 0; type < GrContextFactory::kLastGLContextType; ++type) { | 24 for (int type = 0; type < GrContextFactory::kLastGLContextType; ++type) { |
24 GrContextFactory::GLContextType glType = static_cast<GrContextFactory::G LContextType>(type); | 25 GrContextFactory::GLContextType glType = static_cast<GrContextFactory::G LContextType>(type); |
25 | 26 |
26 GrContext* grContext = factory->get(glType); | 27 GrContext* grContext = factory->get(glType); |
27 if (NULL == grContext) { | 28 if (NULL == grContext) { |
28 continue; | 29 continue; |
29 } | 30 } |
30 | 31 |
31 test_print(reporter, grContext->getGpu()->caps()); | 32 test_print(reporter, grContext->getGpu()->caps()); |
32 } | 33 } |
33 } | 34 } |
34 | 35 |
35 #include "TestClassDef.h" | 36 #include "TestClassDef.h" |
36 DEFINE_GPUTESTCLASS("GrDrawTarget", TestGrDrawTargetClass, TestGrDrawTarget) | 37 DEFINE_GPUTESTCLASS("GrDrawTarget", TestGrDrawTargetClass, TestGrDrawTarget) |
37 | 38 |
38 #endif | 39 #endif |
OLD | NEW |