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

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

Issue 1403393004: JPEGImageDecoder RGB565 and downsample support and related Skia imagegenerator changes Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Continued decoding fix and downscale combined Created 5 years, 1 month 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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 ASSERT((i >= 0) && i < 3); 254 ASSERT((i >= 0) && i < 3);
255 return m_planes[i]; 255 return m_planes[i];
256 } 256 }
257 257
258 size_t ImagePlanes::rowBytes(int i) const 258 size_t ImagePlanes::rowBytes(int i) const
259 { 259 {
260 ASSERT((i >= 0) && i < 3); 260 ASSERT((i >= 0) && i < 3);
261 return m_rowBytes[i]; 261 return m_rowBytes[i];
262 } 262 }
263 263
264 void ImageDecoder::defaultDecodeAndScale(ImageFrame::ColorType* outType, float* scale, float* lowerScale)
265 {
266 if (outType)
267 *outType = ImageFrame::RGBA8888;
268 if (scale)
269 *scale = 1.0f;
270 if (lowerScale)
271 *lowerScale = 0;
272 }
273
264 } // namespace blink 274 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698