Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. |
| 3 * Copyright (C) 2007-2008 Torch Mobile, Inc. | 3 * Copyright (C) 2007-2008 Torch Mobile, Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 120 size_t bytesDecodedToDetermineProperties() const; | 120 size_t bytesDecodedToDetermineProperties() const; |
| 121 | 121 |
| 122 int repetitionCount(); | 122 int repetitionCount(); |
| 123 | 123 |
| 124 size_t frameCount() const; | 124 size_t frameCount() const; |
| 125 | 125 |
| 126 // Callers should not call this after calling clear() with a higher index; | 126 // Callers should not call this after calling clear() with a higher index; |
| 127 // see comments on clear() above. | 127 // see comments on clear() above. |
| 128 PassNativeImagePtr createFrameAtIndex(size_t); | 128 PassNativeImagePtr createFrameAtIndex(size_t); |
| 129 | 129 |
| 130 float frameDurationAtIndex(size_t); | 130 float frameDurationAtIndex(size_t) const; |
| 131 bool frameHasAlphaAtIndex(size_t); // Whether or not the frame actually used any alpha. | 131 bool frameHasAlphaAtIndex(size_t) const; // Whether or not the frame actuall y used any alpha. |
| 132 bool frameIsCompleteAtIndex(size_t); // Whether or not the frame is complete ly decoded. | 132 bool frameIsCompleteAtIndex(size_t) const; // Whether or not the frame is co mpletely decoded or fully received. |
|
Peter Kasting
2013/04/23 21:43:20
Nit: Shouldn't this just be "...is fully received"
Alpha Left Google
2013/04/25 23:02:44
Done.
| |
| 133 ImageOrientation orientationAtIndex(size_t) const; // EXIF image orientation | 133 ImageOrientation orientationAtIndex(size_t) const; // EXIF image orientation |
| 134 | 134 |
| 135 // Return the number of bytes in the decoded frame. If the frame is not yet | 135 // Return the number of bytes in the decoded frame. If the frame is not yet |
| 136 // decoded then return 0. | 136 // decoded then return 0. |
| 137 unsigned frameBytesAtIndex(size_t) const; | 137 unsigned frameBytesAtIndex(size_t) const; |
| 138 | 138 |
| 139 #if ENABLE(IMAGE_DECODER_DOWN_SAMPLING) | 139 #if ENABLE(IMAGE_DECODER_DOWN_SAMPLING) |
| 140 static unsigned maxPixelsPerDecodedImage() { return s_maxPixelsPerDecodedIma ge; } | 140 static unsigned maxPixelsPerDecodedImage() { return s_maxPixelsPerDecodedIma ge; } |
| 141 static void setMaxPixelsPerDecodedImage(unsigned maxPixels) { s_maxPixelsPer DecodedImage = maxPixels; } | 141 static void setMaxPixelsPerDecodedImage(unsigned maxPixels) { s_maxPixelsPer DecodedImage = maxPixels; } |
| 142 #endif | 142 #endif |
| 143 | 143 |
| 144 void reportMemoryUsage(MemoryObjectInfo*) const; | 144 void reportMemoryUsage(MemoryObjectInfo*) const; |
| 145 | 145 |
| 146 private: | 146 private: |
| 147 OwnPtr<NativeImageDecoderPtr> m_decoder; | 147 OwnPtr<NativeImageDecoderPtr> m_decoder; |
| 148 | 148 |
| 149 AlphaOption m_alphaOption; | 149 AlphaOption m_alphaOption; |
| 150 GammaAndColorProfileOption m_gammaAndColorProfileOption; | 150 GammaAndColorProfileOption m_gammaAndColorProfileOption; |
| 151 #if ENABLE(IMAGE_DECODER_DOWN_SAMPLING) | 151 #if ENABLE(IMAGE_DECODER_DOWN_SAMPLING) |
| 152 static unsigned s_maxPixelsPerDecodedImage; | 152 static unsigned s_maxPixelsPerDecodedImage; |
| 153 #endif | 153 #endif |
| 154 }; | 154 }; |
| 155 | 155 |
| 156 } | 156 } |
| 157 | 157 |
| 158 #endif | 158 #endif |
| OLD | NEW |