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

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

Issue 99103006: Moving GraphicsContext and dependencies from core to platform. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final patch - fixes Android Created 7 years 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 | Annotate | Revision Log
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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 Columbus, Ohio 43220 66 Columbus, Ohio 43220
67 U. S. A. 67 U. S. A.
68 68
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 "core/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 "core/platform/graphics/ImageSource.h" 79 #include "platform/graphics/ImageSource.h"
80 80
81 using WebCore::GIFImageDecoder; 81 using WebCore::GIFImageDecoder;
82 82
83 // GETN(n, s) requests at least 'n' bytes available from 'q', at start of state 's'. 83 // GETN(n, s) requests at least 'n' bytes available from 'q', at start of state 's'.
84 // 84 //
85 // Note, the hold will never need to be bigger than 256 bytes to gather up in th e hold, 85 // 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. 86 // 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. 87 // 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. 88 // 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 89 // This buffer is only needed to copy left-over data from one GifWrite call to t he next
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
791 rowIter = rowBuffer.begin(); 791 rowIter = rowBuffer.begin();
792 rowsRemaining = m_frameContext->height(); 792 rowsRemaining = m_frameContext->height();
793 793
794 // Clearing the whole suffix table lets us be more tolerant of bad data. 794 // Clearing the whole suffix table lets us be more tolerant of bad data.
795 for (int i = 0; i < clearCode; ++i) { 795 for (int i = 0; i < clearCode; ++i) {
796 suffix[i] = i; 796 suffix[i] = i;
797 suffixLength[i] = 1; 797 suffixLength[i] = 1;
798 } 798 }
799 return true; 799 return true;
800 } 800 }
OLDNEW
« no previous file with comments | « Source/platform/image-decoders/gif/GIFImageReader.h ('k') | Source/platform/image-decoders/ico/ICOImageDecoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698