| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Eric Seidel <eric@webkit.org> | 2 * Copyright (C) 2006 Eric Seidel <eric@webkit.org> |
| 3 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. | 3 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. |
| 4 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 4 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 // Compensate for the container size rounding by adjusting the source rect. | 258 // Compensate for the container size rounding by adjusting the source rect. |
| 259 FloatSize adjustedSrcSize = scaledSrc.size(); | 259 FloatSize adjustedSrcSize = scaledSrc.size(); |
| 260 adjustedSrcSize.scale(roundedContainerSize.width() / containerSize.width(), | 260 adjustedSrcSize.scale(roundedContainerSize.width() / containerSize.width(), |
| 261 roundedContainerSize.height() / containerSize.height()); | 261 roundedContainerSize.height() / containerSize.height()); |
| 262 scaledSrc.setSize(adjustedSrcSize); | 262 scaledSrc.setSize(adjustedSrcSize); |
| 263 | 263 |
| 264 drawInternal(canvas, flags, dstRect, scaledSrc, DoNotRespectImageOrientation, | 264 drawInternal(canvas, flags, dstRect, scaledSrc, DoNotRespectImageOrientation, |
| 265 ClampImageToSourceRect, url); | 265 ClampImageToSourceRect, url); |
| 266 } | 266 } |
| 267 | 267 |
| 268 sk_sp<SkImage> SVGImage::imageForCurrentFrame( | 268 sk_sp<SkImage> SVGImage::imageForCurrentFrame() { |
| 269 const ColorBehavior& colorBehavior) { | |
| 270 // TODO(ccameron): This function should not ignore |colorBehavior|. | |
| 271 // https://crbug.com/667431 | |
| 272 return imageForCurrentFrameForContainer(KURL(), size()); | 269 return imageForCurrentFrameForContainer(KURL(), size()); |
| 273 } | 270 } |
| 274 | 271 |
| 275 void SVGImage::drawPatternForContainer(GraphicsContext& context, | 272 void SVGImage::drawPatternForContainer(GraphicsContext& context, |
| 276 const FloatSize containerSize, | 273 const FloatSize containerSize, |
| 277 float zoom, | 274 float zoom, |
| 278 const FloatRect& srcRect, | 275 const FloatRect& srcRect, |
| 279 const FloatSize& tileScale, | 276 const FloatSize& tileScale, |
| 280 const FloatPoint& phase, | 277 const FloatPoint& phase, |
| 281 SkBlendMode compositeOp, | 278 SkBlendMode compositeOp, |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 661 } | 658 } |
| 662 | 659 |
| 663 return m_page ? SizeAvailable : SizeUnavailable; | 660 return m_page ? SizeAvailable : SizeUnavailable; |
| 664 } | 661 } |
| 665 | 662 |
| 666 String SVGImage::filenameExtension() const { | 663 String SVGImage::filenameExtension() const { |
| 667 return "svg"; | 664 return "svg"; |
| 668 } | 665 } |
| 669 | 666 |
| 670 } // namespace blink | 667 } // namespace blink |
| OLD | NEW |