| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "platform/graphics/gpu/WebGLImageConversion.h" | 5 #include "platform/graphics/gpu/WebGLImageConversion.h" |
| 6 | 6 |
| 7 #include "platform/CheckedInt.h" | 7 #include "platform/CheckedInt.h" |
| 8 #include "platform/graphics/ImageObserver.h" | 8 #include "platform/graphics/ImageObserver.h" |
| 9 #include "platform/graphics/cpu/arm/WebGLImageConversionNEON.h" | 9 #include "platform/graphics/cpu/arm/WebGLImageConversionNEON.h" |
| 10 #include "platform/graphics/cpu/x86/WebGLImageConversionSSE.h" | 10 #include "platform/graphics/cpu/x86/WebGLImageConversionSSE.h" |
| 11 #include "platform/image-decoders/ImageDecoder.h" | 11 #include "platform/image-decoders/ImageDecoder.h" |
| 12 #include "platform/image-decoders/SharedBufferSegmentReader.h" |
| 12 #include "third_party/skia/include/core/SkImage.h" | 13 #include "third_party/skia/include/core/SkImage.h" |
| 13 #include "wtf/OwnPtr.h" | 14 #include "wtf/OwnPtr.h" |
| 14 #include "wtf/PassOwnPtr.h" | 15 #include "wtf/PassOwnPtr.h" |
| 15 | 16 |
| 16 namespace blink { | 17 namespace blink { |
| 17 | 18 |
| 18 namespace { | 19 namespace { |
| 19 | 20 |
| 20 const float maxInt8Value = INT8_MAX; | 21 const float maxInt8Value = INT8_MAX; |
| 21 const float maxUInt8Value = UINT8_MAX; | 22 const float maxUInt8Value = UINT8_MAX; |
| (...skipping 2309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2331 } | 2332 } |
| 2332 | 2333 |
| 2333 FormatConverter converter(width, height, sourceData, destinationData, srcStr
ide, dstStride); | 2334 FormatConverter converter(width, height, sourceData, destinationData, srcStr
ide, dstStride); |
| 2334 converter.convert(sourceDataFormat, dstDataFormat, alphaOp); | 2335 converter.convert(sourceDataFormat, dstDataFormat, alphaOp); |
| 2335 if (!converter.Success()) | 2336 if (!converter.Success()) |
| 2336 return false; | 2337 return false; |
| 2337 return true; | 2338 return true; |
| 2338 } | 2339 } |
| 2339 | 2340 |
| 2340 } // namespace blink | 2341 } // namespace blink |
| OLD | NEW |