diff options
author | achaulk <achaulk@chromium.org> | 2015-06-10 10:01:35 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-10 17:02:07 +0000 |
commit | f89f594219da597c20b749fee195977052c6f709 (patch) | |
tree | f66bfd03b24b36698dd800323e86a160bd20e051 /cc/quads/stream_video_draw_quad.h | |
parent | 20a7d9f7cf570609d5314fbc6ab3b1514b9e3308 (diff) | |
download | chromium_src-f89f594219da597c20b749fee195977052c6f709.zip chromium_src-f89f594219da597c20b749fee195977052c6f709.tar.gz chromium_src-f89f594219da597c20b749fee195977052c6f709.tar.bz2 |
cc: Rework overlays to not use the ResourceProvider and pass texture size
Instead of querying the ResourceProvider, the size & overlay flag are
stored in the quads directly. This eliminates the lookups that were
otherwise required
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
TBR=jam (approved interface change)
Review URL: https://codereview.chromium.org/1142343008
Cr-Commit-Position: refs/heads/master@{#333748}
Diffstat (limited to 'cc/quads/stream_video_draw_quad.h')
-rw-r--r-- | cc/quads/stream_video_draw_quad.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/cc/quads/stream_video_draw_quad.h b/cc/quads/stream_video_draw_quad.h index faffd20..519c353 100644 --- a/cc/quads/stream_video_draw_quad.h +++ b/cc/quads/stream_video_draw_quad.h @@ -21,6 +21,8 @@ class CC_EXPORT StreamVideoDrawQuad : public DrawQuad { const gfx::Rect& opaque_rect, const gfx::Rect& visible_rect, unsigned resource_id, + gfx::Size resource_size_in_pixels, + bool allow_overlay, const gfx::Transform& matrix); void SetAll(const SharedQuadState* shared_quad_state, @@ -29,13 +31,29 @@ class CC_EXPORT StreamVideoDrawQuad : public DrawQuad { const gfx::Rect& visible_rect, bool needs_blending, unsigned resource_id, + gfx::Size resource_size_in_pixels, + bool allow_overlay, const gfx::Transform& matrix); gfx::Transform matrix; + struct OverlayResources { + OverlayResources(); + + gfx::Size size_in_pixels[Resources::kMaxResourceIdCount]; + bool allow_overlay[Resources::kMaxResourceIdCount]; + }; + OverlayResources overlay_resources; + static const StreamVideoDrawQuad* MaterialCast(const DrawQuad*); ResourceId resource_id() const { return resources.ids[kResourceIdIndex]; } + const gfx::Size& resource_size_in_pixels() const { + return overlay_resources.size_in_pixels[kResourceIdIndex]; + } + bool allow_overlay() const { + return overlay_resources.allow_overlay[kResourceIdIndex]; + } private: static const size_t kResourceIdIndex = 0; |