| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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" |
| 9 |
| 8 // This test is specific to the GPU backend. | 10 // This test is specific to the GPU backend. |
| 9 #if SK_SUPPORT_GPU && !defined(SK_BUILD_FOR_ANDROID) | 11 #if SK_SUPPORT_GPU && !defined(SK_BUILD_FOR_ANDROID) |
| 10 | 12 |
| 11 #include "GrContextFactory.h" | 13 #include "GrContextFactory.h" |
| 12 #include "SkGpuDevice.h" | 14 #include "SkGpuDevice.h" |
| 13 #include "Test.h" | |
| 14 | 15 |
| 15 static const int X_SIZE = 12; | 16 static const int X_SIZE = 12; |
| 16 static const int Y_SIZE = 12; | 17 static const int Y_SIZE = 12; |
| 17 | 18 |
| 18 DEF_GPUTEST(ReadWriteAlpha, reporter, factory) { | 19 DEF_GPUTEST(ReadWriteAlpha, reporter, factory) { |
| 19 for (int type = 0; type < GrContextFactory::kLastGLContextType; ++type) { | 20 for (int type = 0; type < GrContextFactory::kLastGLContextType; ++type) { |
| 20 GrContextFactory::GLContextType glType = static_cast<GrContextFactory::G
LContextType>(type); | 21 GrContextFactory::GLContextType glType = static_cast<GrContextFactory::G
LContextType>(type); |
| 21 if (!GrContextFactory::IsRenderingGLContext(glType)) { | 22 if (!GrContextFactory::IsRenderingGLContext(glType)) { |
| 22 continue; | 23 continue; |
| 23 } | 24 } |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 match = false; | 105 match = false; |
| 105 } | 106 } |
| 106 } | 107 } |
| 107 } | 108 } |
| 108 | 109 |
| 109 REPORTER_ASSERT(reporter, match); | 110 REPORTER_ASSERT(reporter, match); |
| 110 } | 111 } |
| 111 } | 112 } |
| 112 | 113 |
| 113 #endif | 114 #endif |
| OLD | NEW |