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

Side by Side Diff: Source/core/platform/graphics/chromium/DeferredImageDecoder.h

Issue 15969015: Reland again "Decode GIF image frames on demand". (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: For landing Created 7 years, 6 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 ImageFrame* frameBufferAtIndex(size_t index); 55 ImageFrame* frameBufferAtIndex(size_t index);
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 size_t clearCacheExceptFrame(size_t);
65 bool frameHasAlphaAtIndex(size_t index) const; 65 bool frameHasAlphaAtIndex(size_t index) const;
66 bool frameIsCompleteAtIndex(size_t) const; 66 bool frameIsCompleteAtIndex(size_t) const;
67 float frameDurationAtIndex(size_t) const; 67 float frameDurationAtIndex(size_t) const;
68 unsigned frameBytesAtIndex(size_t index) const; 68 unsigned frameBytesAtIndex(size_t index) const;
69 ImageOrientation orientation() const; 69 ImageOrientation orientation() const;
70 bool hotSpot(IntPoint&) const; 70 bool hotSpot(IntPoint&) const;
71 71
72 private: 72 private:
73 explicit DeferredImageDecoder(PassOwnPtr<ImageDecoder> actualDecoder); 73 explicit DeferredImageDecoder(PassOwnPtr<ImageDecoder> actualDecoder);
74 SkBitmap createLazyDecodingBitmap(); 74 SkBitmap createLazyDecodingBitmap();
75 void setData(PassRefPtr<SharedBuffer>, bool allDataReceived); 75 void setData(PassRefPtr<SharedBuffer>, bool allDataReceived);
76 76
77 RefPtr<SharedBuffer> m_data; 77 RefPtr<SharedBuffer> m_data;
78 bool m_allDataReceived; 78 bool m_allDataReceived;
79 OwnPtr<ImageDecoder> m_actualDecoder; 79 OwnPtr<ImageDecoder> m_actualDecoder;
80 80
81 String m_filenameExtension; 81 String m_filenameExtension;
82 IntSize m_size; 82 IntSize m_size;
83 ImageOrientation m_orientation; 83 ImageOrientation m_orientation;
84 84
85 ImageFrame m_lazyDecodedFrame; 85 ImageFrame m_lazyDecodedFrame;
86 RefPtr<ImageFrameGenerator> m_frameGenerator; 86 RefPtr<ImageFrameGenerator> m_frameGenerator;
87 87
88 static bool s_enabled; 88 static bool s_enabled;
89 }; 89 };
90 90
91 } // namespace WebCore 91 } // namespace WebCore
92 92
93 #endif 93 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698