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 "Test.h" | |
9 #include "SkBitmap.h" | 8 #include "SkBitmap.h" |
10 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
11 #include "SkColor.h" | 10 #include "SkColor.h" |
12 #include "SkPaint.h" | 11 #include "SkPaint.h" |
13 #include "SkPoint.h" | 12 #include "SkPoint.h" |
14 #include "SkRect.h" | 13 #include "SkRect.h" |
15 #include "SkTypes.h" | 14 #include "SkTypes.h" |
| 15 #include "Test.h" |
16 | 16 |
17 static const SkColor bgColor = SK_ColorWHITE; | 17 static const SkColor bgColor = SK_ColorWHITE; |
18 | 18 |
19 static void create(SkBitmap* bm, SkIRect bound, SkBitmap::Config config) { | 19 static void create(SkBitmap* bm, SkIRect bound, SkBitmap::Config config) { |
20 bm->setConfig(config, bound.width(), bound.height()); | 20 bm->setConfig(config, bound.width(), bound.height()); |
21 bm->allocPixels(); | 21 bm->allocPixels(); |
22 } | 22 } |
23 | 23 |
24 static void drawBG(SkCanvas* canvas) { | 24 static void drawBG(SkCanvas* canvas) { |
25 canvas->drawColor(bgColor); | 25 canvas->drawColor(bgColor); |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 drawPosTextCanvas.drawPosText("A", 1, &point, paint); | 100 drawPosTextCanvas.drawPosText("A", 1, &point, paint); |
101 | 101 |
102 REPORTER_ASSERT(reporter, | 102 REPORTER_ASSERT(reporter, |
103 compare(drawTextBitmap, drawTextRect, | 103 compare(drawTextBitmap, drawTextRect, |
104 drawPosTextBitmap, drawPosTextRect)); | 104 drawPosTextBitmap, drawPosTextRect)); |
105 } | 105 } |
106 } | 106 } |
107 } | 107 } |
108 } | 108 } |
109 } | 109 } |
OLD | NEW |