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

Unified Diff: cc/quads/stream_video_draw_quad.cc

Issue 2683763003: cc: make resource keep video buffer format for hardware overlay.
Patch Set: plumbing video format to ozone Created 3 years, 10 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.cc
diff --git a/cc/quads/stream_video_draw_quad.cc b/cc/quads/stream_video_draw_quad.cc
index 7760168a02c1bec9f62f2b91f9c482bf9731ceb6..a72e26833731c69776ec9a2c4bfdce88657bbb7a 100644
--- a/cc/quads/stream_video_draw_quad.cc
+++ b/cc/quads/stream_video_draw_quad.cc
@@ -20,6 +20,7 @@ void StreamVideoDrawQuad::SetNew(const SharedQuadState* shared_quad_state,
const gfx::Rect& visible_rect,
unsigned resource_id,
gfx::Size resource_size_in_pixels,
+ gfx::BufferFormat format,
const gfx::Transform& matrix) {
bool needs_blending = false;
DrawQuad::SetAll(shared_quad_state, DrawQuad::STREAM_VIDEO_CONTENT, rect,
@@ -27,6 +28,7 @@ void StreamVideoDrawQuad::SetNew(const SharedQuadState* shared_quad_state,
resources.ids[kResourceIdIndex] = resource_id;
overlay_resources.size_in_pixels[kResourceIdIndex] = resource_size_in_pixels;
resources.count = 1;
+ this->format = format;
this->matrix = matrix;
}
@@ -37,12 +39,14 @@ void StreamVideoDrawQuad::SetAll(const SharedQuadState* shared_quad_state,
bool needs_blending,
unsigned resource_id,
gfx::Size resource_size_in_pixels,
+ gfx::BufferFormat format,
const gfx::Transform& matrix) {
DrawQuad::SetAll(shared_quad_state, DrawQuad::STREAM_VIDEO_CONTENT, rect,
opaque_rect, visible_rect, needs_blending);
resources.ids[kResourceIdIndex] = resource_id;
overlay_resources.size_in_pixels[kResourceIdIndex] = resource_size_in_pixels;
resources.count = 1;
+ this->format = format;
this->matrix = matrix;
}
@@ -55,6 +59,7 @@ const StreamVideoDrawQuad* StreamVideoDrawQuad::MaterialCast(
void StreamVideoDrawQuad::ExtendValue(
base::trace_event::TracedValue* value) const {
value->SetInteger("resource_id", resources.ids[kResourceIdIndex]);
+ value->SetInteger("format", static_cast<int>(format));
MathUtil::AddToTracedValue("matrix", matrix, value);
}

Powered by Google App Engine
This is Rietveld 408576698