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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/filters/FEColorMatrix.cpp

Issue 2389703004: Rewrap comments to 80 columns in Source/platform/graphics/filters/. (Closed)
Patch Set: Created 4 years, 2 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
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698