Hi,
I'm developing an Android game and I've got the garbage collection to the point where it GC's only about once every 5 minutes or so, which I think is acceptable, for now.
The problem is that, every once in a while, I'll see this message in the logs:
08-29 09:58:46.410 W/copybit ( 1912): stretch_copybit::run_render fail
08-29 09:59:09.000 E/libs3c2drender( 1912): int
S3c2DRender::DoG2D(unsigned int, s3c_img*, s3c_rect*, unsigned int,
s3c_img*, s3c_rect*, int, int)::S3C_G2D_ROTATOR_18176 fail
And when this message comes up, my game seems to pause for about 100-200 milliseconds..
I'm currently using a Canvas to draw with, although if my memory is accurate, I've seen this same error message using Open GL as well.
Here's my code to draw the image object:
cachedMatrix.reset();
cachedMatrix.postTranslate(-halfImageWidth, -halfImageHeight);
cachedMatrix.postScale(localScaleX, localScaleY);
cachedMatrix.postTranslate(localOffset.x, localOffset.y);
float degrees = (radiansToDegrees(-rotation) + 360f) % 360f;
cachedMatrix.postRotate(degrees);
cachedMatrix.postTranslate(screenPos.x, screenPos.y);
canvas.drawBitmap(image, cachedMatrix, null);
Frankly, I am at a loss as to how to get around this. This is happening on my Samsung Moment phone.
Has anyone else encountered this issue ? And found a workaround or insights into why this is happening ?