[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-devel
Subject: [PATCH 3/5] winemac.drv: Move GL context update code to -viewWillDraw method.
From: Chip Davis <cdavis () codeweavers ! com>
Date: 2021-08-31 22:27:35
Message-ID: 20210831222813.64320-4-cdavis () codeweavers ! com
[Download RAW message or body]
One of my goals with this series is getting rid of the -drawRect:
method. We shouldn't need it after we start setting surface contents
directly to layers.
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
---
dlls/winemac.drv/cocoa_window.m | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m
index 4d7aa570552..3eb8ec20877 100644
--- a/dlls/winemac.drv/cocoa_window.m
+++ b/dlls/winemac.drv/cocoa_window.m
@@ -491,9 +491,9 @@ - (BOOL) isFlipped
return YES;
}
- - (void) drawRect:(NSRect)rect
+ - (void) viewWillDraw
{
- WineWindow* window = (WineWindow*)[self window];
+ [super viewWillDraw];
for (WineOpenGLContext* context in pendingGlContexts)
{
@@ -506,6 +506,11 @@ - (void) drawRect:(NSRect)rect
}
[glContexts addObjectsFromArray:pendingGlContexts];
[pendingGlContexts removeAllObjects];
+ }
+
+ - (void) drawRect:(NSRect)rect
+ {
+ WineWindow* window = (WineWindow*)[self window];
if ([window contentView] != self)
return;
--
2.33.0
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic