summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-11-19 23:06:50 +0100
committerCarl Hetherington <cth@carlh.net>2020-01-08 21:56:47 +0100
commitedfb627f1226814ac804473b54d781ffd6db2700 (patch)
treef29ee9c3505f4fe34e188cc1e348bb3cc7d591f9
parent73713b742a2be95ea736d2d3d889f5b535a0f0f1 (diff)
Remove GL context accessor and hence lock.
-rw-r--r--src/wx/gl_video_view.cc19
-rw-r--r--src/wx/gl_video_view.h3
2 files changed, 3 insertions, 19 deletions
diff --git a/src/wx/gl_video_view.cc b/src/wx/gl_video_view.cc
index 3cf58757d..df45a143f 100644
--- a/src/wx/gl_video_view.cc
+++ b/src/wx/gl_video_view.cc
@@ -282,11 +282,8 @@ GLVideoView::thread ()
try
{
/* XXX_b: check all calls and signal emissions in this method & protect them if necessary */
- {
- boost::mutex::scoped_lock lm (_context_mutex);
- _context = new wxGLContext (_canvas);
- _canvas->SetCurrent (*_context);
- }
+ _context = new wxGLContext (_canvas);
+ _canvas->SetCurrent (*_context);
std::cout << "Here we go " << video_frame_rate() << " " << to_string(length()) << "\n";
@@ -314,10 +311,7 @@ try
dcpomatic_sleep_milliseconds (time_until_next_frame());
}
- {
- boost::mutex::scoped_lock lm (_context_mutex);
- delete _context;
- }
+ delete _context;
}
catch (boost::thread_interrupted& e)
{
@@ -326,13 +320,6 @@ catch (boost::thread_interrupted& e)
return;
}
-wxGLContext *
-GLVideoView::context () const
-{
- boost::mutex::scoped_lock lm (_context_mutex);
- return _context;
-}
-
bool
GLVideoView::display_next_frame (bool non_blocking)
{
diff --git a/src/wx/gl_video_view.h b/src/wx/gl_video_view.h
index 73db3535d..44a4057fd 100644
--- a/src/wx/gl_video_view.h
+++ b/src/wx/gl_video_view.h
@@ -52,12 +52,9 @@ private:
void paint ();
void draw ();
void thread ();
- wxGLContext* context () const;
wxGLCanvas* _canvas;
-
wxGLContext* _context;
- mutable boost::mutex _context_mutex;
GLuint _id;
boost::optional<dcp::Size> _size;