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 "SkBitmap.h" | 8 #include "SkBitmap.h" |
9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkColor.h" | 10 #include "SkColor.h" |
11 #include "SkFontDescriptor.h" | 11 #include "SkFontDescriptor.h" |
12 #include "SkFontHost.h" | |
13 #include "SkGraphics.h" | 12 #include "SkGraphics.h" |
14 #include "SkPaint.h" | 13 #include "SkPaint.h" |
15 #include "SkPoint.h" | 14 #include "SkPoint.h" |
16 #include "SkRect.h" | 15 #include "SkRect.h" |
17 #include "SkStream.h" | 16 #include "SkStream.h" |
18 #include "SkTypeface.h" | 17 #include "SkTypeface.h" |
19 #include "SkTypes.h" | 18 #include "SkTypes.h" |
20 #include "Test.h" | 19 #include "Test.h" |
21 | 20 |
22 static const SkColor bgColor = SK_ColorWHITE; | 21 static const SkColor bgColor = SK_ColorWHITE; |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 SkSafeUnref(paint.setTypeface(streamTypeface)); | 107 SkSafeUnref(paint.setTypeface(streamTypeface)); |
109 drawBG(&streamCanvas); | 108 drawBG(&streamCanvas); |
110 streamCanvas.drawPosText("A", 1, &point, paint); | 109 streamCanvas.drawPosText("A", 1, &point, paint); |
111 | 110 |
112 REPORTER_ASSERT(reporter, | 111 REPORTER_ASSERT(reporter, |
113 compare(origBitmap, origRect, streamBitmap, streamRect))
; | 112 compare(origBitmap, origRect, streamBitmap, streamRect))
; |
114 } | 113 } |
115 //Make sure the typeface is deleted and removed. | 114 //Make sure the typeface is deleted and removed. |
116 SkGraphics::PurgeFontCache(); | 115 SkGraphics::PurgeFontCache(); |
117 } | 116 } |
OLD | NEW |