| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 "gm.h" | 8 #include "gm.h" |
| 9 #include "SkSurface.h" | 9 #include "SkSurface.h" |
| 10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 #if SK_SUPPORT_GPU | 185 #if SK_SUPPORT_GPU |
| 186 GrContext* ctx = canvas->getGrContext(); | 186 GrContext* ctx = canvas->getGrContext(); |
| 187 | 187 |
| 188 SkAutoTUnref<SkSurface> surf4(SkSurface::NewRenderTarget(ctx, info, 0)); | 188 SkAutoTUnref<SkSurface> surf4(SkSurface::NewRenderTarget(ctx, info, 0)); |
| 189 #endif | 189 #endif |
| 190 | 190 |
| 191 test_surface(canvas, surf0, true); | 191 test_surface(canvas, surf0, true); |
| 192 canvas->translate(80, 0); | 192 canvas->translate(80, 0); |
| 193 test_surface(canvas, surf1, true); | 193 test_surface(canvas, surf1, true); |
| 194 #if SK_SUPPORT_GPU | 194 #if SK_SUPPORT_GPU |
| 195 if (NULL != ctx) { | 195 if (ctx) { |
| 196 canvas->translate(80, 0); | 196 canvas->translate(80, 0); |
| 197 test_surface(canvas, surf4, true); | 197 test_surface(canvas, surf4, true); |
| 198 } | 198 } |
| 199 #endif | 199 #endif |
| 200 } | 200 } |
| 201 | 201 |
| 202 virtual uint32_t onGetFlags() const SK_OVERRIDE { | 202 virtual uint32_t onGetFlags() const SK_OVERRIDE { |
| 203 return GM::kSkipPicture_Flag | GM::kSkipPipe_Flag; | 203 return GM::kSkipPicture_Flag | GM::kSkipPipe_Flag; |
| 204 } | 204 } |
| 205 | 205 |
| 206 private: | 206 private: |
| 207 typedef skiagm::GM INHERITED; | 207 typedef skiagm::GM INHERITED; |
| 208 }; | 208 }; |
| 209 | 209 |
| 210 ////////////////////////////////////////////////////////////////////////////// | 210 ////////////////////////////////////////////////////////////////////////////// |
| 211 | 211 |
| 212 static skiagm::GM* MyFactory(void*) { return new ImageGM; } | 212 static skiagm::GM* MyFactory(void*) { return new ImageGM; } |
| 213 static skiagm::GMRegistry reg(MyFactory); | 213 static skiagm::GMRegistry reg(MyFactory); |
| OLD | NEW |