| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 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 // This test only works with the GPU backend. | 9 // This test only works with the GPU backend. |
| 10 | 10 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 for (int x = 0; x < S; ++x) { | 121 for (int x = 0; x < S; ++x) { |
| 122 gTextureData[offset + y * stride + x] = | 122 gTextureData[offset + y * stride + x] = |
| 123 ((x + y) % 2) ? (i ? green : red) : blue; | 123 ((x + y) % 2) ? (i ? green : red) : blue; |
| 124 } | 124 } |
| 125 } | 125 } |
| 126 texture->writePixels(S, (i ? 0 : S), S, S, | 126 texture->writePixels(S, (i ? 0 : S), S, S, |
| 127 texture->config(), gTextureData.get(), | 127 texture->config(), gTextureData.get(), |
| 128 4 * stride); | 128 4 * stride); |
| 129 ctx->drawRect(paint, vm, SkRect::MakeWH(2*S, 2*S)); | 129 ctx->drawRect(paint, vm, SkRect::MakeWH(2*S, 2*S)); |
| 130 } | 130 } |
| 131 } else { |
| 132 this->drawGpuOnlyMessage(canvas); |
| 131 } | 133 } |
| 132 } | 134 } |
| 133 | 135 |
| 134 private: | 136 private: |
| 135 typedef GM INHERITED; | 137 typedef GM INHERITED; |
| 136 }; | 138 }; |
| 137 | 139 |
| 138 ////////////////////////////////////////////////////////////////////////////// | 140 ////////////////////////////////////////////////////////////////////////////// |
| 139 | 141 |
| 140 static GM* MyFactory(void*) { return new TexDataGM; } | 142 static GM* MyFactory(void*) { return new TexDataGM; } |
| 141 static GMRegistry reg(MyFactory); | 143 static GMRegistry reg(MyFactory); |
| 142 | 144 |
| 143 } | 145 } |
| 144 | 146 |
| 145 #endif | 147 #endif |
| OLD | NEW |