Skip to content

Commit

Permalink
set windowless frame rate via settings
Browse files Browse the repository at this point in the history
  • Loading branch information
1zun4 committed Nov 16, 2023
1 parent 24d2ebf commit 16d6f80
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions native/CefBrowser_N.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -936,6 +936,7 @@ void create(std::shared_ptr<JNIObjectsForCreate> objs,
if (transparent == JNI_FALSE) {
// Specify an opaque background color (white) to disable transparency.
settings.background_color = CefColorSetARGB(255, 255, 255, 255);
settings.windowless_frame_rate = 120;
}

CefRefPtr<CefBrowser> browserObj;
Expand Down Expand Up @@ -1533,9 +1534,6 @@ Java_org_cef_browser_CefBrowser_1N_N_1WasResized(JNIEnv* env,
jint height) {
CefRefPtr<CefBrowser> browser = JNI_GET_BROWSER_OR_RETURN(env, obj);

// Set windowless frame rate to 120
browser->GetHost().get()->SetWindowlessFrameRate(120);

if (browser->GetHost()->IsWindowRenderingDisabled()) {
browser->GetHost()->WasResized();
}
Expand Down

0 comments on commit 16d6f80

Please sign in to comment.