| 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 * Copyright (C) 2007-2009 Torch Mobile, Inc | 5 * Copyright (C) 2007-2009 Torch Mobile, Inc |
| 6 * | 6 * |
| 7 * Redistribution and use in source and binary forms, with or without | 7 * Redistribution and use in source and binary forms, with or without |
| 8 * modification, are permitted provided that the following conditions | 8 * modification, are permitted provided that the following conditions |
| 9 * are met: | 9 * are met: |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 : m_alphaOption(alphaOption) | 47 : m_alphaOption(alphaOption) |
| 48 , m_gammaAndColorProfileOption(gammaAndColorProfileOption) | 48 , m_gammaAndColorProfileOption(gammaAndColorProfileOption) |
| 49 { | 49 { |
| 50 } | 50 } |
| 51 | 51 |
| 52 ImageSource::~ImageSource() | 52 ImageSource::~ImageSource() |
| 53 { | 53 { |
| 54 clear(true); | 54 clear(true); |
| 55 } | 55 } |
| 56 | 56 |
| 57 void ImageSource::clear(bool destroyAll, size_t clearBeforeFrame, SharedBuffer*
data, bool allDataReceived) | 57 void ImageSource::clear(bool destroyAll, size_t clearExceptFrame, SharedBuffer*
data, bool allDataReceived) |
| 58 { | 58 { |
| 59 if (!destroyAll) { | 59 if (!destroyAll) { |
| 60 if (m_decoder) | 60 if (m_decoder) |
| 61 m_decoder->clearFrameBufferCache(clearBeforeFrame); | 61 m_decoder->clearFrameBufferCache(clearExceptFrame); |
| 62 return; | 62 return; |
| 63 } | 63 } |
| 64 | 64 |
| 65 m_decoder.clear(); | 65 m_decoder.clear(); |
| 66 if (data) | 66 if (data) |
| 67 setData(data, allDataReceived); | 67 setData(data, allDataReceived); |
| 68 } | 68 } |
| 69 | 69 |
| 70 bool ImageSource::initialized() const | 70 bool ImageSource::initialized() const |
| 71 { | 71 { |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 return m_decoder->frameBytesAtIndex(index); | 193 return m_decoder->frameBytesAtIndex(index); |
| 194 } | 194 } |
| 195 | 195 |
| 196 void ImageSource::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const | 196 void ImageSource::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const |
| 197 { | 197 { |
| 198 MemoryClassInfo info(memoryObjectInfo, this, PlatformMemoryTypes::Image); | 198 MemoryClassInfo info(memoryObjectInfo, this, PlatformMemoryTypes::Image); |
| 199 info.addMember(m_decoder, "decoder"); | 199 info.addMember(m_decoder, "decoder"); |
| 200 } | 200 } |
| 201 | 201 |
| 202 } | 202 } |
| OLD | NEW |