- Code: Select all
@Override
public void onPaint(CefBrowser browser,
boolean popup,
Rectangle[] dirtyRects,
ByteBuffer buffer,
int width,
int height) {
this.buffer = buffer;
this.lastOnPaintTimestampMillis = System.currentTimeMillis();
}
After I received the onLoadEnd() event, I immediately read the buffer and generate my PNG image from data in that buffer. This works very well when I created a single instance of my browser, but this fails as soon as I started introducing more instances. I verified the CefBrowser argument passed into the onPaint() method to be the browser object I am looking at. Am I doing something fundamentally wrong? Thanks