| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 #ifndef SERVICES_SHAPE_DETECTION_DETECTION_UTILS_MAC_H_ | 5 #ifndef SERVICES_SHAPE_DETECTION_DETECTION_UTILS_MAC_H_ |
| 6 #define SERVICES_SHAPE_DETECTION_DETECTION_UTILS_MAC_H_ | 6 #define SERVICES_SHAPE_DETECTION_DETECTION_UTILS_MAC_H_ |
| 7 | 7 |
| 8 #import <QuartzCore/QuartzCore.h> | 8 #import <QuartzCore/QuartzCore.h> |
| 9 | 9 |
| 10 #include "base/mac/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
| 11 #include "services/shape_detection/public/interfaces/barcodedetection.mojom.h" | 11 #include "services/shape_detection/public/interfaces/barcodedetection.mojom.h" |
| 12 #include "third_party/skia/include/core/SkBitmap.h" | |
| 13 | 12 |
| 14 namespace shape_detection { | 13 namespace shape_detection { |
| 15 | 14 |
| 16 // Takes a ScopedSharedBufferHandle with dimensions and produces a new CIImage | 15 // Takes a ScopedSharedBufferHandle with dimensions and produces a new CIImage |
| 17 // with the same contents, or a null scoped_nsobject is something goes wrong. | 16 // with the same contents, or a null scoped_nsobject is something goes wrong. |
| 18 base::scoped_nsobject<CIImage> CreateCIImageFromSkBitmap( | 17 base::scoped_nsobject<CIImage> CreateCIImageFromSharedMemory( |
| 19 const SkBitmap& bitmap); | 18 mojo::ScopedSharedBufferHandle frame_data, |
| 19 uint32_t width, |
| 20 uint32_t height); |
| 20 | 21 |
| 21 } // namespace shape_detection | 22 } // namespace shape_detection |
| 22 | 23 |
| 23 #endif // SERVICES_SHAPE_DETECTION_DETECTION_UTILS_MAC_H_ | 24 #endif // SERVICES_SHAPE_DETECTION_DETECTION_UTILS_MAC_H_ |
| OLD | NEW |