| 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 #include "Test.h" | 9 #include "Test.h" |
| 10 #if SK_SUPPORT_GPU | 10 #if SK_SUPPORT_GPU |
| 11 | 11 |
| 12 #include "GrCaps.h" | 12 #include "GrCaps.h" |
| 13 #include "GrContext.h" | 13 #include "GrContext.h" |
| 14 #include "GrContextFactory.h" | 14 #include "GrContextFactory.h" |
| 15 #include "GrGpu.h" | 15 #include "GrGpu.h" |
| 16 | 16 |
| 17 static void test_print(skiatest::Reporter*, const GrCaps* caps) { | 17 static void test_print(skiatest::Reporter*, const GrCaps* caps) { |
| 18 // This used to assert. | 18 // This used to assert. |
| 19 SkString result = caps->dump(); | 19 SkString result = caps->dump(); |
| 20 SkASSERT(!result.isEmpty()); | 20 SkASSERT(!result.isEmpty()); |
| 21 SkString shaderResult = caps->shaderCaps()->dump(); | 21 SkString shaderResult = caps->shaderCaps()->dump(); |
| 22 SkASSERT(!shaderResult.isEmpty()); | 22 SkASSERT(!shaderResult.isEmpty()); |
| 23 } | 23 } |
| 24 | 24 |
| 25 DEF_GPUTEST(GrDrawTarget, reporter, factory) { | 25 DEF_GPUTEST(GrDrawTarget, reporter, factory) { |
| 26 for (int type = 0; type < GrContextFactory::kLastGLContextType; ++type) { | 26 for (int type = 0; type < GrContextFactory::kLastGLContextType; ++type) { |
| 27 GrContextFactory::GLContextType glType = static_cast<GrContextFactory::G
LContextType>(type); | 27 GrContextFactory::GLContextType glType = static_cast<GrContextFactory::G
LContextType>(type); |
| 28 | 28 |
| 29 GrContext* grContext = factory->get(glType); | 29 GrContext* grContext = factory->get(glType); |
| 30 if (NULL == grContext) { | 30 if (nullptr == grContext) { |
| 31 continue; | 31 continue; |
| 32 } | 32 } |
| 33 | 33 |
| 34 test_print(reporter, grContext->caps()); | 34 test_print(reporter, grContext->caps()); |
| 35 } | 35 } |
| 36 } | 36 } |
| 37 | 37 |
| 38 #endif | 38 #endif |
| OLD | NEW |