Im registering my scheme with CefRegisterSchemeHandlerFactory("client", "myapp", new MySchemeHandlerFactory());
Are the headers already set in the request or do I have to manually set every field in the GetResponseHeaders? Or is CEF using some defaults here?
Currently I'm only setting the MimeType and the Status in the response header.
Edit:
Is there a way to tell the render process in CEF to redraw the screen or to manually set a dirty rect?
Or can someone post me a link to the standard file resource handler so I can compare it to my implementation to see if there is a difference?
I've just read the release notes from January 27, 2015 - there it says that webGl now can be used in ofscreen rendering. Is that exclusive to webGl or is it now possible to use hardware acceleration on any offscreen view?
Edit2:
I have done some further experimenting, and found something really weird.
As said above, I get a crash when I load with my custome ResourceHandler, but if I first draw the image on a second canvas, the use getPixelData and pass these to a WebGL texture, it works fine. Can someone explain me what is going on here?
Example:
- Code: Select all
// Throws an exception
image.src = "client://myapp/test.bmp";
//...
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image);
// Works fine
image.src = "file:////cef_binary_3.2171.1979_linux64/cefsimple/Debug/test.bmp";
//...
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image);
// Works fine
image.src = "client://myapp/test.bmp";
canvas1ctx.drawImage(image,0,0);
var imgData = canvas1ctx.getImageData(0,0,canvas.width,canvas.height);
//...
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, imgData);
I can attach the Stacktrace if someone is interested