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

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

Issue 225163002: Remove software path from filters: purge unused applySkia. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 8 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 | « 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
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « Source/platform/graphics/filters/FilterEffect.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698