Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(551)

Issue 659683002: Include mask texture size in RenderPassDrawQuad (Closed)

Created:
6 years, 2 months ago by enne (OOO)
Modified:
6 years, 2 months ago
Reviewers:
danakj, jamesr, Tom Sepez
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, cc-bugs_chromium.org, chromium-reviews, darin (slow to review), darin-cc_chromium.org, jam, mkwst+moarreviews-ipc_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@update_mask_draw_quad_test
Project:
chromium
Visibility:
Public.

Description

Include mask texture size in RenderPassDrawQuad In order to support GL_TEXTURE_RECTANGLE_ARB, cc::GLRenderer needs to know the size of the mask texture to unnormalize the texture coordinates. This has already been done for TileDrawQuad. As an optimization, rather than adding two more members onto the already bloated RenderPassDrawQuad, turn mask_uv_rect into mask_uv_scale. The position of the mask is now assumed to always be at the origin of the quad's transform, which it always is in cc. This is equivalent to saying that the mask is always attached to the owning layer of a render surface (since that's what defines the transform origin of the render surface). By making this assumption, the old mask_uv_rect can be calculated in a helper function from just quad->rect and quad->mask_uv_scale. With this patch, mask_texture_size is currently unused, but its values are unit tested. Depends on https://codereview.chromium.org/652393002/ R=danakj@chromium.org,jamesr@chromium.org BUG=423533 Committed: https://crrev.com/f6f3fbba490a7529ddd9e82b979a966360e806ea Cr-Commit-Position: refs/heads/master@{#299932}

Patch Set 1 #

Total comments: 26

Patch Set 2 : danakj review #

Total comments: 8

Patch Set 3 : danakj review 2 #

Total comments: 2

Patch Set 4 : No ToEnclosedRect #

Unified diffs Side-by-side diffs Delta from patch set Stats (+278 lines, -144 lines) Patch
M cc/layers/delegated_renderer_layer_impl_unittest.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M cc/layers/layer_impl.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M cc/layers/layer_impl.cc View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M cc/layers/picture_layer_impl.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M cc/layers/picture_layer_impl.cc View 1 2 2 chunks +14 lines, -7 lines 0 comments Download
M cc/layers/picture_layer_impl_unittest.cc View 1 2 2 chunks +40 lines, -2 lines 0 comments Download
M cc/layers/render_surface_impl.cc View 1 2 3 chunks +9 lines, -16 lines 0 comments Download
M cc/layers/tiled_layer_impl.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M cc/layers/tiled_layer_impl.cc View 1 2 1 chunk +9 lines, -5 lines 0 comments Download
M cc/layers/tiled_layer_impl_unittest.cc View 1 2 1 chunk +4 lines, -1 line 0 comments Download
M cc/output/gl_renderer.cc View 1 2 chunks +11 lines, -16 lines 0 comments Download
M cc/output/renderer_pixeltest.cc View 1 7 chunks +29 lines, -23 lines 0 comments Download
M cc/output/software_renderer.cc View 1 2 3 1 chunk +5 lines, -5 lines 0 comments Download
M cc/quads/draw_quad_unittest.cc View 9 chunks +25 lines, -14 lines 0 comments Download
M cc/quads/render_pass_draw_quad.h View 1 3 chunks +9 lines, -3 lines 0 comments Download
M cc/quads/render_pass_draw_quad.cc View 1 2 6 chunks +22 lines, -6 lines 0 comments Download
M cc/quads/render_pass_unittest.cc View 1 chunk +4 lines, -3 lines 0 comments Download
M cc/surfaces/surface_aggregator.cc View 1 chunk +2 lines, -1 line 0 comments Download
M cc/surfaces/surface_aggregator_test_helpers.cc View 1 chunk +2 lines, -1 line 0 comments Download
M cc/test/render_pass_test_common.cc View 1 3 chunks +6 lines, -3 lines 0 comments Download
M cc/test/render_pass_test_utils.cc View 1 2 chunks +5 lines, -2 lines 0 comments Download
M cc/trees/layer_tree_host_impl_unittest.cc View 1 2 15 chunks +47 lines, -19 lines 0 comments Download
M cc/trees/layer_tree_host_unittest_delegated.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M content/common/cc_messages.h View 1 chunk +2 lines, -1 line 0 comments Download
M content/common/cc_messages_unittest.cc View 3 chunks +6 lines, -3 lines 0 comments Download
M mojo/converters/surfaces/surfaces_type_converters.cc View 1 3 chunks +9 lines, -3 lines 0 comments Download
M mojo/services/public/interfaces/surfaces/quads.mojom View 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 18 (3 generated)
enne (OOO)
6 years, 2 months ago (2014-10-15 01:08:52 UTC) #1
jamesr
mojo/ lgtm
6 years, 2 months ago (2014-10-15 03:06:29 UTC) #2
danakj
https://codereview.chromium.org/659683002/diff/1/cc/layers/render_surface_impl.cc File cc/layers/render_surface_impl.cc (right): https://codereview.chromium.org/659683002/diff/1/cc/layers/render_surface_impl.cc#newcode209 cc/layers/render_surface_impl.cc:209: mask_texture_size = mask_layer->content_bounds(); with implside painting this is the ...
6 years, 2 months ago (2014-10-15 15:33:35 UTC) #3
enne (OOO)
https://codereview.chromium.org/659683002/diff/1/cc/layers/render_surface_impl.cc File cc/layers/render_surface_impl.cc (right): https://codereview.chromium.org/659683002/diff/1/cc/layers/render_surface_impl.cc#newcode209 cc/layers/render_surface_impl.cc:209: mask_texture_size = mask_layer->content_bounds(); On 2014/10/15 15:33:34, danakj wrote: > ...
6 years, 2 months ago (2014-10-15 19:10:55 UTC) #4
danakj
https://codereview.chromium.org/659683002/diff/1/cc/output/software_renderer.cc File cc/output/software_renderer.cc (right): https://codereview.chromium.org/659683002/diff/1/cc/output/software_renderer.cc#newcode523 cc/output/software_renderer.cc:523: gfx::ToNearestRect(gfx::ScaleRect(quad->mask_uv_rect(), On 2014/10/15 19:10:54, enne wrote: > On 2014/10/15 ...
6 years, 2 months ago (2014-10-15 19:37:26 UTC) #5
enne (OOO)
https://codereview.chromium.org/659683002/diff/1/cc/output/software_renderer.cc File cc/output/software_renderer.cc (right): https://codereview.chromium.org/659683002/diff/1/cc/output/software_renderer.cc#newcode523 cc/output/software_renderer.cc:523: gfx::ToNearestRect(gfx::ScaleRect(quad->mask_uv_rect(), On 2014/10/15 19:37:26, danakj wrote: > On 2014/10/15 ...
6 years, 2 months ago (2014-10-15 19:49:03 UTC) #6
danakj
https://codereview.chromium.org/659683002/diff/40001/cc/output/software_renderer.cc File cc/output/software_renderer.cc (right): https://codereview.chromium.org/659683002/diff/40001/cc/output/software_renderer.cc#newcode522 cc/output/software_renderer.cc:522: SkRect mask_rect = gfx::RectToSkRect( SkMatrix::setRectToRect takes an SkRect which ...
6 years, 2 months ago (2014-10-15 19:53:06 UTC) #7
enne (OOO)
https://codereview.chromium.org/659683002/diff/40001/cc/output/software_renderer.cc File cc/output/software_renderer.cc (right): https://codereview.chromium.org/659683002/diff/40001/cc/output/software_renderer.cc#newcode522 cc/output/software_renderer.cc:522: SkRect mask_rect = gfx::RectToSkRect( On 2014/10/15 19:53:05, danakj wrote: ...
6 years, 2 months ago (2014-10-15 22:23:07 UTC) #8
danakj
LGTM
6 years, 2 months ago (2014-10-15 22:23:52 UTC) #9
enne (OOO)
inferno: content/common/cc_messages.h OWNERS? Just changing a RectF to a Vector2dF and a Size.
6 years, 2 months ago (2014-10-15 22:26:10 UTC) #11
enne (OOO)
tsepez: content/common/cc_messages.h OWNERS?
6 years, 2 months ago (2014-10-16 17:47:09 UTC) #13
Tom Sepez
Messages LGTM.
6 years, 2 months ago (2014-10-16 17:47:32 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/659683002/60001
6 years, 2 months ago (2014-10-16 17:57:10 UTC) #16
commit-bot: I haz the power
Committed patchset #4 (id:60001)
6 years, 2 months ago (2014-10-16 18:17:02 UTC) #17
commit-bot: I haz the power
6 years, 2 months ago (2014-10-16 18:19:28 UTC) #18
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/f6f3fbba490a7529ddd9e82b979a966360e806ea
Cr-Commit-Position: refs/heads/master@{#299932}

Powered by Google App Engine
This is Rietveld 408576698