diff options
author | ccameron <ccameron@chromium.org> | 2015-10-08 13:23:46 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-10-08 20:24:49 +0000 |
commit | 268c09fdae64b08957aba9b31797adb93525c90f (patch) | |
tree | f20a976b0b530e6338c631e8cd8cb6f29147458f /mojo/converters | |
parent | 0cd4698d5a49b556b859909210287b5019e84542 (diff) | |
download | chromium_src-268c09fdae64b08957aba9b31797adb93525c90f.zip chromium_src-268c09fdae64b08957aba9b31797adb93525c90f.tar.gz chromium_src-268c09fdae64b08957aba9b31797adb93525c90f.tar.bz2 |
cc: Remove redundant overlay arguments
Whether or not a quad can be made into an overlay is dependent on
whether there is a GLImage backing the texture resources that the quad
uses.
Prior to this patch, this information was passed along to the layer or
quad via a side-channel, in the form of a "allow overlay" argument.
Now, store this information in the cc::Resource, in particular, through
the cc::TextureMailbox that it is created from, and have the overlay
strategy query the property of the cc::Resource.
Add appropriate plumbing of the parameters from the cc::TextureMailbox,
through the cc::Resource, to cc::TransferableResource, and finally to
a cc::Resource in other compositors.
R=reveman,fsamuel,dcheng
TBR=danakj
BUG=533690
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1387283002
Cr-Commit-Position: refs/heads/master@{#353128}
Diffstat (limited to 'mojo/converters')
-rw-r--r-- | mojo/converters/surfaces/surfaces_type_converters.cc | 2 | ||||
-rw-r--r-- | mojo/converters/surfaces/tests/surface_unittest.cc | 16 |
2 files changed, 7 insertions, 11 deletions
diff --git a/mojo/converters/surfaces/surfaces_type_converters.cc b/mojo/converters/surfaces/surfaces_type_converters.cc index 6e901df..381c6d2 100644 --- a/mojo/converters/surfaces/surfaces_type_converters.cc +++ b/mojo/converters/surfaces/surfaces_type_converters.cc @@ -152,7 +152,7 @@ bool ConvertDrawQuad(const QuadPtr& input, texture_quad->SetAll( sqs, input->rect.To<gfx::Rect>(), input->opaque_rect.To<gfx::Rect>(), input->visible_rect.To<gfx::Rect>(), input->needs_blending, - texture_quad_state->resource_id, gfx::Size(), false, + texture_quad_state->resource_id, gfx::Size(), texture_quad_state->premultiplied_alpha, texture_quad_state->uv_top_left.To<gfx::PointF>(), texture_quad_state->uv_bottom_right.To<gfx::PointF>(), diff --git a/mojo/converters/surfaces/tests/surface_unittest.cc b/mojo/converters/surfaces/tests/surface_unittest.cc index 90aab3c58..30b1884 100644 --- a/mojo/converters/surfaces/tests/surface_unittest.cc +++ b/mojo/converters/surfaces/tests/surface_unittest.cc @@ -112,12 +112,10 @@ TEST_F(SurfaceLibQuadTest, TextureQuad) { float vertex_opacity[4] = {0.1f, 0.5f, 0.4f, 0.8f}; bool y_flipped = false; bool nearest_neighbor = false; - bool allow_overlay = false; texture_quad->SetAll(sqs, rect, opaque_rect, visible_rect, needs_blending, - resource_id, gfx::Size(), allow_overlay, - premultiplied_alpha, uv_top_left, uv_bottom_right, - background_color, vertex_opacity, y_flipped, - nearest_neighbor); + resource_id, gfx::Size(), premultiplied_alpha, + uv_top_left, uv_bottom_right, background_color, + vertex_opacity, y_flipped, nearest_neighbor); QuadPtr mojo_quad = Quad::From<cc::DrawQuad>(*texture_quad); ASSERT_FALSE(mojo_quad.is_null()); @@ -266,12 +264,10 @@ TEST(SurfaceLibTest, RenderPass) { float vertex_opacity[4] = {0.1f, 0.5f, 0.4f, 0.8f}; bool y_flipped = false; bool nearest_neighbor = false; - bool allow_overlay = false; texture_quad->SetAll(sqs, rect, opaque_rect, visible_rect, needs_blending, - resource_id, gfx::Size(), allow_overlay, - premultiplied_alpha, uv_top_left, uv_bottom_right, - background_color, vertex_opacity, y_flipped, - nearest_neighbor); + resource_id, gfx::Size(), premultiplied_alpha, + uv_top_left, uv_bottom_right, background_color, + vertex_opacity, y_flipped, nearest_neighbor); PassPtr mojo_pass = Pass::From(*pass); ASSERT_FALSE(mojo_pass.is_null()); |