OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 "SkBitmapDevice.h" |
8 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
9 #include "SkDevice.h" | 10 #include "SkDevice.h" |
10 #include "SkForceLinking.h" | 11 #include "SkForceLinking.h" |
11 #include "SkGraphics.h" | 12 #include "SkGraphics.h" |
12 #include "SkImageDecoder.h" | 13 #include "SkImageDecoder.h" |
13 #include "SkImageEncoder.h" | 14 #include "SkImageEncoder.h" |
14 #include "SkOSFile.h" | 15 #include "SkOSFile.h" |
15 #include "SkPicture.h" | 16 #include "SkPicture.h" |
16 #include "SkStream.h" | 17 #include "SkStream.h" |
17 #include "SkTypeface.h" | 18 #include "SkTypeface.h" |
(...skipping 2889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2907 | 2908 |
2908 rect = SkRect::MakeWH(width, height); | 2909 rect = SkRect::MakeWH(width, height); |
2909 | 2910 |
2910 setup_bitmap(output, (int)SkScalarToDouble(width), (int)SkScalarToDouble(hei
ght)); | 2911 setup_bitmap(output, (int)SkScalarToDouble(width), (int)SkScalarToDouble(hei
ght)); |
2911 | 2912 |
2912 SkAutoTUnref<SkBaseDevice> device(SkNEW_ARGS(SkBitmapDevice, (*output))); | 2913 SkAutoTUnref<SkBaseDevice> device(SkNEW_ARGS(SkBitmapDevice, (*output))); |
2913 SkCanvas canvas(device); | 2914 SkCanvas canvas(device); |
2914 | 2915 |
2915 return renderer.renderPage(page, &canvas, rect); | 2916 return renderer.renderPage(page, &canvas, rect); |
2916 } | 2917 } |
OLD | NEW |