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 29 matching lines...) Expand all Loading... |
135 virtual Color solidColor() const { return Color(); } | 134 virtual Color solidColor() const { return Color(); } |
136 | 135 |
137 private: | 136 private: |
138 RefPtr<SharedBuffer> m_encodedImageData; | 137 RefPtr<SharedBuffer> m_encodedImageData; |
139 ImageObserver* m_imageObserver; | 138 ImageObserver* m_imageObserver; |
140 }; | 139 }; |
141 | 140 |
142 } | 141 } |
143 | 142 |
144 #endif | 143 #endif |
OLD | NEW |