Bug 963962 - Fix use of CreateDrawTargetForData in CanvasLayerD3D9/10. r=Bas

This commit is contained in:
Jeff Gilbert 2014-04-07 10:24:14 -04:00
Родитель f8bb317bf8
Коммит 0f2e420ea1
2 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -145,9 +145,10 @@ CanvasLayerD3D10::UpdateSurface()
DataSourceSurface* frameData = shareSurf->GetData(); DataSourceSurface* frameData = shareSurf->GetData();
// Scope for DrawTarget, so it's destroyed before Unmap. // Scope for DrawTarget, so it's destroyed before Unmap.
{ {
IntSize boundsSize(mBounds.width, mBounds.height);
RefPtr<DrawTarget> mapDt = Factory::CreateDrawTargetForData(BackendType::CAIRO, RefPtr<DrawTarget> mapDt = Factory::CreateDrawTargetForData(BackendType::CAIRO,
(uint8_t*)map.pData, (uint8_t*)map.pData,
frameData->GetSize(), boundsSize,
map.RowPitch, map.RowPitch,
SurfaceFormat::B8G8R8A8); SurfaceFormat::B8G8R8A8);

Просмотреть файл

@ -98,9 +98,10 @@ CanvasLayerD3D9::UpdateSurface()
} }
D3DLOCKED_RECT rect = textureLock.GetLockRect(); D3DLOCKED_RECT rect = textureLock.GetLockRect();
IntSize boundsSize(mBounds.width, mBounds.height);
RefPtr<DrawTarget> rectDt = Factory::CreateDrawTargetForData(BackendType::CAIRO, RefPtr<DrawTarget> rectDt = Factory::CreateDrawTargetForData(BackendType::CAIRO,
(uint8_t*)rect.pBits, (uint8_t*)rect.pBits,
surface->GetSize(), boundsSize,
rect.Pitch, rect.Pitch,
SurfaceFormat::B8G8R8A8); SurfaceFormat::B8G8R8A8);