mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-20 07:17:32 +09:00
Issue #1667 - Part 3: Fix OpenGL load and runtime issues on Big Sur
This fix is included in NSPR 4.27 and Mozilla bug 1652330. Also put a main thread check in the cocoa draw callback.
This commit is contained in:
parent
de885df033
commit
11036811cb
2 changed files with 40 additions and 7 deletions
|
|
@ -3564,10 +3564,16 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
|||
// This method is called from mPixelHostingView's drawRect handler.
|
||||
- (void)doDrawRect:(NSRect)aRect
|
||||
{
|
||||
CGContextRef cgContext = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort];
|
||||
if (!NS_IsMainThread()) {
|
||||
// In the presence of CoreAnimation, this method can sometimes be called on
|
||||
// a non-main thread. Ignore those calls because Gecko can only react to
|
||||
// them on the main thread.
|
||||
return;
|
||||
}
|
||||
|
||||
if (!mGeckoChild || !mGeckoChild->IsVisible())
|
||||
return;
|
||||
CGContextRef cgContext = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort];
|
||||
|
||||
if ([self isUsingOpenGL]) {
|
||||
// Since this view is usually declared as opaque, the window's pixel
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue