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

Side by Side Diff: src/effects/SkAlphaThresholdFilter.cpp

Issue 2163343002: Adding color space to SkSpecialImage (Closed) Base URL: https://skia.googlesource.com/skia.git@colorspace-on-image
Patch Set: Fix compile after rebase Created 4 years, 5 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 | « src/core/SkSpecialSurface.cpp ('k') | src/effects/SkBlurImageFilter.cpp » ('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 2013 Google Inc. 2 * Copyright 2013 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 "SkAlphaThresholdFilter.h" 8 #include "SkAlphaThresholdFilter.h"
9 9
10 #include "SkBitmap.h" 10 #include "SkBitmap.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 sk_sp<GrFragmentProcessor> fp(GrAlphaThresholdFragmentProcessor::Make( 173 sk_sp<GrFragmentProcessor> fp(GrAlphaThresholdFragmentProcessor::Make(
174 inputTexture. get(), 174 inputTexture. get(),
175 maskTexture.g et(), 175 maskTexture.g et(),
176 fInnerThresho ld, 176 fInnerThresho ld,
177 fOuterThresho ld, 177 fOuterThresho ld,
178 bounds)); 178 bounds));
179 if (!fp) { 179 if (!fp) {
180 return nullptr; 180 return nullptr;
181 } 181 }
182 182
183 return DrawWithFP(context, std::move(fp), bounds); 183 return DrawWithFP(context, std::move(fp), bounds, sk_ref_sp(input->getCo lorSpace()));
184 } 184 }
185 #endif 185 #endif
186 186
187 SkBitmap inputBM; 187 SkBitmap inputBM;
188 188
189 if (!input->getROPixels(&inputBM)) { 189 if (!input->getROPixels(&inputBM)) {
190 return nullptr; 190 return nullptr;
191 } 191 }
192 192
193 if (inputBM.colorType() != kN32_SkColorType) { 193 if (inputBM.colorType() != kN32_SkColorType) {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 dst); 259 dst);
260 } 260 }
261 261
262 #ifndef SK_IGNORE_TO_STRING 262 #ifndef SK_IGNORE_TO_STRING
263 void SkAlphaThresholdFilterImpl::toString(SkString* str) const { 263 void SkAlphaThresholdFilterImpl::toString(SkString* str) const {
264 str->appendf("SkAlphaThresholdImageFilter: ("); 264 str->appendf("SkAlphaThresholdImageFilter: (");
265 str->appendf("inner: %f outer: %f", fInnerThreshold, fOuterThreshold); 265 str->appendf("inner: %f outer: %f", fInnerThreshold, fOuterThreshold);
266 str->append(")"); 266 str->append(")");
267 } 267 }
268 #endif 268 #endif
OLDNEW
« no previous file with comments | « src/core/SkSpecialSurface.cpp ('k') | src/effects/SkBlurImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698