OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 // the compositor and this call is ignored. | 178 // the compositor and this call is ignored. |
179 if (m_actualDecoder) | 179 if (m_actualDecoder) |
180 m_actualDecoder->clearFrameBufferCache(clearBeforeFrame); | 180 m_actualDecoder->clearFrameBufferCache(clearBeforeFrame); |
181 } | 181 } |
182 | 182 |
183 bool DeferredImageDecoder::frameHasAlphaAtIndex(size_t index) const | 183 bool DeferredImageDecoder::frameHasAlphaAtIndex(size_t index) const |
184 { | 184 { |
185 return m_actualDecoder ? m_actualDecoder->frameHasAlphaAtIndex(index) : m_fr
ameGenerator->hasAlpha(); | 185 return m_actualDecoder ? m_actualDecoder->frameHasAlphaAtIndex(index) : m_fr
ameGenerator->hasAlpha(); |
186 } | 186 } |
187 | 187 |
| 188 bool DeferredImageDecoder::frameIsCompleteAtIndex(size_t index) const |
| 189 { |
| 190 // TODO: Implement this for deferred decoding. |
| 191 return m_actualDecoder && m_actualDecoder->frameIsCompleteAtIndex(index); |
| 192 } |
| 193 |
| 194 float DeferredImageDecoder::frameDurationAtIndex(size_t index) const |
| 195 { |
| 196 // TODO: Implement this for deferred decoding. |
| 197 return m_actualDecoder ? m_actualDecoder->frameDurationAtIndex(index) : 0; |
| 198 } |
| 199 |
188 unsigned DeferredImageDecoder::frameBytesAtIndex(size_t index) const | 200 unsigned DeferredImageDecoder::frameBytesAtIndex(size_t index) const |
189 { | 201 { |
190 // If frame decoding is deferred then it is not managed by MemoryCache | 202 // If frame decoding is deferred then it is not managed by MemoryCache |
191 // so return 0 here. | 203 // so return 0 here. |
192 return m_actualDecoder ? m_actualDecoder->frameBytesAtIndex(index) : 0; | 204 return m_actualDecoder ? m_actualDecoder->frameBytesAtIndex(index) : 0; |
193 } | 205 } |
194 | 206 |
195 ImageOrientation DeferredImageDecoder::orientation() const | 207 ImageOrientation DeferredImageDecoder::orientation() const |
196 { | 208 { |
197 return m_actualDecoder ? m_actualDecoder->orientation() : m_orientation; | 209 return m_actualDecoder ? m_actualDecoder->orientation() : m_orientation; |
(...skipping 29 matching lines...) Expand all Loading... |
227 | 239 |
228 return bitmap; | 240 return bitmap; |
229 } | 241 } |
230 | 242 |
231 bool DeferredImageDecoder::hotSpot(IntPoint& hotSpot) const | 243 bool DeferredImageDecoder::hotSpot(IntPoint& hotSpot) const |
232 { | 244 { |
233 return m_actualDecoder ? m_actualDecoder->hotSpot(hotSpot) : false; | 245 return m_actualDecoder ? m_actualDecoder->hotSpot(hotSpot) : false; |
234 } | 246 } |
235 | 247 |
236 } // namespace WebCore | 248 } // namespace WebCore |
OLD | NEW |