Skip to content

Commit f5a19bc

Browse files
S1artiemagreenblatt
authored andcommitted
Fixed rounding problem with OSR screenshotting
1 parent 926b08f commit f5a19bc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

java/org/cef/browser/CefBrowserOsr.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,8 +466,8 @@ public boolean getScreenInfo(CefBrowser browser, CefScreenInfo screenInfo) {
466466

467467
@Override
468468
public CompletableFuture<BufferedImage> createScreenshot(boolean nativeResolution) {
469-
int width = (int) (canvas_.getWidth() * scaleFactor_);
470-
int height = (int) (canvas_.getHeight() * scaleFactor_);
469+
int width = (int) Math.ceil(canvas_.getWidth() * scaleFactor_);
470+
int height = (int) Math.ceil(canvas_.getHeight() * scaleFactor_);
471471

472472
// In order to grab a screenshot of the browser window, we need to get the OpenGL internals
473473
// from the GLCanvas that displays the browser.

0 commit comments

Comments
 (0)