Skip to content Skip to sidebar Skip to footer

Surfacetexture/surface Mapping With Anativewindow

Given a GraphicBufferProducer I create a Surface and then retrieve ANativeWindow. Using ANativeWindow_lock I get a pointer to the buffer. Using the buffer, I do a memcpy into the b

Solution 1:

I have a guess, although I've never used an ANativeWindow_Buffer. memcpy copies a certain number of bytes. How many bits per pixel is your image? If the value is greater than 8, you aren't transfering the full buffer. Since its probably 4 bytes per pixel (AARRGGBB), you probably need to multiply that by 4.


Post a Comment for "Surfacetexture/surface Mapping With Anativewindow"