- Code: Select all
// Scale the canvas
canvas->scale(scale, scale);
// Paint into the canvas
WebKit::WebRect paintRect(0, offset, canvasWidth, canvasHeight);
web_frame->view()->layout();
web_frame->view()->paintWithoutClipping(canvas.get(), paintRect);
This worked great in CEF1 and delivered the desired result at very high quality. Is there any way for me to achieve the same result in CEF3 with OSR? Ideally, I want the browser to scale the content for me. (I tried scaling the resulting bitmap myself, but it looks terrible.)
I'm currently overriding GetViewRect and OnPaint. I took a look at the other methods in CefRenderHandler, but none of them jumped out as being helpful for this particular problem.