зеркало из https://github.com/mozilla/gecko-dev.git
Bug 981020 - Initialize the map before using it in nsWindowGfx::CreateIcon. r=mattwoodrow
This commit is contained in:
Родитель
4eec0bd2f7
Коммит
63297a23a0
|
@ -677,6 +677,9 @@ nsresult nsWindowGfx::CreateIcon(imgIContainer *aContainer,
|
|||
SurfaceFormat::B8G8R8A8);
|
||||
NS_ENSURE_TRUE(dataSurface, NS_ERROR_FAILURE);
|
||||
|
||||
mappedOK = dataSurface->Map(DataSourceSurface::MapType::READ_WRITE, &map);
|
||||
NS_ENSURE_TRUE(mappedOK, NS_ERROR_FAILURE);
|
||||
|
||||
RefPtr<DrawTarget> dt =
|
||||
Factory::CreateDrawTargetForData(BackendType::CAIRO,
|
||||
map.mData,
|
||||
|
@ -685,8 +688,6 @@ nsresult nsWindowGfx::CreateIcon(imgIContainer *aContainer,
|
|||
SurfaceFormat::B8G8R8A8);
|
||||
dt->CopySurface(surface, IntRect(IntPoint(0, 0), iconSize),
|
||||
IntPoint(0, 0));
|
||||
|
||||
mappedOK = dataSurface->Map(DataSourceSurface::MapType::READ, &map);
|
||||
} else {
|
||||
dataSurface = surface->GetDataSurface();
|
||||
mappedOK = dataSurface->Map(DataSourceSurface::MapType::READ, &map);
|
||||
|
|
Загрузка…
Ссылка в новой задаче