OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. |
3 * Copyright (C) 2007 Alp Toker <alp.toker@collabora.co.uk> | 3 * Copyright (C) 2007 Alp Toker <alp.toker@collabora.co.uk> |
4 * Copyright (C) 2008, Google Inc. All rights reserved. | 4 * Copyright (C) 2008, Google Inc. All rights reserved. |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 28 matching lines...) Expand all Loading... |
39 | 39 |
40 ImageSource::~ImageSource() | 40 ImageSource::~ImageSource() |
41 { | 41 { |
42 } | 42 } |
43 | 43 |
44 size_t ImageSource::clearCacheExceptFrame(size_t clearExceptFrame) | 44 size_t ImageSource::clearCacheExceptFrame(size_t clearExceptFrame) |
45 { | 45 { |
46 return m_decoder ? m_decoder->clearCacheExceptFrame(clearExceptFrame) : 0; | 46 return m_decoder ? m_decoder->clearCacheExceptFrame(clearExceptFrame) : 0; |
47 } | 47 } |
48 | 48 |
| 49 bool ImageSource::clear() |
| 50 { |
| 51 if (!m_decoder) |
| 52 return false; |
| 53 return m_decoder->clear(); |
| 54 } |
| 55 |
49 PassRefPtr<SharedBuffer> ImageSource::data() | 56 PassRefPtr<SharedBuffer> ImageSource::data() |
50 { | 57 { |
51 return m_decoder ? m_decoder->data() : nullptr; | 58 return m_decoder ? m_decoder->data() : nullptr; |
52 } | 59 } |
53 | 60 |
54 bool ImageSource::setData(PassRefPtr<SharedBuffer> passData, bool allDataReceive
d) | 61 bool ImageSource::setData(PassRefPtr<SharedBuffer> passData, bool allDataReceive
d) |
55 { | 62 { |
56 RefPtr<SharedBuffer> data = passData; | 63 RefPtr<SharedBuffer> data = passData; |
57 | 64 |
58 if (m_decoder) { | 65 if (m_decoder) { |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 { | 159 { |
153 return m_decoder && m_decoder->frameIsCompleteAtIndex(index); | 160 return m_decoder && m_decoder->frameIsCompleteAtIndex(index); |
154 } | 161 } |
155 | 162 |
156 size_t ImageSource::frameBytesAtIndex(size_t index) const | 163 size_t ImageSource::frameBytesAtIndex(size_t index) const |
157 { | 164 { |
158 return m_decoder ? m_decoder->frameBytesAtIndex(index) : 0; | 165 return m_decoder ? m_decoder->frameBytesAtIndex(index) : 0; |
159 } | 166 } |
160 | 167 |
161 } // namespace blink | 168 } // namespace blink |
OLD | NEW |