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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 ~ImageFrameGenerator(); | 65 ~ImageFrameGenerator(); |
66 | 66 |
67 // Decodes and scales the specified frame indicated by |index|. Dimensions | 67 // Decodes and scales the specified frame indicated by |index|. Dimensions |
68 // and output format are specified in |info|. Decoded pixels are written | 68 // and output format are specified in |info|. Decoded pixels are written |
69 // into |pixels| with a stride of |rowBytes|. | 69 // into |pixels| with a stride of |rowBytes|. |
70 // | 70 // |
71 // Returns true if decoding was successful. | 71 // Returns true if decoding was successful. |
72 bool decodeAndScale(const SkImageInfo&, size_t index, void* pixels, size_t r
owBytes); | 72 bool decodeAndScale(const SkImageInfo&, size_t index, void* pixels, size_t r
owBytes); |
73 | 73 |
74 // Decodes YUV components directly into the provided memory planes. | 74 // Decodes YUV components directly into the provided memory planes. |
75 bool decodeToYUV(void* planes[3], size_t rowBytes[3]); | 75 bool decodeToYUV(SkISize componentSizes[3], void* planes[3], size_t rowBytes
[3]); |
76 | 76 |
77 void setData(PassRefPtr<SharedBuffer>, bool allDataReceived); | 77 void setData(PassRefPtr<SharedBuffer>, bool allDataReceived); |
78 | 78 |
79 // Creates a new SharedBuffer containing the data received so far. | 79 // Creates a new SharedBuffer containing the data received so far. |
80 void copyData(RefPtr<SharedBuffer>*, bool* allDataReceived); | 80 void copyData(RefPtr<SharedBuffer>*, bool* allDataReceived); |
81 | 81 |
82 SkISize getFullSize() const { return m_fullSize; } | 82 SkISize getFullSize() const { return m_fullSize; } |
83 | 83 |
84 bool isMultiFrame() const { return m_isMultiFrame; } | 84 bool isMultiFrame() const { return m_isMultiFrame; } |
85 | 85 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 // Prevents multiple decode operations on the same data. | 117 // Prevents multiple decode operations on the same data. |
118 Mutex m_decodeMutex; | 118 Mutex m_decodeMutex; |
119 | 119 |
120 // Protect concurrent access to m_hasAlpha. | 120 // Protect concurrent access to m_hasAlpha. |
121 Mutex m_alphaMutex; | 121 Mutex m_alphaMutex; |
122 }; | 122 }; |
123 | 123 |
124 } // namespace blink | 124 } // namespace blink |
125 | 125 |
126 #endif | 126 #endif |
OLD | NEW |