| 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) 2010 Dirk Schulze <krit@webkit.org> | 5 * Copyright (C) 2010 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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 // Build up a transformation that maps from the viewport space to the fi
lter primitive subregion. | 170 // Build up a transformation that maps from the viewport space to the fi
lter primitive subregion. |
| 171 if (lengthContext.determineViewport(viewportSize)) | 171 if (lengthContext.determineViewport(viewportSize)) |
| 172 transform = makeMapBetweenRects(FloatRect(FloatPoint(), viewportSize
), dstRect); | 172 transform = makeMapBetweenRects(FloatRect(FloatPoint(), viewportSize
), dstRect); |
| 173 } else { | 173 } else { |
| 174 transform.translate(dstRect.x(), dstRect.y()); | 174 transform.translate(dstRect.x(), dstRect.y()); |
| 175 } | 175 } |
| 176 | 176 |
| 177 SkPictureBuilder filterPicture(dstRect); | 177 SkPictureBuilder filterPicture(dstRect); |
| 178 { | 178 { |
| 179 TransformRecorder transformRecorder(filterPicture.context(), layoutObjec
t, transform); | 179 TransformRecorder transformRecorder(filterPicture.context(), layoutObjec
t, transform); |
| 180 SVGPaintContext::paintSubtree(&filterPicture.context(), &layoutObject); | 180 SVGPaintContext::paintSubtree(filterPicture.context(), &layoutObject); |
| 181 } | 181 } |
| 182 RefPtr<const SkPicture> recording = filterPicture.endRecording(); | 182 RefPtr<const SkPicture> recording = filterPicture.endRecording(); |
| 183 | 183 |
| 184 RefPtr<SkImageFilter> result = adoptRef(SkPictureImageFilter::Create(recordi
ng.get(), dstRect)); | 184 RefPtr<SkImageFilter> result = adoptRef(SkPictureImageFilter::Create(recordi
ng.get(), dstRect)); |
| 185 return result.release(); | 185 return result.release(); |
| 186 } | 186 } |
| 187 | 187 |
| 188 PassRefPtr<SkImageFilter> FEImage::createImageFilter(SkiaImageFilterBuilder& bui
lder) | 188 PassRefPtr<SkImageFilter> FEImage::createImageFilter(SkiaImageFilterBuilder& bui
lder) |
| 189 { | 189 { |
| 190 if (auto* layoutObject = referencedLayoutObject()) | 190 if (auto* layoutObject = referencedLayoutObject()) |
| (...skipping 10 matching lines...) Expand all Loading... |
| 201 | 201 |
| 202 FloatRect srcRect = FloatRect(FloatPoint(), FloatSize(m_image->size())); | 202 FloatRect srcRect = FloatRect(FloatPoint(), FloatSize(m_image->size())); |
| 203 FloatRect dstRect = filterPrimitiveSubregion(); | 203 FloatRect dstRect = filterPrimitiveSubregion(); |
| 204 | 204 |
| 205 m_preserveAspectRatio->transformRect(dstRect, srcRect); | 205 m_preserveAspectRatio->transformRect(dstRect, srcRect); |
| 206 | 206 |
| 207 return adoptRef(SkImageSource::Create(image.get(), srcRect, dstRect, kHigh_S
kFilterQuality)); | 207 return adoptRef(SkImageSource::Create(image.get(), srcRect, dstRect, kHigh_S
kFilterQuality)); |
| 208 } | 208 } |
| 209 | 209 |
| 210 } // namespace blink | 210 } // namespace blink |
| OLD | NEW |