From 2cc14ef4d763e6ea07aef2b6f2d34330c714cd06 Mon Sep 17 00:00:00 2001 From: halx99 Date: Thu, 10 Sep 2020 21:41:52 +0800 Subject: [PATCH] Add comment --- cocos/renderer/backend/metal/Utils.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cocos/renderer/backend/metal/Utils.h b/cocos/renderer/backend/metal/Utils.h index 7997781a51..6d6796cf64 100644 --- a/cocos/renderer/backend/metal/Utils.h +++ b/cocos/renderer/backend/metal/Utils.h @@ -92,6 +92,14 @@ public: */ static void getTextureBytes(std::size_t origX, std::size_t origY, std::size_t rectWidth, std::size_t rectHeight, id texture, std::function callback); + /** + * Read a block of pixels from the given texture + * @param texture Specifies the texture to get the image. + * @param origX,origY Specify the window coordinates of the first pixel that is read from the given texture. This location is the lower left corner of a rectangular block of pixels. + * @param rectWidth,rectHeight Specify the dimensions of the pixel rectangle. rectWidth and rectHeight of one correspond to a single pixel. + * @param outbuffer, the output buffer for fill texels data + * @remark: !!!this function only can call after endFrame, then it's could be works well. + */ static void readPixels(id texture, std::size_t origX, std::size_t origY, std::size_t rectWidth, std::size_t rectHeight, PixelBufferDescriptor& outbuffer); /**