GPUImage icon indicating copy to clipboard operation
GPUImage copied to clipboard

GPUImagePicture incorrectly initializes variable

Open peterhwong opened this issue 14 years ago • 1 comments

Hey Brad, In GPUImagePicture's initWithImage, I think this:

BOOL shouldRedrawUsingCoreGraphics = YES;

should be set to NO right? Otherwise you'll always create a buffer the size of the image to copy it to even when it's the same size.

Thanks Peter

peterhwong avatar Sep 26 '12 17:09 peterhwong

No, the reason why I do that is that the alternate pathway is actually slower than the redrawing one. I've left that code in there in case I find out why this is, but I block off that branch for execution at all times. I feel like there's something I'm missing there.

In both cases, an image-sized buffer is created to hold a copy of the image, so there wasn't any notable memory savings the last time I benchmarked this.

BradLarson avatar Sep 26 '12 23:09 BradLarson