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

Side by Side Diff: Source/core/platform/image-decoders/ImageDecoder.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) 2006 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
3 * Copyright (C) 2008-2009 Torch Mobile, Inc. 3 * Copyright (C) 2008-2009 Torch Mobile, Inc.
4 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. 4 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
5 * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies) 5 * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 286
287 virtual int repetitionCount() const { return cAnimationNone; } 287 virtual int repetitionCount() const { return cAnimationNone; }
288 288
289 // Decodes as much of the requested frame as possible, and returns an 289 // Decodes as much of the requested frame as possible, and returns an
290 // ImageDecoder-owned pointer. 290 // ImageDecoder-owned pointer.
291 virtual ImageFrame* frameBufferAtIndex(size_t) = 0; 291 virtual ImageFrame* frameBufferAtIndex(size_t) = 0;
292 292
293 // Make the best effort guess to check if the requested frame has alpha channel. 293 // Make the best effort guess to check if the requested frame has alpha channel.
294 virtual bool frameHasAlphaAtIndex(size_t) const; 294 virtual bool frameHasAlphaAtIndex(size_t) const;
295 295
296 // Whether or not the frame is fully received.
297 virtual bool frameIsCompleteAtIndex(size_t) const;
298
299 // Duration for displaying a frame in seconds. This method is used by an imated images only.
300 virtual float frameDurationAtIndex(size_t) const { return 0; }
301
296 // Number of bytes in the decoded frame requested. Return 0 if not yet d ecoded. 302 // Number of bytes in the decoded frame requested. Return 0 if not yet d ecoded.
297 virtual unsigned frameBytesAtIndex(size_t) const; 303 virtual unsigned frameBytesAtIndex(size_t) const;
298 304
299 void setIgnoreGammaAndColorProfile(bool flag) { m_ignoreGammaAndColorPro file = flag; } 305 void setIgnoreGammaAndColorProfile(bool flag) { m_ignoreGammaAndColorPro file = flag; }
300 bool ignoresGammaAndColorProfile() const { return m_ignoreGammaAndColorP rofile; } 306 bool ignoresGammaAndColorProfile() const { return m_ignoreGammaAndColorP rofile; }
301 307
302 ImageOrientation orientation() const { return m_orientation; } 308 ImageOrientation orientation() const { return m_orientation; }
303 309
304 enum { iccColorProfileHeaderLength = 128 }; 310 enum { iccColorProfileHeaderLength = 128 };
305 311
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 IntSize m_size; 427 IntSize m_size;
422 bool m_sizeAvailable; 428 bool m_sizeAvailable;
423 int m_maxNumPixels; 429 int m_maxNumPixels;
424 bool m_isAllDataReceived; 430 bool m_isAllDataReceived;
425 bool m_failed; 431 bool m_failed;
426 }; 432 };
427 433
428 } // namespace WebCore 434 } // namespace WebCore
429 435
430 #endif 436 #endif
OLDNEW
« no previous file with comments | « Source/core/platform/graphics/chromium/DeferredImageDecoder.cpp ('k') | Source/core/platform/image-decoders/ImageDecoder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698