From: Carl Hetherington Date: Tue, 19 Nov 2019 22:06:50 +0000 (+0100) Subject: Remove GL context accessor and hence lock. X-Git-Tag: v2.15.40^2~29 X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=edfb627f1226814ac804473b54d781ffd6db2700 Remove GL context accessor and hence lock. --- 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 _size;