зеркало из https://github.com/mozilla/gecko-dev.git
bug 936549 - Tab sharing capture device won't stream, use FormatStrideForWidth in tab stream r=jesup
This commit is contained in:
Родитель
0c23983f47
Коммит
84e619e443
|
@ -235,12 +235,13 @@ MediaEngineTabVideoSource::Draw() {
|
|||
nsPresContext::CSSPixelsToAppUnits(srcW / scale),
|
||||
nsPresContext::CSSPixelsToAppUnits(srcH / scale));
|
||||
|
||||
uint32_t stride = size.width * 4;
|
||||
gfxImageFormat format = gfxImageFormatRGB24;
|
||||
uint32_t stride = gfxASurface::FormatStrideForWidth(format, size.width);
|
||||
|
||||
nsRefPtr<layers::ImageContainer> container = layers::LayerManager::CreateImageContainer();
|
||||
nsRefPtr<gfxASurface> surf;
|
||||
surf = new gfxImageSurface(static_cast<unsigned char*>(mData), size,
|
||||
stride, gfxImageFormatRGB24);
|
||||
stride, format);
|
||||
if (surf->CairoStatus() != 0) {
|
||||
return;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче