Chip Davis : winemac.drv: Remove now unused -[WineContentView drawRect:].

Alexandre Julliard julliard at winehq.org
Wed Sep 1 15:45:10 CDT 2021


Module: wine
Branch: master
Commit: 3f845b34deada0dd58e3674119af47ce85851c24
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=3f845b34deada0dd58e3674119af47ce85851c24

Author: Chip Davis <cdavis at codeweavers.com>
Date:   Wed Sep  1 09:28:24 2021 -0500

winemac.drv: Remove now unused -[WineContentView drawRect:].

Signed-off-by: Chip Davis <cdavis at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/winemac.drv/cocoa_window.m | 64 -----------------------------------------
 1 file changed, 64 deletions(-)

diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m
index 85e13b5823f..eec750706a8 100644
--- a/dlls/winemac.drv/cocoa_window.m
+++ b/dlls/winemac.drv/cocoa_window.m
@@ -556,70 +556,6 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi
         [pendingGlContexts removeAllObjects];
     }
 
-    - (void) drawRect:(NSRect)rect
-    {
-        WineWindow* window = (WineWindow*)[self window];
-
-        if ([window contentView] != self)
-            return;
-
-        if (window.surface && window.surface_mutex &&
-            !pthread_mutex_lock(window.surface_mutex))
-        {
-            const CGRect* rects;
-            int count;
-
-            if (get_surface_blit_rects(window.surface, &rects, &count))
-            {
-                CGRect dirtyRect = cgrect_win_from_mac(NSRectToCGRect(rect));
-                NSAffineTransform* xform = [NSAffineTransform transform];
-                CGContextRef context;
-                int i;
-
-                [xform translateXBy:0.0 yBy:self.bounds.size.height];
-                [xform scaleXBy:1.0 yBy:-1.0];
-                [xform concat];
-
-                context = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort];
-                CGContextSetBlendMode(context, kCGBlendModeCopy);
-                CGContextSetInterpolationQuality(context, retina_on ? kCGInterpolationHigh : kCGInterpolationNone);
-
-                for (i = 0; i < count; i++)
-                {
-                    CGRect imageRect;
-                    CGImageRef image;
-
-                    imageRect = CGRectIntersection(rects[i], dirtyRect);
-                    image = create_surface_image(window.surface, &imageRect, FALSE, window.colorKeyed,
-                                                 window.colorKeyRed, window.colorKeyGreen, window.colorKeyBlue);
-
-                    if (image)
-                    {
-                        // Account for the flipped coordinate system.
-                        imageRect = cgrect_mac_from_win(imageRect);
-                        imageRect.origin.y = self.bounds.size.height - imageRect.origin.y - imageRect.size.height;
-                        CGContextDrawImage(context, imageRect, image);
-
-                        CGImageRelease(image);
-                    }
-                }
-
-                [window windowDidDrawContent];
-            }
-
-            pthread_mutex_unlock(window.surface_mutex);
-        }
-
-        // If the window may be transparent, then we have to invalidate the
-        // shadow every time we draw.  Also, if this is the first time we've
-        // drawn since changing from transparent to opaque.
-        if (window.drawnSinceShown && (window.colorKeyed || window.usePerPixelAlpha || window.shapeChangedSinceLastDraw))
-        {
-            window.shapeChangedSinceLastDraw = FALSE;
-            [window invalidateShadow];
-        }
-    }
-
     - (void) addGLContext:(WineOpenGLContext*)context
     {
         BOOL hadContext = _everHadGLContext;




More information about the wine-cvs mailing list