| 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 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 bool SVGImage::applyShaderInternal(PaintFlags& flags, | 357 bool SVGImage::applyShaderInternal(PaintFlags& flags, |
| 358 const SkMatrix& localMatrix, | 358 const SkMatrix& localMatrix, |
| 359 const KURL& url) { | 359 const KURL& url) { |
| 360 const FloatSize size(containerSize()); | 360 const FloatSize size(containerSize()); |
| 361 if (size.isEmpty()) | 361 if (size.isEmpty()) |
| 362 return false; | 362 return false; |
| 363 | 363 |
| 364 FloatRect floatBounds(FloatPoint(), size); | 364 FloatRect floatBounds(FloatPoint(), size); |
| 365 const SkRect bounds(floatBounds); | 365 const SkRect bounds(floatBounds); |
| 366 | 366 |
| 367 flags.setShader(SkShader::MakePictureShader( | 367 flags.setShader(MakePaintShaderRecord( |
| 368 paintRecordForCurrentFrame(floatBounds, url), SkShader::kRepeat_TileMode, | 368 paintRecordForCurrentFrame(floatBounds, url), SkShader::kRepeat_TileMode, |
| 369 SkShader::kRepeat_TileMode, &localMatrix, &bounds)); | 369 SkShader::kRepeat_TileMode, &localMatrix, &bounds)); |
| 370 | 370 |
| 371 // Animation is normally refreshed in draw() impls, which we don't reach when | 371 // Animation is normally refreshed in draw() impls, which we don't reach when |
| 372 // painting via shaders. | 372 // painting via shaders. |
| 373 startAnimation(); | 373 startAnimation(); |
| 374 | 374 |
| 375 return true; | 375 return true; |
| 376 } | 376 } |
| 377 | 377 |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 690 } | 690 } |
| 691 | 691 |
| 692 return m_page ? SizeAvailable : SizeUnavailable; | 692 return m_page ? SizeAvailable : SizeUnavailable; |
| 693 } | 693 } |
| 694 | 694 |
| 695 String SVGImage::filenameExtension() const { | 695 String SVGImage::filenameExtension() const { |
| 696 return "svg"; | 696 return "svg"; |
| 697 } | 697 } |
| 698 | 698 |
| 699 } // namespace blink | 699 } // namespace blink |
| OLD | NEW |