Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(179)

Side by Side Diff: src/core/SkPixmap.cpp

Issue 1808963005: 4f linear gradient shader blitters (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: rename trunc_from_255 to quiet confused msvc Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/core/SkUtils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | src/core/SkUtils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698