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

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

Issue 1247033008: Update straggling ImageSource references (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « no previous file | Source/web/ImageDecodeBench.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1 /* -*- Mode: C; tab-width: 2; 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 CompuServe Incorporated maintains a mailing list with all those individuals and 69 CompuServe Incorporated maintains a mailing list with all those individuals and
70 organizations who wish to receive copies of this document when it is corrected 70 organizations who wish to receive copies of this document when it is corrected
71 or revised. This service is offered free of charge; please provide us with your 71 or revised. This service is offered free of charge; please provide us with your
72 mailing address. 72 mailing address.
73 */ 73 */
74 74
75 #include "config.h" 75 #include "config.h"
76 #include "platform/image-decoders/gif/GIFImageReader.h" 76 #include "platform/image-decoders/gif/GIFImageReader.h"
77 77
78 #include <string.h> 78 #include <string.h>
79 #include "platform/graphics/ImageSource.h"
80 79
81 using blink::GIFImageDecoder; 80 using blink::GIFImageDecoder;
82 81
83 // GETN(n, s) requests at least 'n' bytes available from 'q', at start of state 's'. 82 // GETN(n, s) requests at least 'n' bytes available from 'q', at start of state 's'.
84 // 83 //
85 // Note, the hold will never need to be bigger than 256 bytes to gather up in th e hold, 84 // Note, the hold will never need to be bigger than 256 bytes to gather up in th e hold,
86 // as each GIF block (except colormaps) can never be bigger than 256 bytes. 85 // as each GIF block (except colormaps) can never be bigger than 256 bytes.
87 // Colormaps are directly copied in the resp. global_colormap or dynamically all ocated local_colormap. 86 // Colormaps are directly copied in the resp. global_colormap or dynamically all ocated local_colormap.
88 // So a fixed buffer in GIFImageReader is good enough. 87 // So a fixed buffer in GIFImageReader is good enough.
89 // This buffer is only needed to copy left-over data from one GifWrite call to t he next 88 // This buffer is only needed to copy left-over data from one GifWrite call to t he next
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after
842 rowIter = rowBuffer.begin(); 841 rowIter = rowBuffer.begin();
843 rowsRemaining = m_frameContext->height(); 842 rowsRemaining = m_frameContext->height();
844 843
845 // Clearing the whole suffix table lets us be more tolerant of bad data. 844 // Clearing the whole suffix table lets us be more tolerant of bad data.
846 for (int i = 0; i < clearCode; ++i) { 845 for (int i = 0; i < clearCode; ++i) {
847 suffix[i] = i; 846 suffix[i] = i;
848 suffixLength[i] = 1; 847 suffixLength[i] = 1;
849 } 848 }
850 return true; 849 return true;
851 } 850 }
OLDNEW
« no previous file with comments | « no previous file | Source/web/ImageDecodeBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698