diff options
author | Juan Linietsky <juan@godotengine.org> | 2020-02-17 18:06:54 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2020-02-18 10:10:36 +0100 |
commit | 3205a92ad872f918c8322cdcd1434c231a1fd251 (patch) | |
tree | db44242ca27432eb8ea849679752d0835d2ae41a /modules/camera | |
parent | fb8c93c10b4b73d5f18f1ed287497728800e22b5 (diff) |
PoolVector is gone, replaced by Vector
Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are
sugar for `Vector<Type>`.
Diffstat (limited to 'modules/camera')
-rw-r--r-- | modules/camera/camera_ios.mm | 6 | ||||
-rw-r--r-- | modules/camera/camera_osx.mm | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/modules/camera/camera_ios.mm b/modules/camera/camera_ios.mm index 8059277503..f01135f251 100644 --- a/modules/camera/camera_ios.mm +++ b/modules/camera/camera_ios.mm @@ -44,7 +44,7 @@ Ref<CameraFeed> feed; size_t width[2]; size_t height[2]; - PoolVector<uint8_t> img_data[2]; + Vector<uint8_t> img_data[2]; AVCaptureDeviceInput *input; AVCaptureVideoDataOutput *output; @@ -175,7 +175,7 @@ img_data[0].resize(new_width * new_height); } - PoolVector<uint8_t>::Write w = img_data[0].write(); + uint8_t *w = img_data[0].ptrw(); memcpy(w.ptr(), dataY, new_width * new_height); img[0].instance(); @@ -196,7 +196,7 @@ img_data[1].resize(2 * new_width * new_height); } - PoolVector<uint8_t>::Write w = img_data[1].write(); + uint8_t *w = img_data[1].ptrw(); memcpy(w.ptr(), dataCbCr, 2 * new_width * new_height); ///TODO GLES2 doesn't support FORMAT_RG8, need to do some form of conversion diff --git a/modules/camera/camera_osx.mm b/modules/camera/camera_osx.mm index 658ddb728b..9a72174723 100644 --- a/modules/camera/camera_osx.mm +++ b/modules/camera/camera_osx.mm @@ -42,7 +42,7 @@ Ref<CameraFeed> feed; size_t width[2]; size_t height[2]; - PoolVector<uint8_t> img_data[2]; + Vector<uint8_t> img_data[2]; AVCaptureDeviceInput *input; AVCaptureVideoDataOutput *output; @@ -159,8 +159,8 @@ img_data[0].resize(new_width * new_height); } - PoolVector<uint8_t>::Write w = img_data[0].write(); - memcpy(w.ptr(), dataY, new_width * new_height); + uint8_t *w = img_data[0].ptrw(); + memcpy(w, dataY, new_width * new_height); img[0].instance(); img[0]->create(new_width, new_height, 0, Image::FORMAT_R8, img_data[0]); @@ -177,8 +177,8 @@ img_data[1].resize(2 * new_width * new_height); } - PoolVector<uint8_t>::Write w = img_data[1].write(); - memcpy(w.ptr(), dataCbCr, 2 * new_width * new_height); + uint8_t *w = img_data[1].ptrw(); + memcpy(w, dataCbCr, 2 * new_width * new_height); ///TODO GLES2 doesn't support FORMAT_RG8, need to do some form of conversion img[1].instance(); |