| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 #if SK_SUPPORT_GPU | 9 #if SK_SUPPORT_GPU |
| 10 #include "GrContext.h" | 10 #include "GrContext.h" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 for (int x = 0; x < w; ++x) { | 132 for (int x = 0; x < w; ++x) { |
| 133 expectedPixels.get()[y * h + x] = expectedColor1; | 133 expectedPixels.get()[y * h + x] = expectedColor1; |
| 134 } | 134 } |
| 135 } | 135 } |
| 136 | 136 |
| 137 test_read_pixels(reporter, context, rectangleTexture, expectedPixels.get
()); | 137 test_read_pixels(reporter, context, rectangleTexture, expectedPixels.get
()); |
| 138 } | 138 } |
| 139 } | 139 } |
| 140 | 140 |
| 141 DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(RectangleTexture, reporter, ctxInfo) { | 141 DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(RectangleTexture, reporter, ctxInfo) { |
| 142 GrContext* context = ctxInfo.fGrContext; | 142 GrContext* context = ctxInfo.grContext(); |
| 143 sk_gpu_test::GLTestContext* glContext = ctxInfo.fGLContext; | 143 sk_gpu_test::GLTestContext* glContext = ctxInfo.glContext(); |
| 144 static const int kWidth = 13; | 144 static const int kWidth = 13; |
| 145 static const int kHeight = 13; | 145 static const int kHeight = 13; |
| 146 | 146 |
| 147 GrColor pixels[kWidth * kHeight]; | 147 GrColor pixels[kWidth * kHeight]; |
| 148 for (int y = 0; y < kHeight; ++y) { | 148 for (int y = 0; y < kHeight; ++y) { |
| 149 for (int x = 0; x < kWidth; ++x) { | 149 for (int x = 0; x < kWidth; ++x) { |
| 150 pixels[y * kWidth + x] = y * kWidth + x; | 150 pixels[y * kWidth + x] = y * kWidth + x; |
| 151 } | 151 } |
| 152 } | 152 } |
| 153 | 153 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 | 201 |
| 202 test_write_pixels(reporter, context, rectangleTexture); | 202 test_write_pixels(reporter, context, rectangleTexture); |
| 203 | 203 |
| 204 test_clear(reporter, context, rectangleTexture); | 204 test_clear(reporter, context, rectangleTexture); |
| 205 | 205 |
| 206 GR_GL_CALL(glContext->gl(), DeleteTextures(1, &rectTexID)); | 206 GR_GL_CALL(glContext->gl(), DeleteTextures(1, &rectTexID)); |
| 207 } | 207 } |
| 208 } | 208 } |
| 209 | 209 |
| 210 #endif | 210 #endif |
| OLD | NEW |