Review fixes

This commit is contained in:
r.kuznetsov 2016-01-20 16:39:37 +03:00
parent 23b6084cac
commit 61d5c3fe9a
3 changed files with 9 additions and 4 deletions

View file

@ -161,6 +161,11 @@ public class Framework
public native static void nativeSetMapStyle(int mapStyle);
/**
* This method allows to set new map style without immediate applying. It can be used before
* engine recreation instead of nativeSetMapStyle to avoid huge flow of OpenGL invocations.
* @param mapStyle style index
*/
public native static void nativeMarkMapStyle(int mapStyle);
public native static void nativeSetRouter(int routerType);

View file

@ -180,12 +180,12 @@ public class MapFragment extends BaseMwmFragment
return;
if (getActivity() == null || !getActivity().isChangingConfigurations())
destroySurface();
destroyEngine();
else
nativeDetachSurface();
}
public void destroySurface()
public void destroyEngine()
{
if (!mEngineCreated)
return;

View file

@ -753,8 +753,8 @@ public class MwmActivity extends BaseMwmFragmentActivity
@Override
public void recreate()
{
// Explicitly destroy surface before activity recreation.
mMapFragment.destroySurface();
// Explicitly destroy engine before activity recreation.
mMapFragment.destroyEngine();
super.recreate();
}