OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 | 55 |
56 // Sets data contents for underlying decoder. All the API methods | 56 // Sets data contents for underlying decoder. All the API methods |
57 // require that setData() is called prior to their use. | 57 // require that setData() is called prior to their use. |
58 WEBKIT_EXPORT void setData(const WebData& data, bool allDataReceived); | 58 WEBKIT_EXPORT void setData(const WebData& data, bool allDataReceived); |
59 | 59 |
60 // Deletes owned decoder. | 60 // Deletes owned decoder. |
61 WEBKIT_EXPORT void reset(); | 61 WEBKIT_EXPORT void reset(); |
62 | 62 |
63 // Returns true if image decoding failed. | 63 // Returns true if image decoding failed. |
64 WEBKIT_EXPORT bool isFailed() const; | 64 WEBKIT_EXPORT bool isFailed() const; |
65 | 65 |
66 // Returns true if size information is available for the decoder. | 66 // Returns true if size information is available for the decoder. |
67 WEBKIT_EXPORT bool isSizeAvailable() const; | 67 WEBKIT_EXPORT bool isSizeAvailable() const; |
68 | 68 |
69 // Returns the size of the image. | 69 // Returns the size of the image. |
70 WEBKIT_EXPORT WebSize size() const; | 70 WEBKIT_EXPORT WebSize size() const; |
71 | 71 |
72 // Gives frame count for the image. For multiple frames, decoder scans the i
mage data for the count. | 72 // Gives frame count for the image. For multiple frames, decoder scans the i
mage data for the count. |
73 WEBKIT_EXPORT size_t frameCount() const; | 73 WEBKIT_EXPORT size_t frameCount() const; |
74 | 74 |
75 // Returns if the frame at given index is completely decoded. | 75 // Returns if the frame at given index is completely decoded. |
76 WEBKIT_EXPORT bool isFrameCompleteAtIndex(int index) const; | 76 WEBKIT_EXPORT bool isFrameCompleteAtIndex(int index) const; |
77 | 77 |
78 // Creates and returns WebImage from buffer at the index. | 78 // Creates and returns WebImage from buffer at the index. |
79 WEBKIT_EXPORT WebImage getFrameAtIndex(int index) const; | 79 WEBKIT_EXPORT WebImage getFrameAtIndex(int index) const; |
80 | 80 |
81 private: | 81 private: |
82 // Creates type-specific decoder. | 82 // Creates type-specific decoder. |
83 WEBKIT_EXPORT void init(Type type); | 83 WEBKIT_EXPORT void init(Type type); |
84 | 84 |
85 WebImageDecoderPrivate* m_private; | 85 WebImageDecoderPrivate* m_private; |
86 }; | 86 }; |
87 | 87 |
88 } // namespace WebKit | 88 } // namespace WebKit |
89 | 89 |
90 #endif | 90 #endif |
OLD | NEW |