mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-20 07:17:32 +09:00
parent
470a6e4401
commit
13fcc4a046
949 changed files with 95662 additions and 444 deletions
|
|
@ -30,6 +30,10 @@
|
|||
#include "ScopedGLHelpers.h"
|
||||
#include "TexUnpackBlob.h"
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
#include "ForceDiscreteGPUHelperCGL.h"
|
||||
#endif
|
||||
|
||||
// Local
|
||||
#include "WebGLContextLossHandler.h"
|
||||
#include "WebGLContextUnchecked.h"
|
||||
|
|
@ -2011,6 +2015,15 @@ protected:
|
|||
JSObject* WebGLObjectAsJSObject(JSContext* cx, const WebGLObjectType*,
|
||||
ErrorResult& rv) const;
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
// see bug 713305. This RAII helper guarantees that we're on the discrete GPU, during its lifetime
|
||||
// Debouncing note: we don't want to switch GPUs too frequently, so try to not create and destroy
|
||||
// these objects at high frequency. Having WebGLContext's hold one such object seems fine,
|
||||
// because WebGLContext objects only go away during GC, which shouldn't happen too frequently.
|
||||
// If in the future GC becomes much more frequent, we may have to revisit then (maybe use a timer).
|
||||
ForceDiscreteGPUHelperCGL mForceDiscreteGPUHelper;
|
||||
#endif
|
||||
|
||||
public:
|
||||
// console logging helpers
|
||||
void GenerateWarning(const char* fmt, ...);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue