Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
0484b127
Commit
0484b127
authored
May 03, 2010
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx_vout: Correctly change context after -lockgl.
And don't unlockgl if lockgl wasn't successful.
parent
6ef23b74
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
13 deletions
+16
-13
modules/video_output/macosx.m
modules/video_output/macosx.m
+16
-13
No files found.
modules/video_output/macosx.m
View file @
0484b127
...
@@ -419,7 +419,10 @@ static void OpenglSwap(vout_opengl_t *gl)
...
@@ -419,7 +419,10 @@ static void OpenglSwap(vout_opengl_t *gl)
-
(
BOOL
)
lockgl
-
(
BOOL
)
lockgl
{
{
VLCAssertMainThread
();
VLCAssertMainThread
();
CGLError
err
=
CGLLockContext
([[
self
openGLContext
]
CGLContextObj
]);
NSOpenGLContext
*
context
=
[
self
openGLContext
];
CGLError
err
=
CGLLockContext
([
context
CGLContextObj
]);
if
(
err
==
kCGLNoError
)
[
context
makeCurrentContext
];
return
err
==
kCGLNoError
;
return
err
==
kCGLNoError
;
}
}
...
@@ -493,21 +496,21 @@ static void OpenglSwap(vout_opengl_t *gl)
...
@@ -493,21 +496,21 @@ static void OpenglSwap(vout_opengl_t *gl)
}
}
}
}
[
self
lockgl
];
if
([
self
lockgl
])
{
glViewport
((
width
-
x
)
/
2
,
(
height
-
y
)
/
2
,
x
,
y
);
glViewport
((
width
-
x
)
/
2
,
(
height
-
y
)
/
2
,
x
,
y
);
@synchronized
(
self
)
{
// This may be cleared before -drawRect is being called,
@synchronized
(
self
)
{
// in this case we'll skip the rendering.
// This may be cleared before -drawRect is being called,
// This will save us for rendering two frames (or more) for nothing
// in this case we'll skip the rendering.
// (one by the vout, one (or more) by drawRect)
// This will save us for rendering two frames (or more) for nothing
_hasPendingReshape
=
YES
;
// (one by the vout, one (or more) by drawRect)
}
_hasPendingReshape
=
YES
;
}
[
self
unlockgl
];
[
self
unlockgl
];
[
super
reshape
];
[
super
reshape
];
}
}
}
/**
/**
...
...
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