{"action":"created","issue":{"url":"https://api.github.com/repos/xbmc/xbmc/issues/8674","labels_url":"https://api.github.com/repos/xbmc/xbmc/issues/8674/labels{/name}","comments_url":"https://api.github.com/repos/xbmc/xbmc/issues/8674/comments","events_url":"https://api.github.com/repos/xbmc/xbmc/issues/8674/events","html_url":"https://github.com/xbmc/xbmc/pull/8674","id":123942299,"number":8674,"title":"do not hold graphicsContext lock during rendering","user":{"login":"FernetMenta","id":576009,"avatar_url":"https://avatars.githubusercontent.com/u/576009?v=3","gravatar_id":"","url":"https://api.github.com/users/FernetMenta","html_url":"https://github.com/FernetMenta","followers_url":"https://api.github.com/users/FernetMenta/followers","following_url":"https://api.github.com/users/FernetMenta/following{/other_user}","gists_url":"https://api.github.com/users/FernetMenta/gists{/gist_id}","starred_url":"https://api.github.com/users/FernetMenta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FernetMenta/subscriptions","organizations_url":"https://api.github.com/users/FernetMenta/orgs","repos_url":"https://api.github.com/users/FernetMenta/repos","events_url":"https://api.github.com/users/FernetMenta/events{/privacy}","received_events_url":"https://api.github.com/users/FernetMenta/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/xbmc/xbmc/labels/Improvement","name":"Improvement","color":"0b02e1"},{"url":"https://api.github.com/repos/xbmc/xbmc/labels/K*******","name":"K*******","color":"fbca04"},{"url":"https://api.github.com/repos/xbmc/xbmc/labels/Rendering%20Video","name":"Rendering Video","color":"009800"},{"url":"https://api.github.com/repos/xbmc/xbmc/labels/Video","name":"Video","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-12-26T18:03:48Z","updated_at":"2015-12-29T07:58:50Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/xbmc/xbmc/pulls/8674","html_url":"https://github.com/xbmc/xbmc/pull/8674","diff_url":"https://github.com/xbmc/xbmc/pull/8674.diff","patch_url":"https://github.com/xbmc/xbmc/pull/8674.patch"},"body":"graphicsContext lock is one of our most critical and responsible for many deadlocks. There are many cases where it is not used correctly. One of those cases is that it was used to protect calls to the gfx layer like glXX. No need for a lock here because only the render thread is allowed to call those. The application design is as follows:\r\n\r\n- manipulate some graphics object, can be done by any thread\r\n- render thread calls FrameMove(), this prepares the actual render method like copying system memory to GPU (PBOs). FrameMove() grabs the gfx lock\r\n- Render(), this calls the graphics layer functions like OpenGL, GLES, DX used to draw to the back buffer\r\n\r\nOne important thing we recently learned from Intel Mesa devs: An implementation is free to block in any of those function calls. Blocking in swapBuffers (what we assumed) is not mandatory. Now we don't want to hold the graphicsContext lock while blocking i.e. 41ms in glClear()."},"comment":{"url":"https://api.github.com/repos/xbmc/xbmc/issues/comments/167741840","html_url":"https://github.com/xbmc/xbmc/pull/8674#issuecomment-167741840","issue_url":"https://api.github.com/repos/xbmc/xbmc/issues/8674","id":167741840,"user":{"login":"FernetMenta","id":576009,"avatar_url":"https://avatars.githubusercontent.com/u/576009?v=3","gravatar_id":"","url":"https://api.github.com/users/FernetMenta","html_url":"https://github.com/FernetMenta","followers_url":"https://api.github.com/users/FernetMenta/followers","following_url":"https://api.github.com/users/FernetMenta/following{/other_user}","gists_url":"https://api.github.com/users/FernetMenta/gists{/gist_id}","starred_url":"https://api.github.com/users/FernetMenta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FernetMenta/subscriptions","organizations_url":"https://api.github.com/users/FernetMenta/orgs","repos_url":"https://api.github.com/users/FernetMenta/repos","events_url":"https://api.github.com/users/FernetMenta/events{/privacy}","received_events_url":"https://api.github.com/users/FernetMenta/received_events","type":"User","site_admin":false},"created_at":"2015-12-29T07:58:50Z","updated_at":"2015-12-29T07:58:50Z","body":"jenkins build this please"}}