| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 "Resources.h" | 8 #include "Resources.h" |
| 9 #include "SkData.h" | 9 #include "SkData.h" |
| 10 #include "SkDecodingImageGenerator.h" | |
| 11 #include "gm.h" | 10 #include "gm.h" |
| 12 #include "sk_tool_utils.h" | 11 #include "sk_tool_utils.h" |
| 13 | 12 |
| 14 static void checkerboard( | 13 static void checkerboard( |
| 15 SkCanvas* canvas, int w, int h, int size, SkColor c1, SkColor c2) { | 14 SkCanvas* canvas, int w, int h, int size, SkColor c1, SkColor c2) { |
| 16 SkAutoCanvasRestore autoCanvasRestore(canvas, true); | 15 SkAutoCanvasRestore autoCanvasRestore(canvas, true); |
| 17 canvas->clipRect(SkRect::MakeWH(SkIntToScalar(w), SkIntToScalar(h))); | 16 canvas->clipRect(SkRect::MakeWH(SkIntToScalar(w), SkIntToScalar(h))); |
| 18 canvas->drawColor(c1); | 17 canvas->drawColor(c1); |
| 19 SkPaint paint; | 18 SkPaint paint; |
| 20 paint.setColor(c2); | 19 paint.setColor(c2); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 canvas->drawText("B", 1, 40.0f, 20.0f, paint); | 70 canvas->drawText("B", 1, 40.0f, 20.0f, paint); |
| 72 paint.setColor(SK_ColorCYAN); | 71 paint.setColor(SK_ColorCYAN); |
| 73 canvas->drawText("C", 1, 56.0f, 20.0f, paint); | 72 canvas->drawText("C", 1, 56.0f, 20.0f, paint); |
| 74 paint.setColor(SK_ColorMAGENTA); | 73 paint.setColor(SK_ColorMAGENTA); |
| 75 canvas->drawText("M", 1, 72.0f, 20.0f, paint); | 74 canvas->drawText("M", 1, 72.0f, 20.0f, paint); |
| 76 paint.setColor(SK_ColorYELLOW); | 75 paint.setColor(SK_ColorYELLOW); |
| 77 canvas->drawText("Y", 1, 88.0f, 20.0f, paint); | 76 canvas->drawText("Y", 1, 88.0f, 20.0f, paint); |
| 78 paint.setColor(SK_ColorBLACK); | 77 paint.setColor(SK_ColorBLACK); |
| 79 canvas->drawText("K", 1, 104.0f, 20.0f, paint); | 78 canvas->drawText("K", 1, 104.0f, 20.0f, paint); |
| 80 } | 79 } |
| OLD | NEW |