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; |
} |