Browse Source

Revert "macOS: Set CALayer format to fix Big Sur invalidation region"

This reverts commit a6217ae9fb.
tags/2021-05-28
Tom Poole 5 years ago
parent
commit
9e4fceb031
1 changed files with 0 additions and 13 deletions
  1. +0
    -13
      modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm

+ 0
- 13
modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm View File

@@ -1646,7 +1646,6 @@ struct JuceNSViewClass : public ObjCClass<NSView>
addMethod (@selector (wantsDefaultClipping), wantsDefaultClipping, "c@:");
addMethod (@selector (worksWhenModal), worksWhenModal, "c@:");
addMethod (@selector (viewDidMoveToWindow), viewDidMoveToWindow, "v@:");
addMethod (@selector (viewWillDraw), viewWillDraw, "v@:");
addMethod (@selector (keyDown:), keyDown, "v@:@");
addMethod (@selector (keyUp:), keyUp, "v@:@");
addMethod (@selector (insertText:), insertText, "v@:@");
@@ -1759,18 +1758,6 @@ private:
static void frameChanged (id self, SEL, NSNotification*) { if (auto* p = getOwner (self)) p->redirectMovedOrResized(); }
static void viewDidMoveToWindow (id self, SEL) { if (auto* p = getOwner (self)) p->viewMovedToWindow(); }
static void viewWillDraw (id self, SEL)
{
// Without setting contentsFormat macOS Big Sur will always set the invalid area
// to be the entire frame.
#if defined (MAC_OS_X_VERSION_10_12) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_12
CALayer* layer = ((NSView*) self).layer;
layer.contentsFormat = kCAContentsFormatRGBA8Uint;
#endif
sendSuperclassMessage<void> (self, @selector (viewWillDraw));
}
static void windowWillMiniaturize (id self, SEL, NSNotification*)
{
if (auto* p = getOwner (self))


Loading…
Cancel
Save