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

Unified Diff: cc/quads/stream_video_draw_quad.h

Issue 1142343008: cc: Rework overlays to not use the ResourceProvider and pass texture size (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix more tests Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: cc/quads/stream_video_draw_quad.h
diff --git a/cc/quads/stream_video_draw_quad.h b/cc/quads/stream_video_draw_quad.h
index faffd20070aece0516b5b35aba47065775d1b10e..519c35363ed59c955cfaecefa8e865e5c6656564 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;

Powered by Google App Engine
This is Rietveld 408576698