MCPcopy Create free account
hub / github.com/Tencent/tgfx / Make

Method Make

src/platform/android/SurfaceTextureReader.cpp:24–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22
23namespace tgfx {
24std::shared_ptr<SurfaceTextureReader> SurfaceTextureReader::Make(int width, int height,
25 jobject listener) {
26 if (listener == nullptr || width < 1 || height < 1) {
27 return nullptr;
28 }
29 auto imageStream = SurfaceTexture::Make(width, height, listener);
30 if (imageStream == nullptr) {
31 return nullptr;
32 }
33 auto imageReader =
34 std::shared_ptr<SurfaceTextureReader>(new SurfaceTextureReader(std::move(imageStream)));
35 imageReader->weakThis = imageReader;
36 return imageReader;
37}
38
39SurfaceTextureReader::SurfaceTextureReader(std::shared_ptr<ImageStream> stream)
40 : ImageReader(std::move(stream)) {

Callers

nothing calls this directly

Calls 1

MakeFunction · 0.85

Tested by

no test coverage detected