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

Unified Diff: media/tools/shader_bench/gpu_color_painter.cc

Issue 11269017: Plumb through cropped output size for VideoFrame (Closed) Base URL: https://git.chromium.org/git/chromium/src@git-svn
Patch Set: Found the windows failure, and fixed it. Thanks akalin@ Created 8 years, 1 month 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
« no previous file with comments | « media/tools/shader_bench/cpu_color_painter.cc ('k') | media/tools/shader_bench/shader_bench.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/tools/shader_bench/gpu_color_painter.cc
diff --git a/media/tools/shader_bench/gpu_color_painter.cc b/media/tools/shader_bench/gpu_color_painter.cc
index a408de2013ddb92afdcfa28d16f923dccd3dce7d..17155ee009dec5f1243d5b085dfe6a5fcba57da3 100644
--- a/media/tools/shader_bench/gpu_color_painter.cc
+++ b/media/tools/shader_bench/gpu_color_painter.cc
@@ -104,8 +104,9 @@ void GPUColorWithLuminancePainter::Initialize(int width, int height) {
void GPUColorWithLuminancePainter::Paint(
scoped_refptr<media::VideoFrame> video_frame) {
- int width = video_frame->data_size().width();
- int height = video_frame->data_size().height();
+ // Not accounting for x/y offset presently.
+ int width = video_frame->visible_rect().width();
+ int height = video_frame->visible_rect().height();
for (unsigned int i = 0; i < kNumYUVPlanes; ++i) {
unsigned int plane_width =
(i == media::VideoFrame::kYPlane) ? width : width / 2;
« no previous file with comments | « media/tools/shader_bench/cpu_color_painter.cc ('k') | media/tools/shader_bench/shader_bench.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698