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

Side by Side Diff: Source/core/platform/graphics/chromium/DeferredImageDecoder.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) 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 void setData(SharedBuffer* data, bool allDataReceived); 57 void setData(SharedBuffer* data, bool allDataReceived);
58 58
59 bool isSizeAvailable(); 59 bool isSizeAvailable();
60 IntSize size() const; 60 IntSize size() const;
61 IntSize frameSizeAtIndex(size_t index) const; 61 IntSize frameSizeAtIndex(size_t index) const;
62 size_t frameCount(); 62 size_t frameCount();
63 int repetitionCount() const; 63 int repetitionCount() const;
64 void clearFrameBufferCache(size_t); 64 void clearFrameBufferCache(size_t);
65 bool frameHasAlphaAtIndex(size_t index) const; 65 bool frameHasAlphaAtIndex(size_t index) const;
66 bool frameIsCompleteAtIndex(size_t) const;
67 float frameDurationAtIndex(size_t) const;
66 unsigned frameBytesAtIndex(size_t index) const; 68 unsigned frameBytesAtIndex(size_t index) const;
67 ImageOrientation orientation() const; 69 ImageOrientation orientation() const;
68 bool hotSpot(IntPoint&) const; 70 bool hotSpot(IntPoint&) const;
69 71
70 private: 72 private:
71 explicit DeferredImageDecoder(PassOwnPtr<ImageDecoder> actualDecoder); 73 explicit DeferredImageDecoder(PassOwnPtr<ImageDecoder> actualDecoder);
72 SkBitmap createLazyDecodingBitmap(); 74 SkBitmap createLazyDecodingBitmap();
73 void setData(PassRefPtr<SharedBuffer>, bool allDataReceived); 75 void setData(PassRefPtr<SharedBuffer>, bool allDataReceived);
74 76
75 RefPtr<SharedBuffer> m_data; 77 RefPtr<SharedBuffer> m_data;
76 bool m_allDataReceived; 78 bool m_allDataReceived;
77 OwnPtr<ImageDecoder> m_actualDecoder; 79 OwnPtr<ImageDecoder> m_actualDecoder;
78 80
79 String m_filenameExtension; 81 String m_filenameExtension;
80 IntSize m_size; 82 IntSize m_size;
81 ImageOrientation m_orientation; 83 ImageOrientation m_orientation;
82 84
83 ImageFrame m_lazyDecodedFrame; 85 ImageFrame m_lazyDecodedFrame;
84 RefPtr<ImageFrameGenerator> m_frameGenerator; 86 RefPtr<ImageFrameGenerator> m_frameGenerator;
85 87
86 static bool s_enabled; 88 static bool s_enabled;
87 }; 89 };
88 90
89 } // namespace WebCore 91 } // namespace WebCore
90 92
91 #endif 93 #endif
OLDNEW
« no previous file with comments | « Source/core/platform/graphics/ImageSource.cpp ('k') | Source/core/platform/graphics/chromium/DeferredImageDecoder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698