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

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

Issue 418653002: Allowing YUV data to be retrieved from the JPEG Decoder. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed comments Created 6 years, 4 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) Research In Motion Limited 2009-2010. All rights reserved. 2 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 // this frame is a blank frame, so it can again be decoded alone. 197 // this frame is a blank frame, so it can again be decoded alone.
198 // Otherwise, the previous frame contributes to this frame. 198 // Otherwise, the previous frame contributes to this frame.
199 return (prevBuffer->originalFrameRect().contains(IntRect(IntPoint(), siz e())) 199 return (prevBuffer->originalFrameRect().contains(IntRect(IntPoint(), siz e()))
200 || (prevBuffer->requiredPreviousFrameIndex() == kNotFound)) ? kNotFo und : prevFrame; 200 || (prevBuffer->requiredPreviousFrameIndex() == kNotFound)) ? kNotFo und : prevFrame;
201 default: 201 default:
202 ASSERT_NOT_REACHED(); 202 ASSERT_NOT_REACHED();
203 return kNotFound; 203 return kNotFound;
204 } 204 }
205 } 205 }
206 206
207 ImagePlanes::ImagePlanes()
208 {
209 for (int i = 0; i < 3; ++i) {
210 m_planes[i] = 0;
211 m_rowBytes[i] = 0;
212 }
213 }
214
215 void ImagePlanes::set(void* planes[3], size_t rowBytes[3])
216 {
217 for (int i = 0; i < 3; ++i) {
218 m_planes[i] = planes[i];
219 m_rowBytes[i] = rowBytes[i];
220 }
221 }
222
223 void* ImagePlanes::plane(int i)
224 {
225 ASSERT((i >= 0) && i < 3);
226 return m_planes[i];
227 }
228
229 size_t ImagePlanes::rowBytes(int i) const
230 {
231 ASSERT((i >= 0) && i < 3);
232 return m_rowBytes[i];
233 }
234
207 } // namespace blink 235 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698