| 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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 bool SVGImage::ApplyShaderInternal(PaintFlags& flags, | 358 bool SVGImage::ApplyShaderInternal(PaintFlags& flags, |
| 359 const SkMatrix& local_matrix, | 359 const SkMatrix& local_matrix, |
| 360 const KURL& url) { | 360 const KURL& url) { |
| 361 const FloatSize size(ContainerSize()); | 361 const FloatSize size(ContainerSize()); |
| 362 if (size.IsEmpty()) | 362 if (size.IsEmpty()) |
| 363 return false; | 363 return false; |
| 364 | 364 |
| 365 FloatRect float_bounds(FloatPoint(), size); | 365 FloatRect float_bounds(FloatPoint(), size); |
| 366 const SkRect bounds(float_bounds); | 366 const SkRect bounds(float_bounds); |
| 367 | 367 |
| 368 flags.setShader(SkShader::MakePictureShader( | 368 flags.setShader(MakePaintShaderRecord( |
| 369 PaintRecordForCurrentFrame(float_bounds, url), SkShader::kRepeat_TileMode, | 369 PaintRecordForCurrentFrame(float_bounds, url), SkShader::kRepeat_TileMode, |
| 370 SkShader::kRepeat_TileMode, &local_matrix, &bounds)); | 370 SkShader::kRepeat_TileMode, &local_matrix, &bounds)); |
| 371 | 371 |
| 372 // Animation is normally refreshed in draw() impls, which we don't reach when | 372 // Animation is normally refreshed in draw() impls, which we don't reach when |
| 373 // painting via shaders. | 373 // painting via shaders. |
| 374 StartAnimation(); | 374 StartAnimation(); |
| 375 | 375 |
| 376 return true; | 376 return true; |
| 377 } | 377 } |
| 378 | 378 |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 694 } | 694 } |
| 695 | 695 |
| 696 return page_ ? kSizeAvailable : kSizeUnavailable; | 696 return page_ ? kSizeAvailable : kSizeUnavailable; |
| 697 } | 697 } |
| 698 | 698 |
| 699 String SVGImage::FilenameExtension() const { | 699 String SVGImage::FilenameExtension() const { |
| 700 return "svg"; | 700 return "svg"; |
| 701 } | 701 } |
| 702 | 702 |
| 703 } // namespace blink | 703 } // namespace blink |
| OLD | NEW |