| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |