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

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

Issue 2357273002: Add output format properties to SkImageFilter::Context (Closed)
Patch Set: Spelling Created 4 years, 3 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/SkLocalMatrixImageFilter.cpp ('k') | src/effects/SkComposeImageFilter.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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 sk_sp<GrFragmentProcessor> fp(GrAlphaThresholdFragmentProcessor::Make( 170 sk_sp<GrFragmentProcessor> fp(GrAlphaThresholdFragmentProcessor::Make(
171 inputTexture. get(), 171 inputTexture. get(),
172 maskTexture.g et(), 172 maskTexture.g et(),
173 fInnerThresho ld, 173 fInnerThresho ld,
174 fOuterThresho ld, 174 fOuterThresho ld,
175 bounds)); 175 bounds));
176 if (!fp) { 176 if (!fp) {
177 return nullptr; 177 return nullptr;
178 } 178 }
179 179
180 return DrawWithFP(context, std::move(fp), bounds, sk_ref_sp(input->getCo lorSpace())); 180 return DrawWithFP(context, std::move(fp), bounds, ctx.outputProperties() );
181 } 181 }
182 #endif 182 #endif
183 183
184 SkBitmap inputBM; 184 SkBitmap inputBM;
185 185
186 if (!input->getROPixels(&inputBM)) { 186 if (!input->getROPixels(&inputBM)) {
187 return nullptr; 187 return nullptr;
188 } 188 }
189 189
190 if (inputBM.colorType() != kN32_SkColorType) { 190 if (inputBM.colorType() != kN32_SkColorType) {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 dst); 256 dst);
257 } 257 }
258 258
259 #ifndef SK_IGNORE_TO_STRING 259 #ifndef SK_IGNORE_TO_STRING
260 void SkAlphaThresholdFilterImpl::toString(SkString* str) const { 260 void SkAlphaThresholdFilterImpl::toString(SkString* str) const {
261 str->appendf("SkAlphaThresholdImageFilter: ("); 261 str->appendf("SkAlphaThresholdImageFilter: (");
262 str->appendf("inner: %f outer: %f", fInnerThreshold, fOuterThreshold); 262 str->appendf("inner: %f outer: %f", fInnerThreshold, fOuterThreshold);
263 str->append(")"); 263 str->append(")");
264 } 264 }
265 #endif 265 #endif
OLDNEW
« no previous file with comments | « src/core/SkLocalMatrixImageFilter.cpp ('k') | src/effects/SkComposeImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698