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

Side by Side Diff: Source/core/platform/image-decoders/gif/GIFImageReader.h

Issue 23068027: Animated WebP: Optimize decoding in case of seeking (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@add_noblend_image
Patch Set: Fix assert fail on debug Created 7 years, 3 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
OLDNEW
1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* ***** BEGIN LICENSE BLOCK ***** 2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4 * 4 *
5 * The contents of this file are subject to the Mozilla Public License Version 5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with 6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at 7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/ 8 * http://www.mozilla.org/MPL/
9 * 9 *
10 * Software distributed under the License is distributed on an "AS IS" basis, 10 * Software distributed under the License is distributed on an "AS IS" basis,
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 m_width = width; 221 m_width = width;
222 m_height = height; 222 m_height = height;
223 } 223 }
224 WebCore::IntRect frameRect() const { return WebCore::IntRect(m_xOffset, m_yO ffset, m_width, m_height); } 224 WebCore::IntRect frameRect() const { return WebCore::IntRect(m_xOffset, m_yO ffset, m_width, m_height); }
225 unsigned xOffset() const { return m_xOffset; } 225 unsigned xOffset() const { return m_xOffset; }
226 unsigned yOffset() const { return m_yOffset; } 226 unsigned yOffset() const { return m_yOffset; }
227 unsigned width() const { return m_width; } 227 unsigned width() const { return m_width; }
228 unsigned height() const { return m_height; } 228 unsigned height() const { return m_height; }
229 size_t transparentPixel() const { return m_transparentPixel; } 229 size_t transparentPixel() const { return m_transparentPixel; }
230 void setTransparentPixel(size_t pixel) { m_transparentPixel = pixel; } 230 void setTransparentPixel(size_t pixel) { m_transparentPixel = pixel; }
231 WebCore::ImageFrame::FrameDisposalMethod disposalMethod() const { return m_d isposalMethod; } 231 WebCore::ImageFrame::DisposalMethod disposalMethod() const { return m_dispos alMethod; }
232 void setDisposalMethod(WebCore::ImageFrame::FrameDisposalMethod method) { m_ disposalMethod = method; } 232 void setDisposalMethod(WebCore::ImageFrame::DisposalMethod disposalMethod) { m_disposalMethod = disposalMethod; }
233 unsigned delayTime() const { return m_delayTime; } 233 unsigned delayTime() const { return m_delayTime; }
234 void setDelayTime(unsigned delay) { m_delayTime = delay; } 234 void setDelayTime(unsigned delay) { m_delayTime = delay; }
235 bool isComplete() const { return m_isComplete; } 235 bool isComplete() const { return m_isComplete; }
236 void setComplete() { m_isComplete = true; } 236 void setComplete() { m_isComplete = true; }
237 bool isHeaderDefined() const { return m_isHeaderDefined; } 237 bool isHeaderDefined() const { return m_isHeaderDefined; }
238 void setHeaderDefined() { m_isHeaderDefined = true; } 238 void setHeaderDefined() { m_isHeaderDefined = true; }
239 bool isDataSizeDefined() const { return m_isDataSizeDefined; } 239 bool isDataSizeDefined() const { return m_isDataSizeDefined; }
240 int dataSize() const { return m_dataSize; } 240 int dataSize() const { return m_dataSize; }
241 void setDataSize(int size) 241 void setDataSize(int size)
242 { 242 {
243 m_dataSize = size; 243 m_dataSize = size;
244 m_isDataSizeDefined = true; 244 m_isDataSizeDefined = true;
245 } 245 }
246 bool progressiveDisplay() const { return m_progressiveDisplay; } 246 bool progressiveDisplay() const { return m_progressiveDisplay; }
247 void setProgressiveDisplay(bool progressiveDisplay) { m_progressiveDisplay = progressiveDisplay; } 247 void setProgressiveDisplay(bool progressiveDisplay) { m_progressiveDisplay = progressiveDisplay; }
248 bool interlaced() const { return m_interlaced; } 248 bool interlaced() const { return m_interlaced; }
249 void setInterlaced(bool interlaced) { m_interlaced = interlaced; } 249 void setInterlaced(bool interlaced) { m_interlaced = interlaced; }
250 250
251 void clearDecodeState() { m_lzwContext.clear(); } 251 void clearDecodeState() { m_lzwContext.clear(); }
252 const GIFColorMap& localColorMap() const { return m_localColorMap; } 252 const GIFColorMap& localColorMap() const { return m_localColorMap; }
253 GIFColorMap& localColorMap() { return m_localColorMap; } 253 GIFColorMap& localColorMap() { return m_localColorMap; }
254 254
255 private: 255 private:
256 int m_frameId; 256 int m_frameId;
257 unsigned m_xOffset; 257 unsigned m_xOffset;
258 unsigned m_yOffset; // With respect to "screen" origin. 258 unsigned m_yOffset; // With respect to "screen" origin.
259 unsigned m_width; 259 unsigned m_width;
260 unsigned m_height; 260 unsigned m_height;
261 size_t m_transparentPixel; // Index of transparent pixel. Value is notFound if there is no transparent pixel. 261 size_t m_transparentPixel; // Index of transparent pixel. Value is notFound if there is no transparent pixel.
262 WebCore::ImageFrame::FrameDisposalMethod m_disposalMethod; // Restore to bac kground, leave in place, etc. 262 WebCore::ImageFrame::DisposalMethod m_disposalMethod; // Restore to backgrou nd, leave in place, etc.
263 int m_dataSize; 263 int m_dataSize;
264 264
265 bool m_progressiveDisplay; // If true, do Haeberli interlace hack. 265 bool m_progressiveDisplay; // If true, do Haeberli interlace hack.
266 bool m_interlaced; // True, if scanlines arrive interlaced order. 266 bool m_interlaced; // True, if scanlines arrive interlaced order.
267 267
268 unsigned m_delayTime; // Display time, in milliseconds, for this image in a multi-image GIF. 268 unsigned m_delayTime; // Display time, in milliseconds, for this image in a multi-image GIF.
269 269
270 OwnPtr<GIFLZWContext> m_lzwContext; 270 OwnPtr<GIFLZWContext> m_lzwContext;
271 Vector<GIFLZWBlock> m_lzwBlocks; // LZW blocks for this frame. 271 Vector<GIFLZWBlock> m_lzwBlocks; // LZW blocks for this frame.
272 GIFColorMap m_localColorMap; 272 GIFColorMap m_localColorMap;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 GIFColorMap m_globalColorMap; 358 GIFColorMap m_globalColorMap;
359 int m_loopCount; // Netscape specific extension block to control the number of animation loops a GIF renders. 359 int m_loopCount; // Netscape specific extension block to control the number of animation loops a GIF renders.
360 360
361 Vector<OwnPtr<GIFFrameContext> > m_frames; 361 Vector<OwnPtr<GIFFrameContext> > m_frames;
362 362
363 RefPtr<WebCore::SharedBuffer> m_data; 363 RefPtr<WebCore::SharedBuffer> m_data;
364 bool m_parseCompleted; 364 bool m_parseCompleted;
365 }; 365 };
366 366
367 #endif 367 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698