Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 136 static bool validateConstructorArguments(const unsigned&, | 136 static bool validateConstructorArguments(const unsigned&, |
| 137 const IntSize* = nullptr, | 137 const IntSize* = nullptr, |
| 138 const unsigned& = 0, | 138 const unsigned& = 0, |
| 139 const unsigned& = 0, | 139 const unsigned& = 0, |
| 140 const DOMArrayBufferView* = nullptr, | 140 const DOMArrayBufferView* = nullptr, |
| 141 ExceptionState* = nullptr); | 141 ExceptionState* = nullptr); |
| 142 | 142 |
| 143 private: | 143 private: |
| 144 ImageData(const IntSize&, | 144 ImageData(const IntSize&, |
| 145 DOMArrayBufferView*, | 145 DOMArrayBufferView*, |
| 146 const ImageDataColorSettings* = nullptr); | 146 const ImageDataColorSettings* = nullptr, |
| 147 bool = false); | |
|
Justin Novosad
2017/03/21 15:20:43
To improve readability, please use an enum instead
zakerinasab
2017/03/21 15:48:14
Done.
| |
| 147 | 148 |
| 148 IntSize m_size; | 149 IntSize m_size; |
| 149 ImageDataColorSettings m_colorSettings; | 150 ImageDataColorSettings m_colorSettings; |
| 150 ImageDataArray m_dataUnion; | 151 ImageDataArray m_dataUnion; |
| 151 Member<DOMUint8ClampedArray> m_data; | 152 Member<DOMUint8ClampedArray> m_data; |
| 152 Member<DOMUint16Array> m_dataU16; | 153 Member<DOMUint16Array> m_dataU16; |
| 153 Member<DOMFloat32Array> m_dataF32; | 154 Member<DOMFloat32Array> m_dataF32; |
| 154 | 155 |
| 155 static DOMArrayBufferView* allocateAndValidateDataArray( | 156 static DOMArrayBufferView* allocateAndValidateDataArray( |
| 156 const unsigned&, | 157 const unsigned&, |
| 157 ImageDataStorageFormat, | 158 ImageDataStorageFormat, |
| 158 ExceptionState* = nullptr); | 159 ExceptionState* = nullptr); |
| 159 }; | 160 }; |
| 160 | 161 |
| 161 } // namespace blink | 162 } // namespace blink |
| 162 | 163 |
| 163 #endif // ImageData_h | 164 #endif // ImageData_h |
| OLD | NEW |