forked from UnigramDev/Unigram
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSurfaceImage.h
More file actions
39 lines (28 loc) · 976 Bytes
/
Copy pathSurfaceImage.h
File metadata and controls
39 lines (28 loc) · 976 Bytes
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
35
36
37
38
39
#pragma once
#include "SurfaceImage.g.h"
#include <D2d1_3.h>
#include <winrt/Windows.UI.Xaml.Media.Imaging.h>
#include <windows.ui.xaml.media.dxinterop.h>
using namespace winrt::Windows::UI::Xaml::Media::Imaging;
namespace winrt::Telegram::Native::implementation
{
struct SurfaceImage : SurfaceImageT<SurfaceImage>
{
SurfaceImage(ID2D1Device* d2d1Device, int32_t pixelWidth, int32_t pixelHeight);
int32_t PixelWidth() noexcept;
int32_t PixelHeight() noexcept;
SurfaceImageSource Source() noexcept;
HRESULT CreateDeviceResources(ID2D1Device* d2d1Device);
//private:
int32_t m_pixelWidth;
int32_t m_pixelHeight;
SurfaceImageSource m_source;
winrt::com_ptr<ISurfaceImageSourceNativeWithD2D> m_native;
};
}
//namespace winrt::Telegram::Native::factory_implementation
//{
// struct SurfaceImage : SurfaceImageT<SurfaceImage, implementation::SurfaceImage>
// {
// };
//}