{"action":"created","issue":{"url":"https://api.github.com/repos/servo/webrender/issues/2694","repository_url":"https://api.github.com/repos/servo/webrender","labels_url":"https://api.github.com/repos/servo/webrender/issues/2694/labels{/name}","comments_url":"https://api.github.com/repos/servo/webrender/issues/2694/comments","events_url":"https://api.github.com/repos/servo/webrender/issues/2694/events","html_url":"https://github.com/servo/webrender/pull/2694","id":317901325,"number":2694,"title":"Allow texture cache entries to store non-rectangular UVs.","user":{"login":"glennw","id":2350882,"avatar_url":"https://avatars0.githubusercontent.com/u/2350882?v=4","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":1,"created_at":"2018-04-26T07:01:17Z","updated_at":"2018-04-26T08:37:26Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/servo/webrender/pulls/2694","html_url":"https://github.com/servo/webrender/pull/2694","diff_url":"https://github.com/servo/webrender/pull/2694.diff","patch_url":"https://github.com/servo/webrender/pull/2694.patch"},"body":"Most of the time, UVs are stored as a (top left, bottom right) pair\r\nof coordinates in the texture cache. The exception to this is when\r\nwe have an off-screen render target that was transformed.\r\n\r\nIn this case, we need access to the four corners within the render\r\nsurface in order to generate correct UVs when we composite that\r\nsurface into the framebuffer.\r\n\r\nPreviously, we generated these in the brush shader by transforming\r\nthe vertex position, and using that to generate a screen space\r\ntexture coordinate.\r\n\r\nThis patch removes that code, and instead does the calculation of\r\nthe four corner UVs during render task generation on the CPU. The\r\ncorner coordinates are then stored in the texture cache entry, and\r\nthe shaders do a simple bilerp to find the correct UV at each vertex\r\nwhen drawing these images.\r\n\r\nThis has a number of benefits:\r\n * We can draw a screen-space rendered surface at any location now\r\n   with the same logic (we don't need hacks for applying local offsets\r\n   etc when drawing drop-shadows).\r\n * Most importantly, when we store an off-screen surface in the texture\r\n   cache for use on subsequent frames, the shader that draws that doesn't\r\n   need to know anything about the transform of the surface when it was\r\n   rendered. This means the screen-space UV generation doesn't rely\r\n   on access to the clip-scroll node transform of the source surface.\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/2694)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/servo/webrender/issues/comments/384559956","html_url":"https://github.com/servo/webrender/pull/2694#issuecomment-384559956","issue_url":"https://api.github.com/repos/servo/webrender/issues/2694","id":384559956,"user":{"login":"glennw","id":2350882,"avatar_url":"https://avatars0.githubusercontent.com/u/2350882?v=4","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},"created_at":"2018-04-26T08:37:26Z","updated_at":"2018-04-26T08:37:26Z","author_association":"MEMBER","body":"Hmmm, quite a lot of orange on the try run.\r\n\r\nI'm not sure if they are related to this PR or something else that got merged today.\r\n\r\nI'll investigate further in the morning.\r\n"}}
{"actor":{"display_login":"glennw"}}