{"action":"created","issue":{"url":"https://api.github.com/repos/servo/webrender/issues/565","repository_url":"https://api.github.com/repos/servo/webrender","labels_url":"https://api.github.com/repos/servo/webrender/issues/565/labels{/name}","comments_url":"https://api.github.com/repos/servo/webrender/issues/565/comments","events_url":"https://api.github.com/repos/servo/webrender/issues/565/events","html_url":"https://github.com/servo/webrender/pull/565","id":189930413,"number":565,"title":"Introduce a glyph cache thread.","user":{"login":"glennw","id":2350882,"avatar_url":"https://avatars.githubusercontent.com/u/2350882?v=3","gravatar_id":"","url":"https://api.github.com/users/glennw","html_url":"https://github.com/glennw","followers_url":"https://api.github.com/users/glennw/followers","following_url":"https://api.github.com/users/glennw/following{/other_user}","gists_url":"https://api.github.com/users/glennw/gists{/gist_id}","starred_url":"https://api.github.com/users/glennw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glennw/subscriptions","organizations_url":"https://api.github.com/users/glennw/orgs","repos_url":"https://api.github.com/users/glennw/repos","events_url":"https://api.github.com/users/glennw/events{/privacy}","received_events_url":"https://api.github.com/users/glennw/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-17T04:00:14Z","updated_at":"2016-11-17T18:50:52Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/servo/webrender/pulls/565","html_url":"https://github.com/servo/webrender/pull/565","diff_url":"https://github.com/servo/webrender/pull/565.diff","patch_url":"https://github.com/servo/webrender/pull/565.patch"},"body":"This is the first step towards making the glyph cache more efficient\r\nand also run asynchronously to allow rendering to continue if the\r\nglyph rasterizing becomes a bottleneck (e.g. during animated zooms).\r\n\r\nPreviously, we collected the list of glyphs that were required for\r\na frame, and ran a rayon loop to rasterize any that weren't in the\r\nglyph cache. However, this meant that the glyph rasterizion could\r\nnot start until we knew the list of all required glyphs.\r\n\r\nNow, all requests for text run glyphs are sent immediately to the\r\nglyph cache thread. The glyph cache thread uses a worker thread\r\npool to immediately begin rasterizing any uncached glyphs as soon\r\nas they are requested.\r\n\r\nIn the future, the idea is that instead of waiting at the block()\r\nmethod for all pending glyphs to be rasterized, the backend thread\r\nwill instead receive small numbers of glyphs as they are rasterized.\r\nThis will allow the backend thread to make a decision that glyph\r\nrasterizing is taking too long for this frame, and that we should\r\njust draw a frame with the currently cached glyph sizes available.\r\nWhen this occurs, the glyph cache thread will signal that a new frame\r\nshould be rendered when it completes rasterizing any pending glyphs.\r\nThis will allow us to keep rendering at 60fps during zoom, even\r\nif the glyph rasterizing threads can't keep up (at a quality\r\ntradeoff of using lower resolution glyphs).\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/servo/webrender/565)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/servo/webrender/issues/comments/261334040","html_url":"https://github.com/servo/webrender/pull/565#issuecomment-261334040","issue_url":"https://api.github.com/repos/servo/webrender/issues/565","id":261334040,"user":{"login":"pcwalton","id":157897,"avatar_url":"https://avatars.githubusercontent.com/u/157897?v=3","gravatar_id":"","url":"https://api.github.com/users/pcwalton","html_url":"https://github.com/pcwalton","followers_url":"https://api.github.com/users/pcwalton/followers","following_url":"https://api.github.com/users/pcwalton/following{/other_user}","gists_url":"https://api.github.com/users/pcwalton/gists{/gist_id}","starred_url":"https://api.github.com/users/pcwalton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcwalton/subscriptions","organizations_url":"https://api.github.com/users/pcwalton/orgs","repos_url":"https://api.github.com/users/pcwalton/repos","events_url":"https://api.github.com/users/pcwalton/events{/privacy}","received_events_url":"https://api.github.com/users/pcwalton/received_events","type":"User","site_admin":false},"created_at":"2016-11-17T18:50:52Z","updated_at":"2016-11-17T18:50:52Z","body":"cc @nikomatsakis"}}
{"actor":{"display_login":"pcwalton"}}