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

Unified Diff: webkit/media/skcanvas_video_renderer.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 | « webkit/media/android/webmediaplayer_android.cc ('k') | webkit/media/skcanvas_video_renderer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/media/skcanvas_video_renderer.cc
diff --git a/webkit/media/skcanvas_video_renderer.cc b/webkit/media/skcanvas_video_renderer.cc
index 0dfa8e2673e4fdcb857527ac194ab5734230c2d2..5b8db9f7d37b3a2b34255cfd0148e10f299f31ba 100644
--- a/webkit/media/skcanvas_video_renderer.cc
+++ b/webkit/media/skcanvas_video_renderer.cc
@@ -109,19 +109,19 @@ static void FastPaint(
DCHECK_NE(0, dest_rect.width());
DCHECK_NE(0, dest_rect.height());
size_t frame_clip_width = local_dest_irect.width() *
- video_frame->width() / local_dest_irect_saved.width();
+ video_frame->data_size().width() / local_dest_irect_saved.width();
size_t frame_clip_height = local_dest_irect.height() *
- video_frame->height() / local_dest_irect_saved.height();
+ video_frame->data_size().height() / local_dest_irect_saved.height();
// Project the "left" and "top" of the final destination rect to local
// coordinates of the video frame, use these values to find the offsets
// in the video frame to start reading.
size_t frame_clip_left =
(local_dest_irect.fLeft - local_dest_irect_saved.fLeft) *
- video_frame->width() / local_dest_irect_saved.width();
+ video_frame->data_size().width() / local_dest_irect_saved.width();
size_t frame_clip_top =
(local_dest_irect.fTop - local_dest_irect_saved.fTop) *
- video_frame->height() / local_dest_irect_saved.height();
+ video_frame->data_size().height() / local_dest_irect_saved.height();
// Use the "left" and "top" of the destination rect to locate the offset
// in Y, U and V planes.
@@ -171,11 +171,11 @@ static void ConvertVideoFrameToBitmap(
// Check if |bitmap| needs to be (re)allocated.
if (bitmap->isNull() ||
- bitmap->width() != static_cast<int>(video_frame->width()) ||
- bitmap->height() != static_cast<int>(video_frame->height())) {
+ bitmap->width() != video_frame->data_size().width() ||
+ bitmap->height() != video_frame->data_size().height()) {
bitmap->setConfig(SkBitmap::kARGB_8888_Config,
- video_frame->width(),
- video_frame->height());
+ video_frame->data_size().width(),
+ video_frame->data_size().height());
bitmap->allocPixels();
bitmap->setIsVolatile(true);
}
@@ -188,8 +188,8 @@ static void ConvertVideoFrameToBitmap(
video_frame->data(media::VideoFrame::kUPlane),
video_frame->data(media::VideoFrame::kVPlane),
static_cast<uint8*>(bitmap->getPixels()),
- 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),
bitmap->rowBytes(),
« no previous file with comments | « webkit/media/android/webmediaplayer_android.cc ('k') | webkit/media/skcanvas_video_renderer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698