[PATCH 5/6] Revert "winemac.drv: Enable layer-backed views."

Tim Clem tclem at codeweavers.com
Thu Apr 21 15:04:33 CDT 2022


This reverts commit a5cf847aa45c38bae1500ef19a9bac38bbd8d5ba.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52354
Signed-off-by: Tim Clem <tclem at codeweavers.com>
---
 dlls/winemac.drv/cocoa_window.m | 21 +--------------------
 1 file changed, 1 insertion(+), 20 deletions(-)

diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m
index 6ccda75ac9f..5cf2ae6bc25 100644
--- a/dlls/winemac.drv/cocoa_window.m
+++ b/dlls/winemac.drv/cocoa_window.m
@@ -309,16 +309,6 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi
 @end
 
 
-#ifndef MAC_OS_X_VERSION_10_14
- at protocol NSViewLayerContentScaleDelegate <NSObject>
- at optional
-
-    - (BOOL) layer:(CALayer*)layer shouldInheritContentsScale:(CGFloat)newScale fromWindow:(NSWindow*)window;
-
- at end
-#endif
-
-
 @interface WineBaseView : NSView
 @end
 
@@ -335,7 +325,7 @@ - (id) initWithFrame:(NSRect)frame device:(id<MTLDevice>)device;
 #endif
 
 
- at interface WineContentView : WineBaseView <NSTextInputClient, NSViewLayerContentScaleDelegate>
+ at interface WineContentView : WineBaseView <NSTextInputClient>
 {
     NSMutableArray* glContexts;
     NSMutableArray* pendingGlContexts;
@@ -347,7 +337,6 @@ @interface WineContentView : WineBaseView <NSTextInputClient, NSViewLayerContent
     NSMutableAttributedString* markedText;
     NSRange markedTextSelection;
 
-    BOOL _retinaMode;
     int backingSize[2];
 
 #ifdef HAVE_METAL_METAL_H
@@ -699,15 +688,9 @@ - (void) setRetinaMode:(int)mode
         [self setWantsBestResolutionOpenGLSurface:mode];
         [self updateGLContexts];
 
-        _retinaMode = !!mode;
         [super setRetinaMode:mode];
     }
 
-    - (BOOL) layer:(CALayer*)layer shouldInheritContentsScale:(CGFloat)newScale fromWindow:(NSWindow*)window
-    {
-        return (_retinaMode || newScale == 1.0);
-    }
-
     - (void) viewDidHide
     {
         [super viewDidHide];
@@ -1019,7 +1002,6 @@ + (WineWindow*) createWindowWithFeatures:(const struct macdrv_window_features*)w
         contentView = [[[WineContentView alloc] initWithFrame:NSZeroRect] autorelease];
         if (!contentView)
             return nil;
-        [contentView setWantsLayer:YES];
         [contentView setAutoresizesSubviews:NO];
 
         /* We use tracking areas in addition to setAcceptsMouseMovedEvents:YES
@@ -3613,7 +3595,6 @@ macdrv_view macdrv_create_view(CGRect rect)
         NSNotificationCenter* nc = [NSNotificationCenter defaultCenter];
 
         view = [[WineContentView alloc] initWithFrame:NSRectFromCGRect(cgrect_mac_from_win(rect))];
-        [view setWantsLayer:YES];
         [view setAutoresizesSubviews:NO];
         [view setAutoresizingMask:NSViewNotSizable];
         [view setHidden:YES];
-- 
2.34.1




More information about the wine-devel mailing list