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 /cc/quads/io_surface_draw_quad.cc | |
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 'cc/quads/io_surface_draw_quad.cc')
-rw-r--r-- | cc/quads/io_surface_draw_quad.cc | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/cc/quads/io_surface_draw_quad.cc b/cc/quads/io_surface_draw_quad.cc index 32e2ffc4..1ed0021 100644 --- a/cc/quads/io_surface_draw_quad.cc +++ b/cc/quads/io_surface_draw_quad.cc @@ -11,9 +11,7 @@ namespace cc { -IOSurfaceDrawQuad::IOSurfaceDrawQuad() - : orientation(FLIPPED), allow_overlay(false) { -} +IOSurfaceDrawQuad::IOSurfaceDrawQuad() : orientation(FLIPPED) {} void IOSurfaceDrawQuad::SetNew(const SharedQuadState* shared_quad_state, const gfx::Rect& rect, @@ -21,8 +19,7 @@ void IOSurfaceDrawQuad::SetNew(const SharedQuadState* shared_quad_state, const gfx::Rect& visible_rect, const gfx::Size& io_surface_size, unsigned io_surface_resource_id, - Orientation orientation, - bool allow_overlay) { + Orientation orientation) { bool needs_blending = false; DrawQuad::SetAll(shared_quad_state, DrawQuad::IO_SURFACE_CONTENT, rect, opaque_rect, visible_rect, needs_blending); @@ -30,7 +27,6 @@ void IOSurfaceDrawQuad::SetNew(const SharedQuadState* shared_quad_state, resources.ids[kIOSurfaceResourceIdIndex] = io_surface_resource_id; resources.count = 1; this->orientation = orientation; - this->allow_overlay = allow_overlay; } void IOSurfaceDrawQuad::SetAll(const SharedQuadState* shared_quad_state, @@ -40,15 +36,13 @@ void IOSurfaceDrawQuad::SetAll(const SharedQuadState* shared_quad_state, bool needs_blending, const gfx::Size& io_surface_size, unsigned io_surface_resource_id, - Orientation orientation, - bool allow_overlay) { + Orientation orientation) { DrawQuad::SetAll(shared_quad_state, DrawQuad::IO_SURFACE_CONTENT, rect, opaque_rect, visible_rect, needs_blending); this->io_surface_size = io_surface_size; resources.ids[kIOSurfaceResourceIdIndex] = io_surface_resource_id; resources.count = 1; this->orientation = orientation; - this->allow_overlay = allow_overlay; } const IOSurfaceDrawQuad* IOSurfaceDrawQuad::MaterialCast( |