| 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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 scaledSrc.scale(1 / zoom); | 252 scaledSrc.scale(1 / zoom); |
| 253 | 253 |
| 254 // Compensate for the container size rounding by adjusting the source rect. | 254 // Compensate for the container size rounding by adjusting the source rect. |
| 255 FloatSize adjustedSrcSize = scaledSrc.size(); | 255 FloatSize adjustedSrcSize = scaledSrc.size(); |
| 256 adjustedSrcSize.scale(roundedContainerSize.width() / containerSize.width(),
roundedContainerSize.height() / containerSize.height()); | 256 adjustedSrcSize.scale(roundedContainerSize.width() / containerSize.width(),
roundedContainerSize.height() / containerSize.height()); |
| 257 scaledSrc.setSize(adjustedSrcSize); | 257 scaledSrc.setSize(adjustedSrcSize); |
| 258 | 258 |
| 259 drawInternal(canvas, paint, dstRect, scaledSrc, DoNotRespectImageOrientation
, ClampImageToSourceRect, url); | 259 drawInternal(canvas, paint, dstRect, scaledSrc, DoNotRespectImageOrientation
, ClampImageToSourceRect, url); |
| 260 } | 260 } |
| 261 | 261 |
| 262 PassRefPtr<SkImage> SVGImage::imageForCurrentFrame() | 262 PassRefPtr<SkImage> SVGImage::imageForCurrentFrame(WebGraphicsContext3DProvider*
contextProvider) |
| 263 { | 263 { |
| 264 return imageForCurrentFrameForContainer(KURL(), FloatSize(size())); | 264 return imageForCurrentFrameForContainer(KURL(), FloatSize(size())); |
| 265 } | 265 } |
| 266 | 266 |
| 267 void SVGImage::drawPatternForContainer(GraphicsContext& context, const FloatSize
containerSize, | 267 void SVGImage::drawPatternForContainer(GraphicsContext& context, const FloatSize
containerSize, |
| 268 float zoom, const FloatRect& srcRect, const FloatSize& tileScale, const Floa
tPoint& phase, | 268 float zoom, const FloatRect& srcRect, const FloatSize& tileScale, const Floa
tPoint& phase, |
| 269 SkXfermode::Mode compositeOp, const FloatRect& dstRect, | 269 SkXfermode::Mode compositeOp, const FloatRect& dstRect, |
| 270 const FloatSize& repeatSpacing, const KURL& url) | 270 const FloatSize& repeatSpacing, const KURL& url) |
| 271 { | 271 { |
| 272 // Tile adjusted for scaling/stretch. | 272 // Tile adjusted for scaling/stretch. |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 561 | 561 |
| 562 return m_page; | 562 return m_page; |
| 563 } | 563 } |
| 564 | 564 |
| 565 String SVGImage::filenameExtension() const | 565 String SVGImage::filenameExtension() const |
| 566 { | 566 { |
| 567 return "svg"; | 567 return "svg"; |
| 568 } | 568 } |
| 569 | 569 |
| 570 } // namespace blink | 570 } // namespace blink |
| OLD | NEW |