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

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

Issue 10824141: Remove VideoDecoder::natural_size() & added VideoFrame::natural_size(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix copyright year. Created 8 years, 5 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
« no previous file with comments | « media/tools/scaler_bench/scaler_bench.cc ('k') | media/tools/shader_bench/gpu_color_painter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/tools/shader_bench/cpu_color_painter.cc
diff --git a/media/tools/shader_bench/cpu_color_painter.cc b/media/tools/shader_bench/cpu_color_painter.cc
index 95314d095f2a5c561cbcbafd325c9ff6e1be1123..b99b803a284717b517a1cefb3c251f9cbeeaf438 100644
--- a/media/tools/shader_bench/cpu_color_painter.cc
+++ b/media/tools/shader_bench/cpu_color_painter.cc
@@ -67,24 +67,24 @@ void CPUColorPainter::Paint(scoped_refptr<media::VideoFrame> video_frame) {
// Convert to RGB32 frame.
scoped_refptr<media::VideoFrame> rgba_frame =
media::VideoFrame::CreateFrame(media::VideoFrame::RGB32,
- video_frame->width(),
- video_frame->height(),
+ video_frame->data_size(),
+ video_frame->natural_size(),
base::TimeDelta());
media::ConvertYUVToRGB32(video_frame->data(media::VideoFrame::kYPlane),
video_frame->data(media::VideoFrame::kUPlane),
video_frame->data(media::VideoFrame::kVPlane),
rgba_frame->data(0),
- video_frame->width(),
- video_frame->height(),
+ video_frame->data_size().width(),
+ video_frame->data_size().height(),
video_frame->stride(media::VideoFrame::kYPlane),
video_frame->stride(media::VideoFrame::kUPlane),
rgba_frame->stride(0),
media::YV12);
glBindTexture(GL_TEXTURE_2D, textures_[0]);
- glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, rgba_frame->width(),
- rgba_frame->height(), GL_RGBA, GL_UNSIGNED_BYTE,
+ glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, rgba_frame->data_size().width(),
+ rgba_frame->data_size().height(), GL_RGBA, GL_UNSIGNED_BYTE,
rgba_frame->data(0));
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
« no previous file with comments | « media/tools/scaler_bench/scaler_bench.cc ('k') | media/tools/shader_bench/gpu_color_painter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698