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

Side by Side Diff: WebCore/platform/image-decoders/ImageDecoder.cpp

Issue 3573008: Merge 68446 - WebCore: ImageDecoderSkia.cpp needs to check for allocator fail... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/517/
Patch Set: Created 10 years, 2 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 /* 1 /*
2 * Copyright (C) 2008-2009 Torch Mobile, Inc. 2 * Copyright (C) 2008-2009 Torch Mobile, Inc.
3 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. 3 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 // frameComplete() may still need to read other metadata out of this frame 121 // frameComplete() may still need to read other metadata out of this frame
122 // later. 122 // later.
123 } 123 }
124 124
125 void RGBA32Buffer::zeroFill() 125 void RGBA32Buffer::zeroFill()
126 { 126 {
127 m_bytes.fill(0); 127 m_bytes.fill(0);
128 m_hasAlpha = true; 128 m_hasAlpha = true;
129 } 129 }
130 130
131 void RGBA32Buffer::copyBitmapData(const RGBA32Buffer& other) 131 bool RGBA32Buffer::copyBitmapData(const RGBA32Buffer& other)
132 { 132 {
133 if (this == &other) 133 if (this == &other)
134 return; 134 return true;
135 135
136 m_bytes = other.m_bytes; 136 m_bytes = other.m_bytes;
137 m_size = other.m_size; 137 m_size = other.m_size;
138 setHasAlpha(other.m_hasAlpha); 138 setHasAlpha(other.m_hasAlpha);
139 return true;
139 } 140 }
140 141
141 bool RGBA32Buffer::setSize(int newWidth, int newHeight) 142 bool RGBA32Buffer::setSize(int newWidth, int newHeight)
142 { 143 {
143 // NOTE: This has no way to check for allocation failure if the requested 144 // NOTE: This has no way to check for allocation failure if the requested
144 // size was too big... 145 // size was too big...
145 m_bytes.resize(newWidth * newHeight); 146 m_bytes.resize(newWidth * newHeight);
146 m_size = IntSize(newWidth, newHeight); 147 m_size = IntSize(newWidth, newHeight);
147 148
148 // Zero the image. 149 // Zero the image.
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 { 257 {
257 return getScaledValue<LowerBound>(m_scaledRows, origY, searchStart); 258 return getScaledValue<LowerBound>(m_scaledRows, origY, searchStart);
258 } 259 }
259 260
260 int ImageDecoder::scaledY(int origY, int searchStart) 261 int ImageDecoder::scaledY(int origY, int searchStart)
261 { 262 {
262 return getScaledValue<Exact>(m_scaledRows, origY, searchStart); 263 return getScaledValue<Exact>(m_scaledRows, origY, searchStart);
263 } 264 }
264 265
265 } 266 }
OLDNEW
« no previous file with comments | « WebCore/platform/image-decoders/ImageDecoder.h ('k') | WebCore/platform/image-decoders/gif/GIFImageDecoder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698