-
Notifications
You must be signed in to change notification settings - Fork 62
Expand file tree
/
Copy pathApplePlatformContext.h
More file actions
34 lines (24 loc) · 1.06 KB
/
ApplePlatformContext.h
File metadata and controls
34 lines (24 loc) · 1.06 KB
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
#pragma once
#include "PlatformContext.h"
#include <string>
namespace rnwgpu {
class ApplePlatformContext : public PlatformContext {
public:
ApplePlatformContext();
~ApplePlatformContext() = default;
wgpu::Surface makeSurface(wgpu::Instance instance, void *surface, int width,
int height) override;
void configureSurfaceColor(void *nativeSurface,
const SurfaceColorConfig &config) override;
ImageData createImageBitmap(std::string blobId, double offset,
double size) override;
void
createImageBitmapAsync(std::string blobId, double offset, double size,
std::function<void(ImageData)> onSuccess,
std::function<void(std::string)> onError) override;
ImageData createImageBitmapFromData(std::span<const uint8_t> data) override;
void createImageBitmapFromDataAsync(
std::span<const uint8_t> data, std::function<void(ImageData)> onSuccess,
std::function<void(std::string)> onError) override;
};
} // namespace rnwgpu