OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 "SkTextureCompressor.h" | 8 #include "SkTextureCompressor.h" |
9 #include "SkTextureCompressor_ASTC.h" | 9 #include "SkTextureCompressor_ASTC.h" |
10 #include "SkTextureCompressor_LATC.h" | 10 #include "SkTextureCompressor_LATC.h" |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 } | 159 } |
160 } | 160 } |
161 break; | 161 break; |
162 | 162 |
163 default: | 163 default: |
164 // Do nothing... | 164 // Do nothing... |
165 break; | 165 break; |
166 } | 166 } |
167 } | 167 } |
168 | 168 |
169 if (NULL != proc) { | 169 if (proc) { |
170 return proc(dst, src, width, height, rowBytes); | 170 return proc(dst, src, width, height, rowBytes); |
171 } | 171 } |
172 | 172 |
173 return false; | 173 return false; |
174 } | 174 } |
175 | 175 |
176 SkData *CompressBitmapToFormat(const SkBitmap &bitmap, Format format) { | 176 SkData *CompressBitmapToFormat(const SkBitmap &bitmap, Format format) { |
177 SkAutoLockPixels alp(bitmap); | 177 SkAutoLockPixels alp(bitmap); |
178 | 178 |
179 int compressedDataSize = GetCompressedDataSize(format, bitmap.width(), bitma
p.height()); | 179 int compressedDataSize = GetCompressedDataSize(format, bitmap.width(), bitma
p.height()); |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 | 254 |
255 default: | 255 default: |
256 // Do nothing... | 256 // Do nothing... |
257 break; | 257 break; |
258 } | 258 } |
259 | 259 |
260 return false; | 260 return false; |
261 } | 261 } |
262 | 262 |
263 } // namespace SkTextureCompressor | 263 } // namespace SkTextureCompressor |
OLD | NEW |