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

Side by Side Diff: Source/platform/graphics/DeferredImageDecoder.cpp

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 | « Source/platform/graphics/DeferredImageDecoder.h ('k') | Source/platform/graphics/FrameData.h » ('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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 170
171 bool DeferredImageDecoder::frameIsCompleteAtIndex(size_t index) const 171 bool DeferredImageDecoder::frameIsCompleteAtIndex(size_t index) const
172 { 172 {
173 if (m_actualDecoder) 173 if (m_actualDecoder)
174 return m_actualDecoder->frameIsCompleteAtIndex(index); 174 return m_actualDecoder->frameIsCompleteAtIndex(index);
175 if (index < m_frameData.size()) 175 if (index < m_frameData.size())
176 return m_frameData[index].m_isComplete; 176 return m_frameData[index].m_isComplete;
177 return false; 177 return false;
178 } 178 }
179 179
180 bool DeferredImageDecoder::frameIsCachedAndLazyDecodedAtIndex(size_t index) cons t
181 {
182 // All frames cached in m_frameData are lazy-decoded.
183 ASSERT(index >= m_frameData.size() || m_frameData[index].m_haveMetadata);
184 return index < m_frameData.size();
185 }
186
187 float DeferredImageDecoder::frameDurationAtIndex(size_t index) const 180 float DeferredImageDecoder::frameDurationAtIndex(size_t index) const
188 { 181 {
189 if (m_actualDecoder) 182 if (m_actualDecoder)
190 return m_actualDecoder->frameDurationAtIndex(index); 183 return m_actualDecoder->frameDurationAtIndex(index);
191 if (index < m_frameData.size()) 184 if (index < m_frameData.size())
192 return m_frameData[index].m_duration; 185 return m_frameData[index].m_duration;
193 return 0; 186 return 0;
194 } 187 }
195 188
196 size_t DeferredImageDecoder::frameBytesAtIndex(size_t index) const 189 size_t DeferredImageDecoder::frameBytesAtIndex(size_t index) const
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 return image.release(); 272 return image.release();
280 } 273 }
281 274
282 bool DeferredImageDecoder::hotSpot(IntPoint& hotSpot) const 275 bool DeferredImageDecoder::hotSpot(IntPoint& hotSpot) const
283 { 276 {
284 // TODO: Implement. 277 // TODO: Implement.
285 return m_actualDecoder ? m_actualDecoder->hotSpot(hotSpot) : false; 278 return m_actualDecoder ? m_actualDecoder->hotSpot(hotSpot) : false;
286 } 279 }
287 280
288 } // namespace blink 281 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/graphics/DeferredImageDecoder.h ('k') | Source/platform/graphics/FrameData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698