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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
63 size_t dataSize, | 63 size_t dataSize, |
64 size_t frameIndex); | 64 size_t frameIndex); |
65 | 65 |
66 WebPIDecoder* m_decoder; | 66 WebPIDecoder* m_decoder; |
67 WebPDecBuffer m_decoderBuffer; | 67 WebPDecBuffer m_decoderBuffer; |
68 int m_formatFlags; | 68 int m_formatFlags; |
69 bool m_frameBackgroundHasAlpha; | 69 bool m_frameBackgroundHasAlpha; |
70 | 70 |
71 void readColorProfile(); | 71 void readColorProfile(); |
72 bool updateDemuxer(); | 72 bool updateDemuxer(); |
73 bool initFrameBuffer(size_t frameIndex); | 73 |
74 // In addition to ImageDecoder::initFrameBuffer, also set | |
75 // |m_frameBackgroundHasAlpha| based on this frame's characteristics. Before | |
76 // calling this method, the callee must verify that the frame exists. | |
scroggo_chromium
2016/11/14 13:51:46
caller*
joostouwerling
2016/11/14 16:25:10
Done.
| |
77 bool initFrameBuffer(size_t frameIndex) override; | |
78 | |
79 // When the blending method of this frame is BlendAtopPreviousFrame, the | |
80 // previous frame's buffer is necessary to decode this frame in | |
81 // applyPostProcessing, so we can't take over the data. Before calling this | |
82 // method, the callee must verify that the frame exists. | |
scroggo_chromium
2016/11/14 13:51:46
caller*
joostouwerling
2016/11/14 16:25:10
Done.
| |
83 bool canReusePreviousFrameBuffer(size_t frameIndex) const override; | |
84 | |
74 void applyPostProcessing(size_t frameIndex); | 85 void applyPostProcessing(size_t frameIndex); |
75 void clearFrameBuffer(size_t frameIndex) override; | 86 void clearFrameBuffer(size_t frameIndex) override; |
76 | 87 |
77 WebPDemuxer* m_demux; | 88 WebPDemuxer* m_demux; |
78 WebPDemuxState m_demuxState; | 89 WebPDemuxState m_demuxState; |
79 bool m_haveAlreadyParsedThisData; | 90 bool m_haveAlreadyParsedThisData; |
80 int m_repetitionCount; | 91 int m_repetitionCount; |
81 int m_decodedHeight; | 92 int m_decodedHeight; |
82 | 93 |
83 typedef void (*AlphaBlendFunction)(ImageFrame&, ImageFrame&, int, int, int); | 94 typedef void (*AlphaBlendFunction)(ImageFrame&, ImageFrame&, int, int, int); |
84 AlphaBlendFunction m_blendFunction; | 95 AlphaBlendFunction m_blendFunction; |
85 | 96 |
86 void clear(); | 97 void clear(); |
87 void clearDecoder(); | 98 void clearDecoder(); |
88 | 99 |
89 // FIXME: Update libwebp's API so it does not require copying the data on each | 100 // FIXME: Update libwebp's API so it does not require copying the data on each |
90 // update. | 101 // update. |
91 sk_sp<SkData> m_consolidatedData; | 102 sk_sp<SkData> m_consolidatedData; |
92 }; | 103 }; |
93 | 104 |
94 } // namespace blink | 105 } // namespace blink |
95 | 106 |
96 #endif | 107 #endif |
OLD | NEW |