| 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 drawForContainer(canvas, SkPaint(), FloatSize(size()), 1, rect(), rect(), KU
RL()); | 226 drawForContainer(canvas, SkPaint(), FloatSize(size()), 1, rect(), rect(), KU
RL()); |
| 227 RefPtr<SkPicture> picture = adoptRef(recorder.endRecording()); | 227 RefPtr<SkPicture> picture = adoptRef(recorder.endRecording()); |
| 228 | 228 |
| 229 return adoptRef( | 229 return adoptRef( |
| 230 SkImage::NewFromPicture(picture.get(), SkISize::Make(width(), height()),
nullptr, nullptr)); | 230 SkImage::NewFromPicture(picture.get(), SkISize::Make(width(), height()),
nullptr, nullptr)); |
| 231 } | 231 } |
| 232 | 232 |
| 233 void SVGImage::drawPatternForContainer(GraphicsContext* context, const FloatSize
containerSize, | 233 void SVGImage::drawPatternForContainer(GraphicsContext* context, const FloatSize
containerSize, |
| 234 float zoom, const FloatRect& srcRect, const FloatSize& tileScale, const Floa
tPoint& phase, | 234 float zoom, const FloatRect& srcRect, const FloatSize& tileScale, const Floa
tPoint& phase, |
| 235 SkXfermode::Mode compositeOp, const FloatRect& dstRect, | 235 SkXfermode::Mode compositeOp, const FloatRect& dstRect, |
| 236 const IntSize& repeatSpacing, const KURL& url) | 236 const FloatSize& repeatSpacing, const KURL& url) |
| 237 { | 237 { |
| 238 // Tile adjusted for scaling/stretch. | 238 // Tile adjusted for scaling/stretch. |
| 239 FloatRect tile(srcRect); | 239 FloatRect tile(srcRect); |
| 240 tile.scale(tileScale.width(), tileScale.height()); | 240 tile.scale(tileScale.width(), tileScale.height()); |
| 241 | 241 |
| 242 // Expand the tile to account for repeat spacing. | 242 // Expand the tile to account for repeat spacing. |
| 243 FloatRect spacedTile(tile); | 243 FloatRect spacedTile(tile); |
| 244 spacedTile.expand(FloatSize(repeatSpacing)); | 244 spacedTile.expand(FloatSize(repeatSpacing)); |
| 245 | 245 |
| 246 SkPictureBuilder patternPicture(spacedTile, nullptr, context); | 246 SkPictureBuilder patternPicture(spacedTile, nullptr, context); |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 507 | 507 |
| 508 return m_page; | 508 return m_page; |
| 509 } | 509 } |
| 510 | 510 |
| 511 String SVGImage::filenameExtension() const | 511 String SVGImage::filenameExtension() const |
| 512 { | 512 { |
| 513 return "svg"; | 513 return "svg"; |
| 514 } | 514 } |
| 515 | 515 |
| 516 } | 516 } |
| OLD | NEW |