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

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

Issue 1376473002: Move feConvolveMatrix error handling to FEConvolveMatrix (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/filters/FilterEffect.h ('k') | no next file » | 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 (C) 2008 Alex Mathews <possessedpenguinbob@gmail.com> 2 * Copyright (C) 2008 Alex Mathews <possessedpenguinbob@gmail.com>
3 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> 3 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 4 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
5 * Copyright (C) 2012 University of Szeged 5 * Copyright (C) 2012 University of Szeged
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
11 * version 2 of the License, or (at your option) any later version. 11 * version 2 of the License, or (at your option) any later version.
12 * 12 *
13 * This library is distributed in the hope that it will be useful, 13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details. 16 * Library General Public License for more details.
17 * 17 *
18 * You should have received a copy of the GNU Library General Public License 18 * You should have received a copy of the GNU Library General Public License
19 * along with this library; see the file COPYING.LIB. If not, write to 19 * along with this library; see the file COPYING.LIB. If not, write to
20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301, USA. 21 * Boston, MA 02110-1301, USA.
22 */ 22 */
23 23
24 #include "config.h" 24 #include "config.h"
25
26 #include "platform/graphics/filters/FilterEffect.h" 25 #include "platform/graphics/filters/FilterEffect.h"
27 26
28 #include "platform/graphics/filters/Filter.h" 27 #include "platform/graphics/filters/Filter.h"
28 #include "third_party/skia/include/effects/SkPictureImageFilter.h"
29 29
30 namespace blink { 30 namespace blink {
31 31
32 FilterEffect::FilterEffect(Filter* filter) 32 FilterEffect::FilterEffect(Filter* filter)
33 : m_filter(filter) 33 : m_filter(filter)
34 , m_hasX(false) 34 , m_hasX(false)
35 , m_hasY(false) 35 , m_hasY(false)
36 , m_hasWidth(false) 36 , m_hasWidth(false)
37 , m_hasHeight(false) 37 , m_hasHeight(false)
38 , m_clipsToBounds(true) 38 , m_clipsToBounds(true)
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 PassRefPtr<SkImageFilter> FilterEffect::createImageFilter(SkiaImageFilterBuilder * builder) 183 PassRefPtr<SkImageFilter> FilterEffect::createImageFilter(SkiaImageFilterBuilder * builder)
184 { 184 {
185 return nullptr; 185 return nullptr;
186 } 186 }
187 187
188 PassRefPtr<SkImageFilter> FilterEffect::createImageFilterWithoutValidation(SkiaI mageFilterBuilder* builder) 188 PassRefPtr<SkImageFilter> FilterEffect::createImageFilterWithoutValidation(SkiaI mageFilterBuilder* builder)
189 { 189 {
190 return createImageFilter(builder); 190 return createImageFilter(builder);
191 } 191 }
192 192
193 PassRefPtr<SkImageFilter> FilterEffect::createTransparentBlack() const
194 {
195 return adoptRef(SkPictureImageFilter::Create(nullptr, filterPrimitiveSubregi on()));
196 }
197
193 bool FilterEffect::hasConnectedInput() const 198 bool FilterEffect::hasConnectedInput() const
194 { 199 {
195 for (unsigned i = 0; i < m_inputEffects.size(); i++) { 200 for (unsigned i = 0; i < m_inputEffects.size(); i++) {
196 if (m_inputEffects[i]) { 201 if (m_inputEffects[i]) {
197 return true; 202 return true;
198 } 203 }
199 } 204 }
200 return false; 205 return false;
201 } 206 }
202 207
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 return m_imageFilters[index].get(); 251 return m_imageFilters[index].get();
247 } 252 }
248 253
249 void FilterEffect::setImageFilter(ColorSpace colorSpace, bool requiresPMColorVal idation, PassRefPtr<SkImageFilter> imageFilter) 254 void FilterEffect::setImageFilter(ColorSpace colorSpace, bool requiresPMColorVal idation, PassRefPtr<SkImageFilter> imageFilter)
250 { 255 {
251 int index = getImageFilterIndex(colorSpace, requiresPMColorValidation); 256 int index = getImageFilterIndex(colorSpace, requiresPMColorValidation);
252 m_imageFilters[index] = imageFilter; 257 m_imageFilters[index] = imageFilter;
253 } 258 }
254 259
255 } // namespace blink 260 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/filters/FilterEffect.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698