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

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

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) 2006 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
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 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 m_frameBufferCache[0].setRequiredPreviousFrameIndex( 286 m_frameBufferCache[0].setRequiredPreviousFrameIndex(
287 findRequiredPreviousFrame(0, false)); 287 findRequiredPreviousFrame(0, false));
288 } 288 }
289 m_frameBufferCache[0].setMemoryAllocator(allocator); 289 m_frameBufferCache[0].setMemoryAllocator(allocator);
290 } 290 }
291 291
292 virtual bool canDecodeToYUV() { return false; } 292 virtual bool canDecodeToYUV() { return false; }
293 virtual bool decodeToYUV() { return false; } 293 virtual bool decodeToYUV() { return false; }
294 virtual void setImagePlanes(PassOwnPtr<ImagePlanes>) { } 294 virtual void setImagePlanes(PassOwnPtr<ImagePlanes>) { }
295 295
296 virtual void getAvailableDecodeAndScale(ImageFrame::ColorType* outType, floa t* scale, float* lowerScale)
297 {
298 defaultDecodeAndScale(outType, scale, lowerScale);
299 }
300 virtual bool activateDecodeAndScale(ImageFrame::ColorType outColor, size_t m axDecodedBytes = noDecodedImageByteLimit) { return false; }
301 virtual void disableDecodeAndScale() { }
302 static void defaultDecodeAndScale(ImageFrame::ColorType* outType, float* sca le, float* lowerScale);
303
296 protected: 304 protected:
297 // Calculates the most recent frame whose image data may be needed in 305 // Calculates the most recent frame whose image data may be needed in
298 // order to decode frame |frameIndex|, based on frame disposal methods 306 // order to decode frame |frameIndex|, based on frame disposal methods
299 // and |frameRectIsOpaque|, where |frameRectIsOpaque| signifies whether 307 // and |frameRectIsOpaque|, where |frameRectIsOpaque| signifies whether
300 // the rectangle of frame at |frameIndex| is known to be opaque. 308 // the rectangle of frame at |frameIndex| is known to be opaque.
301 // If no previous frame's data is required, returns WTF::kNotFound. 309 // If no previous frame's data is required, returns WTF::kNotFound.
302 // 310 //
303 // This function requires that the previous frame's 311 // This function requires that the previous frame's
304 // |m_requiredPreviousFrameIndex| member has been set correctly. The 312 // |m_requiredPreviousFrameIndex| member has been set correctly. The
305 // easiest way to ensure this is for subclasses to call this method and 313 // easiest way to ensure this is for subclasses to call this method and
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 362
355 IntSize m_size; 363 IntSize m_size;
356 bool m_sizeAvailable; 364 bool m_sizeAvailable;
357 bool m_isAllDataReceived; 365 bool m_isAllDataReceived;
358 bool m_failed; 366 bool m_failed;
359 }; 367 };
360 368
361 } // namespace blink 369 } // namespace blink
362 370
363 #endif 371 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698