forked from Pissandshittium/pissandshittium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdetection_utils_win.h
34 lines (25 loc) · 1.12 KB
/
detection_utils_win.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SERVICES_SHAPE_DETECTION_DETECTION_UTILS_WIN_H_
#define SERVICES_SHAPE_DETECTION_DETECTION_UTILS_WIN_H_
#include <windows.storage.streams.h>
#include <wrl/client.h>
class SkBitmap;
namespace shape_detection {
using ABI::Windows::Graphics::Imaging::ISoftwareBitmapStatics;
using ABI::Windows::Graphics::Imaging::ISoftwareBitmap;
using ABI::Windows::Graphics::Imaging::BitmapPixelFormat;
// Creates a Windows ISoftwareBitmap from a kN32_SkColorType |bitmap|, or
// returns nullptr.
Microsoft::WRL::ComPtr<ISoftwareBitmap> CreateWinBitmapFromSkBitmap(
const SkBitmap& bitmap,
ISoftwareBitmapStatics* bitmap_factory);
// Creates a Gray8/Nv12 ISoftwareBitmap from a kN32_SkColorType |bitmap|, or
// returns nullptr.
Microsoft::WRL::ComPtr<ISoftwareBitmap> CreateWinBitmapWithPixelFormat(
const SkBitmap& bitmap,
ISoftwareBitmapStatics* bitmap_factory,
BitmapPixelFormat pixel_format);
} // namespace shape_detection
#endif // SERVICES_SHAPE_DETECTION_DETECTION_UTILS_WIN_H_