Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(830)

Side by Side Diff: Source/core/platform/graphics/ImageSource.h

Issue 14317005: Checking if frame is complete and access duration doesn't need a decode (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: done Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 fu lly received.
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
OLDNEW
« no previous file with comments | « Source/core/platform/graphics/BitmapImage.cpp ('k') | Source/core/platform/graphics/ImageSource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698