WebRendererApp.cpp 1.49 KB
Newer Older
Shockfire's avatar
Shockfire committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
/*
Code was used from NoFaTe (http://nofate.me)
*/
#include "WebRendererApp.hpp"

using namespace Anvil::Client::Rendering;

void WebRendererApp::OnRegisterCustomSchemes(CefRefPtr<CefSchemeRegistrar> p_Registrar)
{
}

CefRefPtr<CefBrowserProcessHandler> WebRendererApp::GetBrowserProcessHandler()
{
	//WriteLog("GetBrowserProcessHandler.");
	return this;
}

CefRefPtr<CefRenderProcessHandler> WebRendererApp::GetRenderProcessHandler()
{
	//WriteLog("GetRenderProcessHandler.");
	return this;
}

void WebRendererApp::OnContextInitialized()
{
	//WriteLog("OnContextInitialized.");
}

void WebRendererApp::OnContextCreated(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefV8Context> context)
{
	//WriteLog("OnContextCreated.");
}

void WebRendererApp::OnBeforeCommandLineProcessing(const CefString& process_type, CefRefPtr<CefCommandLine> command_line)
{
	// CEF will NOT shut down properly unless this switch is passed
	// See https://bitbucket.org/chromiumembedded/cef/issues/1680/windows-2454-crash-on-shutdown-with-multi
	command_line->AppendSwitch("disable-extensions");
39 40 41 42 43 44

	// These switches make performance significantly faster, especially at high resolutions
	// See https://bitbucket.org/chromiumembedded/cef/commits/e3c1d8632eb43c1c2793d71639f3f5695696a5e8
	command_line->AppendSwitch("disable-gpu");
	command_line->AppendSwitch("disable-gpu-compositing");
	command_line->AppendSwitch("enable-begin-frame-scheduling");
45
	command_line->AppendSwitch("enable-experimental-web-platform-features");
Shockfire's avatar
Shockfire committed
46
}