| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006 Apple Computer, 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 int width() const { return size().width(); } | 85 int width() const { return size().width(); } |
| 86 int height() const { return size().height(); } | 86 int height() const { return size().height(); } |
| 87 virtual bool getHotSpot(IntPoint&) const { return false; } | 87 virtual bool getHotSpot(IntPoint&) const { return false; } |
| 88 | 88 |
| 89 bool setData(PassRefPtr<SharedBuffer> data, bool allDataReceived); | 89 bool setData(PassRefPtr<SharedBuffer> data, bool allDataReceived); |
| 90 virtual bool dataChanged(bool /*allDataReceived*/) { return false; } | 90 virtual bool dataChanged(bool /*allDataReceived*/) { return false; } |
| 91 | 91 |
| 92 virtual String filenameExtension() const { return String(); } // null string
if unknown | 92 virtual String filenameExtension() const { return String(); } // null string
if unknown |
| 93 | 93 |
| 94 virtual void destroyDecodedData(bool destroyAll) = 0; | 94 virtual void destroyDecodedData(bool destroyAll) = 0; |
| 95 virtual unsigned decodedSize() const = 0; | |
| 96 | 95 |
| 97 SharedBuffer* data() { return m_encodedImageData.get(); } | 96 SharedBuffer* data() { return m_encodedImageData.get(); } |
| 98 | 97 |
| 99 // Animation begins whenever someone draws the image, so startAnimation() is
not normally called. | 98 // Animation begins whenever someone draws the image, so startAnimation() is
not normally called. |
| 100 // It will automatically pause once all observers no longer want to render t
he image anywhere. | 99 // It will automatically pause once all observers no longer want to render t
he image anywhere. |
| 101 virtual void startAnimation(bool /*catchUpIfNecessary*/ = true) { } | 100 virtual void startAnimation(bool /*catchUpIfNecessary*/ = true) { } |
| 102 virtual void stopAnimation() {} | 101 virtual void stopAnimation() {} |
| 103 virtual void resetAnimation() {} | 102 virtual void resetAnimation() {} |
| 104 | 103 |
| 105 // Typically the ImageResource that owns us. | 104 // Typically the ImageResource that owns us. |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 | 143 |
| 145 private: | 144 private: |
| 146 RefPtr<SharedBuffer> m_encodedImageData; | 145 RefPtr<SharedBuffer> m_encodedImageData; |
| 147 ImageObserver* m_imageObserver; | 146 ImageObserver* m_imageObserver; |
| 148 IntSize m_space; | 147 IntSize m_space; |
| 149 }; | 148 }; |
| 150 | 149 |
| 151 } | 150 } |
| 152 | 151 |
| 153 #endif | 152 #endif |
| OLD | NEW |