Module 321090

1,475 characters · in no known chunk
Dependencies
Required by (2)
Lazily required by (0)none
Lazily requires (0)none
Source Raw
function(e,t,n){"use strict";n.d(t,{A:()=>O});var r=n(311907),i=n(73153),s=n(77729),a=n(626584),o=n(837921),l=n(206885),u=n(41984),c=n(680243);let d=new a.A("OverlayV3NativeGPUBoostManager"),_=new Set,f=!1,p=!1;function h(e,t){t?_.add(e):_.delete(e),A()}function m(e){p=e,A()}function E(){_.clear(),A()}function g(){return!p&&_.size>0}async function A(){try{let e=g();if(f===e||!l.O)return;let t=await s.A?.processUtils?.getGpuProcessId?.();if(null==t)return;o.Ay.SetGPUBoostEnabledByPid(t,e)&&(f=e),R.emitChange()}catch(e){e.message?.includes("IPC method called after context was released")&&E(),d.error("Error during GPU boost request flush:",e)}}function I(e){h(e.reason,e.enabled)}function T(e){let{enabled:t,mode:n}=e;n===u.x7.DisabledGPUBoost&&m(t),n===u.x7.ForceGPUBoost&&h(u.y7.DEV_FORCED_GPU_BOOST,t)}function S(){E()}function y(e){h(u.y7.OVERLAY_UNLOCKED,!e.locked)}function v(){o.Ay.IsHardwareAcceleratedGPUSchedulingEnabled()&&h(u.y7.HARDWARE_ACCELERATED_GPU_SCHEDULING_ENABLED,!0),h(u.y7.OVERLAY_RENDERING,!0)}function N(){E()}class C extends r.Ay.Store{static displayName="Overlay-v3-Native-GPU-Boost-Store";initialize(){this.waitFor(c.A)}getGPUBoostRequests(){return _}isGPUBoosted(){return f}getIsDisabledGPUBoost(){return p}}let R=new C(i.h,__OVERLAY__||!l.O?{}:{OVERLAY_SET_GPU_BOOST_REQUESTED:I,OVERLAY_RENDER_DEBUG_MODE:T,OVERLAY_CRASHED:S,OVERLAY_V3_CREATE_WINDOW_HANDLE_SUCCESS:v,OVERLAY_V3_NATIVE_DESTROY_HOST_WINDOW:N,OVERLAY_SET_INPUT_LOCKED:y}),O=R}