| 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) 2009 Apple Inc. All rights reserved. | 3 * Copyright (C) 2009 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 | 53 |
| 54 LayoutReplaced* embeddedReplacedContent() const; | 54 LayoutReplaced* embeddedReplacedContent() const; |
| 55 | 55 |
| 56 bool isSVGImage() const override { return true; } | 56 bool isSVGImage() const override { return true; } |
| 57 bool isTextureBacked() override { return false; } | 57 bool isTextureBacked() override { return false; } |
| 58 IntSize size() const override { return m_intrinsicSize; } | 58 IntSize size() const override { return m_intrinsicSize; } |
| 59 | 59 |
| 60 bool currentFrameHasSingleSecurityOrigin() const override; | 60 bool currentFrameHasSingleSecurityOrigin() const override; |
| 61 | 61 |
| 62 void startAnimation(CatchUpAnimation = CatchUp) override; | 62 void startAnimation(CatchUpAnimation = CatchUp) override; |
| 63 void stopAnimation() override; | |
| 64 void resetAnimation() override; | 63 void resetAnimation() override; |
| 65 | 64 |
| 66 // Advances an animated image. This will trigger an animation update for CSS | 65 // Advances an animated image. This will trigger an animation update for CSS |
| 67 // and advance the SMIL timeline by one frame. | 66 // and advance the SMIL timeline by one frame. |
| 68 void advanceAnimationForTesting() override; | 67 void advanceAnimationForTesting() override; |
| 69 | 68 |
| 70 PassRefPtr<SkImage> imageForCurrentFrame() override; | 69 PassRefPtr<SkImage> imageForCurrentFrame() override; |
| 71 | 70 |
| 72 // Returns the SVG image document's frame. | 71 // Returns the SVG image document's frame. |
| 73 FrameView* frameView() const; | 72 FrameView* frameView() const; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 97 | 96 |
| 98 String filenameExtension() const override; | 97 String filenameExtension() const override; |
| 99 | 98 |
| 100 IntSize containerSize() const; | 99 IntSize containerSize() const; |
| 101 bool usesContainerSize() const override { return true; } | 100 bool usesContainerSize() const override { return true; } |
| 102 | 101 |
| 103 bool dataChanged(bool allDataReceived) override; | 102 bool dataChanged(bool allDataReceived) override; |
| 104 | 103 |
| 105 // FIXME: SVGImages are underreporting decoded sizes and will be unable | 104 // FIXME: SVGImages are underreporting decoded sizes and will be unable |
| 106 // to prune because these functions are not implemented yet. | 105 // to prune because these functions are not implemented yet. |
| 107 void destroyDecodedData(bool) override { } | 106 void destroyDecodedData() override { } |
| 108 | 107 |
| 109 // FIXME: Implement this to be less conservative. | 108 // FIXME: Implement this to be less conservative. |
| 110 bool currentFrameKnownToBeOpaque(MetadataMode = UseCurrentMetadata) override
{ return false; } | 109 bool currentFrameKnownToBeOpaque(MetadataMode = UseCurrentMetadata) override
{ return false; } |
| 111 | 110 |
| 112 SVGImage(ImageObserver*); | 111 SVGImage(ImageObserver*); |
| 113 void draw(SkCanvas*, const SkPaint&, const FloatRect& fromRect, const FloatR
ect& toRect, RespectImageOrientationEnum, ImageClampingMode) override; | 112 void draw(SkCanvas*, const SkPaint&, const FloatRect& fromRect, const FloatR
ect& toRect, RespectImageOrientationEnum, ImageClampingMode) override; |
| 114 void drawForContainer(SkCanvas*, const SkPaint&, const FloatSize, float, con
st FloatRect&, const FloatRect&, const KURL&); | 113 void drawForContainer(SkCanvas*, const SkPaint&, const FloatSize, float, con
st FloatRect&, const FloatRect&, const KURL&); |
| 115 void drawPatternForContainer(GraphicsContext&, const FloatSize, float, const
FloatRect&, const FloatSize&, const FloatPoint&, | 114 void drawPatternForContainer(GraphicsContext&, const FloatSize, float, const
FloatRect&, const FloatSize&, const FloatPoint&, |
| 116 SkXfermode::Mode, const FloatRect&, const FloatSize& repeatSpacing, cons
t KURL&); | 115 SkXfermode::Mode, const FloatRect&, const FloatSize& repeatSpacing, cons
t KURL&); |
| 117 PassRefPtr<SkImage> imageForCurrentFrameForContainer(const KURL&, const Floa
tSize& containerSize); | 116 PassRefPtr<SkImage> imageForCurrentFrameForContainer(const KURL&, const Floa
tSize& containerSize); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 146 { | 145 { |
| 147 m_image->setImageObserverDisabled(false); | 146 m_image->setImageObserverDisabled(false); |
| 148 } | 147 } |
| 149 private: | 148 private: |
| 150 Image* m_image; | 149 Image* m_image; |
| 151 }; | 150 }; |
| 152 | 151 |
| 153 } // namespace blink | 152 } // namespace blink |
| 154 | 153 |
| 155 #endif // SVGImage_h | 154 #endif // SVGImage_h |
| OLD | NEW |