OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 "picture_utils.h" | 8 #include "picture_utils.h" |
9 #include "CopyTilesRenderer.h" | 9 #include "CopyTilesRenderer.h" |
10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
11 #include "SkDevice.h" | 11 #include "SkDevice.h" |
12 #include "SkImageEncoder.h" | 12 #include "SkImageEncoder.h" |
13 #include "SkMultiPictureDraw.h" | 13 #include "SkMultiPictureDraw.h" |
14 #include "SkPicture.h" | 14 #include "SkPicture.h" |
15 #include "SkPixelRef.h" | 15 #include "SkPixelRef.h" |
16 #include "SkRect.h" | 16 #include "SkRect.h" |
17 #include "SkString.h" | 17 #include "SkString.h" |
18 | 18 |
19 namespace sk_tools { | 19 namespace sk_tools { |
20 #if SK_SUPPORT_GPU | 20 #if SK_SUPPORT_GPU |
21 CopyTilesRenderer::CopyTilesRenderer(const GrContextOptions& opts, int x, in
t y) | 21 CopyTilesRenderer::CopyTilesRenderer(const GrContext::Options& opts, int x,
int y) |
22 : INHERITED(opts) | 22 : INHERITED(opts) |
23 , fXTilesPerLargeTile(x) | 23 , fXTilesPerLargeTile(x) |
24 , fYTilesPerLargeTile(y) { } | 24 , fYTilesPerLargeTile(y) { } |
25 #else | 25 #else |
26 CopyTilesRenderer::CopyTilesRenderer(int x, int y) | 26 CopyTilesRenderer::CopyTilesRenderer(int x, int y) |
27 : fXTilesPerLargeTile(x) | 27 : fXTilesPerLargeTile(x) |
28 , fYTilesPerLargeTile(y) { } | 28 , fYTilesPerLargeTile(y) { } |
29 #endif | 29 #endif |
30 void CopyTilesRenderer::init(const SkPicture* pict, const SkString* writePat
h, | 30 void CopyTilesRenderer::init(const SkPicture* pict, const SkString* writePat
h, |
31 const SkString* mismatchPath, const SkString* i
nputFilename, | 31 const SkString* mismatchPath, const SkString* i
nputFilename, |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 } | 109 } |
110 } | 110 } |
111 } | 111 } |
112 return success; | 112 return success; |
113 } | 113 } |
114 | 114 |
115 SkString CopyTilesRenderer::getConfigNameInternal() { | 115 SkString CopyTilesRenderer::getConfigNameInternal() { |
116 return SkString("copy_tiles"); | 116 return SkString("copy_tiles"); |
117 } | 117 } |
118 } | 118 } |
OLD | NEW |