OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2008-2009 Torch Mobile, Inc. | 2 * Copyright (C) 2008-2009 Torch Mobile, Inc. |
3 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. | 3 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
120 | 120 |
121 bool ImageDecoder::frameHasAlphaAtIndex(size_t index) const | 121 bool ImageDecoder::frameHasAlphaAtIndex(size_t index) const |
122 { | 122 { |
123 if (m_frameBufferCache.size() <= index) | 123 if (m_frameBufferCache.size() <= index) |
124 return true; | 124 return true; |
125 if (m_frameBufferCache[index].status() == ImageFrame::FrameComplete) | 125 if (m_frameBufferCache[index].status() == ImageFrame::FrameComplete) |
126 return m_frameBufferCache[index].hasAlpha(); | 126 return m_frameBufferCache[index].hasAlpha(); |
127 return true; | 127 return true; |
128 } | 128 } |
129 | 129 |
130 bool ImageDecoder::frameIsCompleteAtIndex(size_t) const | |
131 { | |
132 return isAllDataReceived(); | |
Peter Kasting
2013/04/27 00:51:01
It seems like this should be:
return ((index
| |
133 } | |
134 | |
130 unsigned ImageDecoder::frameBytesAtIndex(size_t index) const | 135 unsigned ImageDecoder::frameBytesAtIndex(size_t index) const |
131 { | 136 { |
132 if (m_frameBufferCache.size() <= index) | 137 if (m_frameBufferCache.size() <= index) |
133 return 0; | 138 return 0; |
134 // FIXME: Use the dimension of the requested frame. | 139 // FIXME: Use the dimension of the requested frame. |
135 return m_size.area() * sizeof(ImageFrame::PixelData); | 140 return m_size.area() * sizeof(ImageFrame::PixelData); |
136 } | 141 } |
137 | 142 |
138 void ImageDecoder::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const | 143 void ImageDecoder::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const |
139 { | 144 { |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
219 { | 224 { |
220 return getScaledValue<LowerBound>(m_scaledRows, origY, searchStart); | 225 return getScaledValue<LowerBound>(m_scaledRows, origY, searchStart); |
221 } | 226 } |
222 | 227 |
223 int ImageDecoder::scaledY(int origY, int searchStart) | 228 int ImageDecoder::scaledY(int origY, int searchStart) |
224 { | 229 { |
225 return getScaledValue<Exact>(m_scaledRows, origY, searchStart); | 230 return getScaledValue<Exact>(m_scaledRows, origY, searchStart); |
226 } | 231 } |
227 | 232 |
228 } // namespace WebCore | 233 } // namespace WebCore |
OLD | NEW |