Remove transformation to draw in normalized space from SkiaRenderer |
||
Issue descriptionWhen SkiaRenderer draws quads it sets the SkCanvas matrix as a concatenation of the window matrix, projection matrix, shared quad state's target transformation, and an additional matrix that makes the rectangle [-.5, .5]^2 map to the quad's coordinates. This complicates creating bulk image/rect drawing APIs in Skia as each quad uses a different matrix. By removing this final transformation all quads of a shared_quad_state can share a canvas matrix and we don't need a per rect/image matrix in the bulk APIs. Moreover, all rendered SkRects, shader matrices, and clips are adjusted to account for this normalization step and removing this transformation saves a little but of this conversion work.
,
Oct 9
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/cea393fd17815f581b1ac096df6eb7b11462ba64 commit cea393fd17815f581b1ac096df6eb7b11462ba64 Author: Brian Salomon <bsalomon@google.com> Date: Tue Oct 09 18:54:13 2018 [SkiaRenderer] Remove transformation to quad->rect in DoDrawQuad. Instead of operating in normalized [-1/2, 1/2]^2 space operate in the space after shared_quad_state->quad_to_target_transform is applied. This normalization step adds more downstream conversions to get to normalized space and makes calling a bulk image drawing API more complicated as each quad in a layer requires its own matrix. BUG= 893630 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel Change-Id: I79704d7fd9696abbec21e28add1e6d71a3b847aa Reviewed-on: https://chromium-review.googlesource.com/c/1264921 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: weiliangc <weiliangc@chromium.org> Cr-Commit-Position: refs/heads/master@{#598011} [modify] https://crrev.com/cea393fd17815f581b1ac096df6eb7b11462ba64/components/viz/service/display/skia_renderer.cc [modify] https://crrev.com/cea393fd17815f581b1ac096df6eb7b11462ba64/components/viz/service/display/skia_renderer.h
,
Oct 9
|
||
►
Sign in to add a comment |
||
Comment 1 by bsalo...@google.com
, Oct 9