Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 // Takes over other's frame pixel data. Other becomes empty after this call. | |
|
Peter Kasting
2016/07/19 03:04:17
Nit: To match declaration above as closely as poss
aleksandar.stojiljkovic
2016/07/19 11:10:40
Done.
| |
| 97 void takeBitmapData(ImageFrame& other); | |
| 98 | |
| 96 // Copies the pixel data at [(startX, startY), (endX, startY)) to the | 99 // Copies the pixel data at [(startX, startY), (endX, startY)) to the |
| 97 // same X-coordinates on each subsequent row up to but not including | 100 // same X-coordinates on each subsequent row up to but not including |
| 98 // endY. | 101 // endY. |
| 99 void copyRowNTimes(int startX, int endX, int startY, int endY) | 102 void copyRowNTimes(int startX, int endX, int startY, int endY) |
| 100 { | 103 { |
| 101 ASSERT(startX < width()); | 104 ASSERT(startX < width()); |
| 102 ASSERT(endX <= width()); | 105 ASSERT(endX <= width()); |
| 103 ASSERT(startY < height()); | 106 ASSERT(startY < height()); |
| 104 ASSERT(endY <= height()); | 107 ASSERT(endY <= height()); |
| 105 const int rowBytes = (endX - startX) * sizeof(PixelData); | 108 const int rowBytes = (endX - startX) * sizeof(PixelData); |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 213 // The frame that must be decoded before this frame can be decoded. | 216 // The frame that must be decoded before this frame can be decoded. |
| 214 // WTF::kNotFound if this frame doesn't require any previous frame. | 217 // WTF::kNotFound if this frame doesn't require any previous frame. |
| 215 // This is used by ImageDecoder::clearCacheExceptFrame(), and will never | 218 // This is used by ImageDecoder::clearCacheExceptFrame(), and will never |
| 216 // be read for image formats that do not have multiple frames. | 219 // be read for image formats that do not have multiple frames. |
| 217 size_t m_requiredPreviousFrameIndex; | 220 size_t m_requiredPreviousFrameIndex; |
| 218 }; | 221 }; |
| 219 | 222 |
| 220 } // namespace blink | 223 } // namespace blink |
| 221 | 224 |
| 222 #endif | 225 #endif |
| OLD | NEW |