Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
fd04552f
Commit
fd04552f
authored
Nov 27, 2013
by
Ken Thomases
Committed by
Alexandre Julliard
Nov 28, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac: Move test for valid GL drawable into -[WineContentView addGLContext:].
Improves encapsulation. Avoids a round trip to the main thread.
parent
6d0d018b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
8 deletions
+13
-8
cocoa_opengl.m
dlls/winemac.drv/cocoa_opengl.m
+2
-7
cocoa_window.m
dlls/winemac.drv/cocoa_window.m
+11
-1
No files found.
dlls/winemac.drv/cocoa_opengl.m
View file @
fd04552f
...
...
@@ -123,16 +123,11 @@ void macdrv_make_context_current(macdrv_opengl_context c, macdrv_view v)
context
.
needsUpdate
=
FALSE
;
if
(
view
)
{
__block
BOOL
viewIsValidDrawable
;
macdrv_add_view_opengl_context
(
v
,
c
);
OnMainThread
(
^
{
viewIsValidDrawable
=
[[
view
window
]
windowNumber
]
>
0
&&
!
NSIsEmptyRect
([
view
visibleRect
]);
});
if
(
viewIsValidDrawable
)
if
(
context
.
needsUpdate
)
{
context
.
needsUpdate
=
FALSE
;
[
context
setView
:
view
];
[
context
setLatentView
:
nil
];
}
...
...
dlls/winemac.drv/cocoa_window.m
View file @
fd04552f
...
...
@@ -294,8 +294,18 @@ static inline NSUInteger adjusted_modifiers_for_option_behavior(NSUInteger modif
glContexts
=
[[
NSMutableArray
alloc
]
init
];
if
(
!
pendingGlContexts
)
pendingGlContexts
=
[[
NSMutableArray
alloc
]
init
];
if
([[
self
window
]
windowNumber
]
>
0
&&
!
NSIsEmptyRect
([
self
visibleRect
]))
{
[
glContexts
addObject
:
context
];
context
.
needsUpdate
=
TRUE
;
}
else
{
[
pendingGlContexts
addObject
:
context
];
[
self
setNeedsDisplay
:
YES
];
}
[(
WineWindow
*
)[
self
window
]
updateColorSpace
];
}
...
...
@@ -2407,7 +2417,7 @@ void macdrv_add_view_opengl_context(macdrv_view v, macdrv_opengl_context c)
WineContentView
*
view
=
(
WineContentView
*
)
v
;
WineOpenGLContext
*
context
=
(
WineOpenGLContext
*
)
c
;
OnMainThread
Async
(
^
{
OnMainThread
(
^
{
[
view
addGLContext
:
context
];
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment