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

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

Issue 2155973002: Save a bitmap copy when advancing to dependent GIF and WebP animation frames (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 4 years, 5 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) 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 // These do not touch other metadata, only the raw pixel data. 86 // These do not touch other metadata, only the raw pixel data.
87 void clearPixelData(); 87 void clearPixelData();
88 void zeroFillPixelData(); 88 void zeroFillPixelData();
89 void zeroFillFrameRect(const IntRect&); 89 void zeroFillFrameRect(const IntRect&);
90 90
91 // Makes this frame have an independent copy of the provided image's 91 // Makes this frame have an independent copy of the provided image's
92 // pixel data, so that modifications in one frame are not reflected in 92 // pixel data, so that modifications in one frame are not reflected in
93 // the other. Returns whether the copy succeeded. 93 // the other. Returns whether the copy succeeded.
94 bool copyBitmapData(const ImageFrame&); 94 bool copyBitmapData(const ImageFrame&);
95 95
96 // Moves the bitmap data from the provided frame to this one, leaving the
97 // provided frame empty.
98 void takeBitmapData(ImageFrame*);
99
96 // Copies the pixel data at [(startX, startY), (endX, startY)) to the 100 // Copies the pixel data at [(startX, startY), (endX, startY)) to the
97 // same X-coordinates on each subsequent row up to but not including 101 // same X-coordinates on each subsequent row up to but not including
98 // endY. 102 // endY.
99 void copyRowNTimes(int startX, int endX, int startY, int endY) 103 void copyRowNTimes(int startX, int endX, int startY, int endY)
100 { 104 {
101 ASSERT(startX < width()); 105 ASSERT(startX < width());
102 ASSERT(endX <= width()); 106 ASSERT(endX <= width());
103 ASSERT(startY < height()); 107 ASSERT(startY < height());
104 ASSERT(endY <= height()); 108 ASSERT(endY <= height());
105 const int rowBytes = (endX - startX) * sizeof(PixelData); 109 const int rowBytes = (endX - startX) * sizeof(PixelData);
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 // The frame that must be decoded before this frame can be decoded. 217 // The frame that must be decoded before this frame can be decoded.
214 // WTF::kNotFound if this frame doesn't require any previous frame. 218 // WTF::kNotFound if this frame doesn't require any previous frame.
215 // This is used by ImageDecoder::clearCacheExceptFrame(), and will never 219 // This is used by ImageDecoder::clearCacheExceptFrame(), and will never
216 // be read for image formats that do not have multiple frames. 220 // be read for image formats that do not have multiple frames.
217 size_t m_requiredPreviousFrameIndex; 221 size_t m_requiredPreviousFrameIndex;
218 }; 222 };
219 223
220 } // namespace blink 224 } // namespace blink
221 225
222 #endif 226 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698