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" |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 #if SK_SUPPORT_GPU | 96 #if SK_SUPPORT_GPU |
97 if (isUsingGpuDevice()) { | 97 if (isUsingGpuDevice()) { |
98 dst.pixelRef()->readPixels(©, &subset); | 98 dst.pixelRef()->readPixels(©, &subset); |
99 } else { | 99 } else { |
100 #endif | 100 #endif |
101 dst.copyTo(©); | 101 dst.copyTo(©); |
102 #if SK_SUPPORT_GPU | 102 #if SK_SUPPORT_GPU |
103 } | 103 } |
104 #endif | 104 #endif |
105 success &= SkImageEncoder::EncodeFile(pathWithNumber
.c_str(), copy, | 105 success &= SkImageEncoder::EncodeFile(pathWithNumber
.c_str(), copy, |
106 SkImageEncoder
::kPNG_Type, 100); | 106 kPNG_SkEncoded
Format, 100); |
107 } | 107 } |
108 } | 108 } |
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 |