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

Unified Diff: cc/video_layer_impl.cc

Issue 11413005: YUV software decode path stride fixes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: <WIP> 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 | « no previous file | media/base/video_frame.cc » ('j') | media/base/video_frame.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/video_layer_impl.cc
diff --git a/cc/video_layer_impl.cc b/cc/video_layer_impl.cc
index 9930a0c4eac8bd4b7e0dac633d74d82951699d99..48b7d4569a0c7377e6428368e3c4dd1a2099caae 100644
--- a/cc/video_layer_impl.cc
+++ b/cc/video_layer_impl.cc
@@ -287,7 +287,7 @@ void VideoLayerImpl::didDraw(ResourceProvider* resourceProvider)
}
static gfx::Size videoFrameDimension(media::VideoFrame* frame, int plane) {
- gfx::Size dimensions = frame->coded_size();
+ gfx::Size dimensions = gfx::Size(frame->coded_size());
Ami GONE FROM CHROMIUM 2012/11/16 22:15:43 lolwat?
sheu 2012/11/17 00:35:39 You're looking at a CL 2 revisions old :-)
switch (frame->format()) {
case media::VideoFrame::YV12:
if (plane != media::VideoFrame::kYPlane) {
@@ -372,8 +372,9 @@ bool VideoLayerImpl::copyPlaneData(ResourceProvider* resourceProvider)
// Only non-FormatNativeTexture planes should need upload.
DCHECK_EQ(plane.format, GL_LUMINANCE);
const uint8_t* softwarePlanePixels = m_frame->data(planeIndex);
- gfx::Rect planeRect(gfx::Point(), plane.size);
- resourceProvider->setPixels(plane.resourceId, softwarePlanePixels, planeRect, planeRect, gfx::Vector2d());
+ gfx::Rect imageRect(0, 0, m_frame->stride(planeIndex), plane.size.height());
Ami GONE FROM CHROMIUM 2012/11/16 22:15:43 since this is going to copy anyway why not crop th
sheu 2012/11/17 00:35:39 Using m_frame->stride() here is just slightly hack
Ami GONE FROM CHROMIUM 2012/11/17 00:41:37 Why? ISTM the cleanest thing would be to make the
sheu 2012/11/17 01:50:38 This is the only place that knows about stride now
+ gfx::Rect sourceRect(gfx::Point(), plane.size);
+ resourceProvider->setPixels(plane.resourceId, softwarePlanePixels, imageRect, sourceRect, gfx::Vector2d());
}
return true;
}
« no previous file with comments | « no previous file | media/base/video_frame.cc » ('j') | media/base/video_frame.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698