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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 size_t DeferredImageDecoder::frameCount() | 165 size_t DeferredImageDecoder::frameCount() |
166 { | 166 { |
167 return m_actualDecoder ? m_actualDecoder->frameCount() : 1; | 167 return m_actualDecoder ? m_actualDecoder->frameCount() : 1; |
168 } | 168 } |
169 | 169 |
170 int DeferredImageDecoder::repetitionCount() const | 170 int DeferredImageDecoder::repetitionCount() const |
171 { | 171 { |
172 return m_actualDecoder ? m_actualDecoder->repetitionCount() : cAnimationNone
; | 172 return m_actualDecoder ? m_actualDecoder->repetitionCount() : cAnimationNone
; |
173 } | 173 } |
174 | 174 |
175 void DeferredImageDecoder::clearFrameBufferCache(size_t clearBeforeFrame) | 175 void DeferredImageDecoder::clearFrameBufferCache(size_t clearExceptFrame) |
176 { | 176 { |
177 // If image decoding is deferred then frame buffer cache is managed by | 177 // If image decoding is deferred then frame buffer cache is managed by |
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(clearExceptFrame); |
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 | 188 bool DeferredImageDecoder::frameIsCompleteAtIndex(size_t index) const |
189 { | 189 { |
190 // TODO: Implement this for deferred decoding. | 190 // TODO: Implement this for deferred decoding. |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 | 239 |
240 return bitmap; | 240 return bitmap; |
241 } | 241 } |
242 | 242 |
243 bool DeferredImageDecoder::hotSpot(IntPoint& hotSpot) const | 243 bool DeferredImageDecoder::hotSpot(IntPoint& hotSpot) const |
244 { | 244 { |
245 return m_actualDecoder ? m_actualDecoder->hotSpot(hotSpot) : false; | 245 return m_actualDecoder ? m_actualDecoder->hotSpot(hotSpot) : false; |
246 } | 246 } |
247 | 247 |
248 } // namespace WebCore | 248 } // namespace WebCore |
OLD | NEW |