OLD | NEW |
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 |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 setResultColorSpace(m_operatingColorSpace); | 196 setResultColorSpace(m_operatingColorSpace); |
197 | 197 |
198 if (!isFilterSizeValid(m_absolutePaintRect)) | 198 if (!isFilterSizeValid(m_absolutePaintRect)) |
199 return; | 199 return; |
200 | 200 |
201 if (requiresValidPreMultipliedPixels()) { | 201 if (requiresValidPreMultipliedPixels()) { |
202 for (unsigned i = 0; i < size; ++i) | 202 for (unsigned i = 0; i < size; ++i) |
203 inputEffect(i)->correctFilterResultIfNeeded(); | 203 inputEffect(i)->correctFilterResultIfNeeded(); |
204 } | 204 } |
205 | 205 |
206 if (applySkia()) | |
207 return; | |
208 | |
209 applySoftware(); | 206 applySoftware(); |
210 } | 207 } |
211 | 208 |
212 void FilterEffect::forceValidPreMultipliedPixels() | 209 void FilterEffect::forceValidPreMultipliedPixels() |
213 { | 210 { |
214 // Must operate on pre-multiplied results; other formats cannot have invalid
pixels. | 211 // Must operate on pre-multiplied results; other formats cannot have invalid
pixels. |
215 if (!m_premultipliedImageResult) | 212 if (!m_premultipliedImageResult) |
216 return; | 213 return; |
217 | 214 |
218 Uint8ClampedArray* imageArray = m_premultipliedImageResult.get(); | 215 Uint8ClampedArray* imageArray = m_premultipliedImageResult.get(); |
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
564 } | 561 } |
565 if (hasHeight()) { | 562 if (hasHeight()) { |
566 rect.setHeight(boundaries.height()); | 563 rect.setHeight(boundaries.height()); |
567 flags |= SkImageFilter::CropRect::kHasBottom_CropEdge; | 564 flags |= SkImageFilter::CropRect::kHasBottom_CropEdge; |
568 } | 565 } |
569 rect = filter()->mapLocalRectToAbsoluteRect(rect); | 566 rect = filter()->mapLocalRectToAbsoluteRect(rect); |
570 return SkImageFilter::CropRect(rect, flags); | 567 return SkImageFilter::CropRect(rect, flags); |
571 } | 568 } |
572 | 569 |
573 } // namespace WebCore | 570 } // namespace WebCore |
OLD | NEW |