зеркало из https://github.com/mozilla/gecko-dev.git
Bug 963962 - Fix use of CreateDrawTargetForData in CanvasLayerD3D9/10. r=Bas
This commit is contained in:
Родитель
f8bb317bf8
Коммит
0f2e420ea1
|
@ -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);
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче