OLD | NEW |
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 class PLATFORM_EXPORT DeferredImageDecoder final { | 46 class PLATFORM_EXPORT DeferredImageDecoder final { |
47 WTF_MAKE_NONCOPYABLE(DeferredImageDecoder); | 47 WTF_MAKE_NONCOPYABLE(DeferredImageDecoder); |
48 USING_FAST_MALLOC(DeferredImageDecoder); | 48 USING_FAST_MALLOC(DeferredImageDecoder); |
49 public: | 49 public: |
50 static PassOwnPtr<DeferredImageDecoder> create(const SharedBuffer& data, Ima
geDecoder::AlphaOption, ImageDecoder::GammaAndColorProfileOption); | 50 static PassOwnPtr<DeferredImageDecoder> create(const SharedBuffer& data, Ima
geDecoder::AlphaOption, ImageDecoder::GammaAndColorProfileOption); |
51 | 51 |
52 static PassOwnPtr<DeferredImageDecoder> createForTesting(PassOwnPtr<ImageDec
oder>); | 52 static PassOwnPtr<DeferredImageDecoder> createForTesting(PassOwnPtr<ImageDec
oder>); |
53 | 53 |
54 ~DeferredImageDecoder(); | 54 ~DeferredImageDecoder(); |
55 | 55 |
56 static void setEnabled(bool); | |
57 static bool enabled(); | |
58 | |
59 String filenameExtension() const; | 56 String filenameExtension() const; |
60 | 57 |
61 PassRefPtr<SkImage> createFrameAtIndex(size_t); | 58 PassRefPtr<SkImage> createFrameAtIndex(size_t); |
62 | 59 |
63 void setData(SharedBuffer& data, bool allDataReceived); | 60 void setData(SharedBuffer& data, bool allDataReceived); |
64 | 61 |
65 bool isSizeAvailable(); | 62 bool isSizeAvailable(); |
66 bool hasColorProfile() const; | 63 bool hasColorProfile() const; |
67 IntSize size() const; | 64 IntSize size() const; |
68 IntSize frameSizeAtIndex(size_t index) const; | 65 IntSize frameSizeAtIndex(size_t index) const; |
(...skipping 26 matching lines...) Expand all Loading... |
95 | 92 |
96 String m_filenameExtension; | 93 String m_filenameExtension; |
97 IntSize m_size; | 94 IntSize m_size; |
98 int m_repetitionCount; | 95 int m_repetitionCount; |
99 bool m_hasColorProfile; | 96 bool m_hasColorProfile; |
100 bool m_canYUVDecode; | 97 bool m_canYUVDecode; |
101 | 98 |
102 // Caches frame state information. | 99 // Caches frame state information. |
103 Vector<DeferredFrameData> m_frameData; | 100 Vector<DeferredFrameData> m_frameData; |
104 RefPtr<ImageFrameGenerator> m_frameGenerator; | 101 RefPtr<ImageFrameGenerator> m_frameGenerator; |
105 | |
106 static bool s_enabled; | |
107 }; | 102 }; |
108 | 103 |
109 } // namespace blink | 104 } // namespace blink |
110 | 105 |
111 #endif | 106 #endif |
OLD | NEW |