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

Side by Side Diff: src/effects/SkMatrixConvolutionImageFilter.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/effects/SkMagnifierImageFilter.cpp ('k') | src/effects/SkMorphologyImageFilter.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 2012 The Android Open Source Project 2 * Copyright 2012 The Android Open Source Project
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 "SkMatrixConvolutionImageFilter.h" 8 #include "SkMatrixConvolutionImageFilter.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 fKernel, 321 fKernel,
322 fGain, 322 fGain,
323 fBias, 323 fBias,
324 fKernelOff set, 324 fKernelOff set,
325 convert_ti lemodes(fTileMode), 325 convert_ti lemodes(fTileMode),
326 fConvolveA lpha)); 326 fConvolveA lpha));
327 if (!fp) { 327 if (!fp) {
328 return nullptr; 328 return nullptr;
329 } 329 }
330 330
331 return DrawWithFP(context, std::move(fp), bounds); 331 return DrawWithFP(context, std::move(fp), bounds, sk_ref_sp(input->getCo lorSpace()));
332 } 332 }
333 #endif 333 #endif
334 334
335 SkBitmap inputBM; 335 SkBitmap inputBM;
336 336
337 if (!input->getROPixels(&inputBM)) { 337 if (!input->getROPixels(&inputBM)) {
338 return nullptr; 338 return nullptr;
339 } 339 }
340 340
341 if (inputBM.colorType() != kN32_SkColorType) { 341 if (inputBM.colorType() != kN32_SkColorType) {
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 str->appendf("%f ", fKernel[y * fKernelSize.width() + x]); 413 str->appendf("%f ", fKernel[y * fKernelSize.width() + x]);
414 } 414 }
415 } 415 }
416 str->appendf(")"); 416 str->appendf(")");
417 str->appendf("gain: %f bias: %f ", fGain, fBias); 417 str->appendf("gain: %f bias: %f ", fGain, fBias);
418 str->appendf("offset: (%d, %d) ", fKernelOffset.fX, fKernelOffset.fY); 418 str->appendf("offset: (%d, %d) ", fKernelOffset.fX, fKernelOffset.fY);
419 str->appendf("convolveAlpha: %s", fConvolveAlpha ? "true" : "false"); 419 str->appendf("convolveAlpha: %s", fConvolveAlpha ? "true" : "false");
420 str->append(")"); 420 str->append(")");
421 } 421 }
422 #endif 422 #endif
OLDNEW
« no previous file with comments | « src/effects/SkMagnifierImageFilter.cpp ('k') | src/effects/SkMorphologyImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698