Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
8a11b3c
mbedTLS fix for cURL 8.8.0
Lpsd May 24, 2024
181bf0f
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd May 24, 2024
6728cbe
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd May 25, 2024
0b989ac
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd May 26, 2024
9c19509
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd Jun 2, 2024
75c36ed
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd Jun 19, 2024
96dd1ee
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd Oct 2, 2024
f9eaf3f
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd Oct 8, 2024
54bd11b
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd Oct 10, 2024
ddee2d0
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd Oct 19, 2024
288b8db
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd Oct 21, 2024
b30a4a2
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd Oct 22, 2024
27b9eae
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd Dec 17, 2024
3731d81
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd Jan 14, 2025
b50a68c
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd Jan 22, 2025
58ae23f
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd Feb 19, 2025
f3645b8
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd Mar 4, 2025
e62d9f4
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd Mar 14, 2025
3346e9c
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd Mar 16, 2025
95dfc97
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd Sep 6, 2025
3307dc6
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd Sep 14, 2025
f091a85
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd Sep 24, 2025
c66e5de
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd Nov 7, 2025
c132ae1
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd Nov 9, 2025
5739ef0
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd Jan 7, 2026
4e8d1c0
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd Jan 7, 2026
27d7fd7
Merge branch 'master' of https://github.com/multitheftauto/mtasa-blue
Lpsd Jan 13, 2026
ee4475e
External begin frame scheduling
Lpsd Jan 13, 2026
d728302
Optimize dirty rect handling
Lpsd Jan 13, 2026
a84d11c
Use D3DPOOL_DEFAULT with D3DUSAGE_DYNAMIC
Lpsd Jan 13, 2026
ab0bcbf
Browser lazy loading
Lpsd Jan 13, 2026
7d5c788
Video decode acceleration & gpu compositing
Lpsd Jan 14, 2026
0ff9e41
Mouse input throttling & dirty rect optimizations
Lpsd Jan 14, 2026
eefc173
Lazy loading fixes
Lpsd Jan 14, 2026
701b0a9
Remove outdated wine comment
Lpsd Jan 14, 2026
3388945
Revert OnPaint dirty rect optimization from 0ff9e41d5
Lpsd Jan 14, 2026
2090d12
Improve CWebView::UpdateTexture edge cases
Lpsd Jan 14, 2026
624f063
Remove dirty rect processing & improve restore
Lpsd Jan 14, 2026
cbcd8cf
Merge branch 'master' into cef-performance
Lpsd Mar 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions Client/cefweb/CWebApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ namespace
// Prevent Chromium from dropping privileges; required for elevated launches (see chromium/3960)
commandLine->AppendSwitch("do-not-de-elevate");

// Must apply essential CEF switches regardless of WebCore availability
commandLine->AppendSwitch("disable-gpu-compositing");
// Enable external begin frame scheduling for MTA-controlled rendering
commandLine->AppendSwitch("enable-begin-frame-scheduling");
// Explicitly block account sign-in to avoid crashes when Google API keys are registered on the system
commandLine->AppendSwitchWithValue("allow-browser-signin", "false");
Expand All @@ -71,6 +70,7 @@ namespace
}

bool disableGpu = false;
bool enableVideoAccel = true;
if (g_pCore && IsReadablePointer(g_pCore, sizeof(void*)))
{
auto* cvars = g_pCore->GetCVars();
Expand All @@ -79,6 +79,8 @@ namespace
bool gpuEnabled = true;
cvars->Get("browser_enable_gpu", gpuEnabled);
disableGpu = !gpuEnabled;

cvars->Get("browser_enable_video_acceleration", enableVideoAccel);
}
}

Expand All @@ -92,19 +94,31 @@ namespace
else
{
// In Wine, we generally want to try GPU (DXVK handles it well)
// But disable-gpu-compositing is already set above which is key
// If user hasn't explicitly disabled GPU in cvars, let it run
}
}

if (disableGpu)
{
commandLine->AppendSwitch("disable-gpu");
// Also disable GPU compositing when GPU is disabled
commandLine->AppendSwitch("disable-gpu-compositing");
}

// Hardware video decoding - enable when GPU is enabled and video acceleration is requested
if (!disableGpu && enableVideoAccel)
{
commandLine->AppendSwitch("enable-accelerated-video-decode");
}
}
} // namespace

[[nodiscard]] CefRefPtr<CefResourceHandler> CWebApp::HandleError(const SString& strError, unsigned int uiError)
{
auto stream = CefStreamReader::CreateForData((void*)strError.c_str(), strError.length());
auto stream = CefStreamReader::CreateForData(
(void*)strError.c_str(),
strError.length()
);
if (!stream)
return nullptr;
return CefRefPtr<CefResourceHandler>(new CefStreamResourceHandler(uiError, strError, "text/plain", CefResponse::HeaderMap(), stream));
Expand Down
15 changes: 14 additions & 1 deletion Client/cefweb/CWebCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,20 @@ void CWebCore::DoEventQueuePulse()
event.callback();
}

// Invoke paint method if necessary on the main thread
// Request new frames from CEF using external begin frame scheduling
// This synchronizes CEF rendering with MTA's render loop, eliminating
// the previous 250ms blocking wait in OnPaint
for (auto& view : m_WebViews)
{
if (view->IsBeingDestroyed() || view->GetRenderingPaused())
continue;

auto browser = view->GetCefBrowser();
if (browser)
browser->GetHost()->SendExternalBeginFrame();
}

// Copy rendered data to D3D textures on the main thread
for (auto& view : m_WebViews)
{
view->UpdateTexture();
Expand Down
Loading
Loading