feat: remove osr framerate limit when use shared texture (#45781)

feat: remove framerate limit, if use shared texture osr.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: reito <cnschwarzer@qq.com>
This commit is contained in:
trop[bot] 2025-02-25 08:12:25 +01:00 committed by GitHub
parent a9c535d900
commit c32fcdfede
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -14,7 +14,7 @@ _Notes_:
* There are two rendering modes that can be used (see the section below) and only
the dirty area is passed to the `paint` event to be more efficient.
* You can stop/continue the rendering as well as set the frame rate.
* The maximum frame rate is 240 because greater values bring only performance
* When `webPreferences.offscreen.useSharedTexture` is not `true`, the maximum frame rate is 240 because greater values bring only performance
losses with no benefits.
* When nothing is happening on a webpage, no frames are generated.
* An offscreen window is always created as a

View file

@ -918,7 +918,7 @@ void OffScreenRenderWidgetHostView::SetFrameRate(int frame_rate) {
} else {
if (frame_rate <= 0)
frame_rate = 1;
if (frame_rate > 240)
if (!offscreen_use_shared_texture_ && frame_rate > 240)
frame_rate = 240;
frame_rate_ = frame_rate;