OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 "SkColorPriv.h" | 8 #include "SkColorPriv.h" |
9 #include "SkConfig8888.h" | 9 #include "SkConfig8888.h" |
10 #include "SkData.h" | 10 #include "SkData.h" |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 } | 204 } |
205 default: | 205 default: |
206 return false; // no change, so don't call notifyPixelsChanged() | 206 return false; // no change, so don't call notifyPixelsChanged() |
207 } | 207 } |
208 return true; | 208 return true; |
209 } | 209 } |
210 | 210 |
211 #include "SkNx.h" | 211 #include "SkNx.h" |
212 #include "SkHalf.h" | 212 #include "SkHalf.h" |
213 | 213 |
214 static void sk_memset64(uint64_t dst[], uint64_t value, int count) { | |
215 for (int i = 0; i < count; ++i) { | |
216 dst[i] = value; | |
217 } | |
218 } | |
219 | |
220 bool SkPixmap::erase(const SkColor4f& origColor, const SkIRect* subset) const { | 214 bool SkPixmap::erase(const SkColor4f& origColor, const SkIRect* subset) const { |
221 SkPixmap pm; | 215 SkPixmap pm; |
222 if (subset) { | 216 if (subset) { |
223 if (!this->extractSubset(&pm, *subset)) { | 217 if (!this->extractSubset(&pm, *subset)) { |
224 return false; | 218 return false; |
225 } | 219 } |
226 } else { | 220 } else { |
227 pm = *this; | 221 pm = *this; |
228 } | 222 } |
229 | 223 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 if (!fStorage) { | 316 if (!fStorage) { |
323 return nullptr; | 317 return nullptr; |
324 } | 318 } |
325 | 319 |
326 auto data = SkData::MakeFromMalloc(fStorage, this->getSafeSize()); | 320 auto data = SkData::MakeFromMalloc(fStorage, this->getSafeSize()); |
327 fStorage = nullptr; | 321 fStorage = nullptr; |
328 this->INHERITED::reset(); | 322 this->INHERITED::reset(); |
329 | 323 |
330 return data.release(); | 324 return data.release(); |
331 } | 325 } |
OLD | NEW |