| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org> |
| 5 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 5 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
| 6 * Copyright (C) 2013 Google Inc. All rights reserved. | 6 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 hueRotateMatrix(values[0], matrix); | 139 hueRotateMatrix(values[0], matrix); |
| 140 break; | 140 break; |
| 141 case FECOLORMATRIX_TYPE_LUMINANCETOALPHA: | 141 case FECOLORMATRIX_TYPE_LUMINANCETOALPHA: |
| 142 luminanceToAlphaMatrix(matrix); | 142 luminanceToAlphaMatrix(matrix); |
| 143 break; | 143 break; |
| 144 } | 144 } |
| 145 return SkColorFilter::MakeMatrixFilterRowMajor255(matrix); | 145 return SkColorFilter::MakeMatrixFilterRowMajor255(matrix); |
| 146 } | 146 } |
| 147 | 147 |
| 148 bool FEColorMatrix::affectsTransparentPixels() const { | 148 bool FEColorMatrix::affectsTransparentPixels() const { |
| 149 // Because the input pixels are premultiplied, the only way clear pixels can b
e | 149 // Because the input pixels are premultiplied, the only way clear pixels can |
| 150 // painted is if the additive component for the alpha is not 0. | 150 // be painted is if the additive component for the alpha is not 0. |
| 151 return m_type == FECOLORMATRIX_TYPE_MATRIX && | 151 return m_type == FECOLORMATRIX_TYPE_MATRIX && |
| 152 m_values.size() >= kColorMatrixSize && m_values[19] > 0; | 152 m_values.size() >= kColorMatrixSize && m_values[19] > 0; |
| 153 } | 153 } |
| 154 | 154 |
| 155 sk_sp<SkImageFilter> FEColorMatrix::createImageFilter() { | 155 sk_sp<SkImageFilter> FEColorMatrix::createImageFilter() { |
| 156 sk_sp<SkImageFilter> input( | 156 sk_sp<SkImageFilter> input( |
| 157 SkiaImageFilterBuilder::build(inputEffect(0), operatingColorSpace())); | 157 SkiaImageFilterBuilder::build(inputEffect(0), operatingColorSpace())); |
| 158 sk_sp<SkColorFilter> filter = createColorFilter(m_type, m_values); | 158 sk_sp<SkColorFilter> filter = createColorFilter(m_type, m_values); |
| 159 SkImageFilter::CropRect rect = getCropRect(); | 159 SkImageFilter::CropRect rect = getCropRect(); |
| 160 return SkColorFilterImageFilter::Make(std::move(filter), std::move(input), | 160 return SkColorFilterImageFilter::Make(std::move(filter), std::move(input), |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 ts << " "; | 216 ts << " "; |
| 217 } | 217 } |
| 218 ts << "\""; | 218 ts << "\""; |
| 219 } | 219 } |
| 220 ts << "]\n"; | 220 ts << "]\n"; |
| 221 inputEffect(0)->externalRepresentation(ts, indent + 1); | 221 inputEffect(0)->externalRepresentation(ts, indent + 1); |
| 222 return ts; | 222 return ts; |
| 223 } | 223 } |
| 224 | 224 |
| 225 } // namespace blink | 225 } // namespace blink |
| OLD | NEW |