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

Side by Side Diff: Source/platform/graphics/BitmapImage.h

Issue 1308233002: Remove external BitmapImage lazy decoding tracking (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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
« no previous file with comments | « no previous file | Source/platform/graphics/BitmapImage.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved.
4 * Copyright (C) 2008-2009 Torch Mobile, Inc. 4 * Copyright (C) 2008-2009 Torch Mobile, Inc.
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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 111
112 size_t currentFrame() const { return m_currentFrame; } 112 size_t currentFrame() const { return m_currentFrame; }
113 size_t frameCount(); 113 size_t frameCount();
114 114
115 PassRefPtr<SkImage> frameAtIndex(size_t); 115 PassRefPtr<SkImage> frameAtIndex(size_t);
116 116
117 bool frameIsCompleteAtIndex(size_t); 117 bool frameIsCompleteAtIndex(size_t);
118 float frameDurationAtIndex(size_t); 118 float frameDurationAtIndex(size_t);
119 bool frameHasAlphaAtIndex(size_t); 119 bool frameHasAlphaAtIndex(size_t);
120 ImageOrientation frameOrientationAtIndex(size_t); 120 ImageOrientation frameOrientationAtIndex(size_t);
121 bool frameIsLazyDecodedAtIndex(size_t) const;
122 121
123 // Decodes and caches a frame. Never accessed except internally. 122 // Decodes and caches a frame. Never accessed except internally.
124 void cacheFrame(size_t index); 123 void cacheFrame(size_t index);
125 124
126 // Called before accessing m_frames[index]. Returns false on index out of bo unds. 125 // Called before accessing m_frames[index]. Returns false on index out of bo unds.
127 bool ensureFrameIsCached(size_t index); 126 bool ensureFrameIsCached(size_t index);
128 127
129 // Returns the total number of bytes allocated for all framebuffers, i.e. 128 // Returns the total number of bytes allocated for all framebuffers, i.e.
130 // the sum of m_source.frameBytesAtIndex(...) for all frames. This is 129 // the sum of m_source.frameBytesAtIndex(...) for all frames. This is
131 // returned as an int for caller convenience, to allow safely subtracting 130 // returned as an int for caller convenience, to allow safely subtracting
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 bool m_sizeAvailable : 1; // Whether or not we can obtain the size of the fi rst image frame yet from ImageIO. 188 bool m_sizeAvailable : 1; // Whether or not we can obtain the size of the fi rst image frame yet from ImageIO.
190 mutable bool m_hasUniformFrameSize : 1; 189 mutable bool m_hasUniformFrameSize : 1;
191 mutable bool m_haveFrameCount : 1; 190 mutable bool m_haveFrameCount : 1;
192 }; 191 };
193 192
194 DEFINE_IMAGE_TYPE_CASTS(BitmapImage); 193 DEFINE_IMAGE_TYPE_CASTS(BitmapImage);
195 194
196 } // namespace blink 195 } // namespace blink
197 196
198 #endif 197 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/platform/graphics/BitmapImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698