mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-20 05:13:58 +00:00
Compare commits
25 Commits
matheusgom
...
test/next
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e7987a14c0 | ||
|
|
0c079f5120 | ||
|
|
723b84ca5a | ||
|
|
b4093e554d | ||
|
|
5ab07ea610 | ||
|
|
3faf052b32 | ||
|
|
6259e396f4 | ||
|
|
c968d79f4f | ||
|
|
4cb6e65e81 | ||
|
|
a962c61978 | ||
|
|
6cf791580f | ||
|
|
d1f817c3e6 | ||
|
|
2762bd50ae | ||
|
|
2b137a8d12 | ||
|
|
12ac8e8814 | ||
|
|
5ab43dd67e | ||
|
|
2847345324 | ||
|
|
c9b3778ecc | ||
|
|
593561bc06 | ||
|
|
1cfbc1a8be | ||
|
|
ba997f6c05 | ||
|
|
9c9e8dac63 | ||
|
|
75c151bbbe | ||
|
|
f960b3959f | ||
|
|
24c9802a2a |
@@ -105,17 +105,17 @@ jobs:
|
||||
run: |
|
||||
echo "Cloning $FORGEJO_SERVER_URL/$FORGEJO_REPOSITORY branch $FORGEJO_REF_NAME"
|
||||
cd ~
|
||||
git clone --depth 1 --recurse-submodules --shallow-submodules -b $FORGEJO_REF_NAME --single-branch $FORGEJO_SERVER_URL/$FORGEJO_REPOSITORY.git comaps
|
||||
git clone --recurse-submodules --shallow-submodules -b $FORGEJO_REF_NAME --single-branch $FORGEJO_SERVER_URL/$FORGEJO_REPOSITORY.git comaps
|
||||
- name: Checkout wikiparser repo
|
||||
shell: bash
|
||||
run: |
|
||||
cd ~
|
||||
git clone --depth 1 --single-branch https://codeberg.org/comaps/wikiparser.git
|
||||
git clone https://codeberg.org/comaps/wikiparser.git
|
||||
- name: Checkout subways repo
|
||||
shell: bash
|
||||
run: |
|
||||
cd ~
|
||||
git clone --depth 1 --single-branch https://codeberg.org/comaps/subways.git
|
||||
git clone https://codeberg.org/comaps/subways.git
|
||||
|
||||
copy-coasts:
|
||||
# if: inputs.run-copy-coasts
|
||||
|
||||
@@ -133,6 +133,7 @@ import com.google.android.material.appbar.MaterialToolbar;
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||
import com.google.android.material.textview.MaterialTextView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -1813,9 +1814,8 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
||||
return false;
|
||||
}
|
||||
|
||||
private void deliverTtsMessage()
|
||||
{
|
||||
if (Config.isTtsMessageDelivered())
|
||||
private void deliverTtsMessage() {
|
||||
if(Config.isTtsMessageDelivered())
|
||||
return;
|
||||
|
||||
String navigationStartMessage = getResources().getString(R.string.navigation_start_tts_message);
|
||||
|
||||
@@ -18,6 +18,7 @@ import app.organicmaps.R;
|
||||
import app.organicmaps.maplayer.MapButtonsViewModel;
|
||||
import app.organicmaps.sdk.Framework;
|
||||
import app.organicmaps.sdk.Router;
|
||||
import app.organicmaps.sdk.location.LocationHelper;
|
||||
import app.organicmaps.sdk.maplayer.traffic.TrafficManager;
|
||||
import app.organicmaps.sdk.routing.CarDirection;
|
||||
import app.organicmaps.sdk.routing.RoutingController;
|
||||
@@ -267,16 +268,18 @@ public class NavigationController implements TrafficManager.TrafficCallback, Nav
|
||||
|
||||
private void updateSpeedWidgets(@NonNull final RoutingInfo info)
|
||||
{
|
||||
final Location location = MwmApplication.from(mFrame.getContext()).getLocationHelper().getSavedLocation();
|
||||
final LocationHelper locationHelper = MwmApplication.from(mFrame.getContext()).getLocationHelper();
|
||||
final Location location = locationHelper.getSavedLocation();
|
||||
if (location == null)
|
||||
{
|
||||
mSpeedLimit.setSpeedLimit(-1, false);
|
||||
mCurrentSpeed.setCurrentSpeed(-1);
|
||||
return;
|
||||
}
|
||||
final double currentAvgSpeed = locationHelper.getAverageSpeed();
|
||||
final int fSpeedLimit = StringUtils.nativeFormatSpeed(info.speedLimitMps);
|
||||
final boolean speedLimitExceeded = fSpeedLimit < StringUtils.nativeFormatSpeed(location.getSpeed());
|
||||
final boolean speedLimitExceeded = fSpeedLimit < StringUtils.nativeFormatSpeed(currentAvgSpeed);
|
||||
mSpeedLimit.setSpeedLimit(fSpeedLimit, speedLimitExceeded);
|
||||
mCurrentSpeed.setCurrentSpeed(location.getSpeed());
|
||||
mCurrentSpeed.setCurrentSpeed(currentAvgSpeed);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="960"
|
||||
android:viewportHeight="960">
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M240,520q-17,0 -28.5,-11.5T200,480q0,-17 11.5,-28.5T240,440h480q17,0 28.5,11.5T760,480q0,17 -11.5,28.5T720,520L240,520Z"
|
||||
android:pathData="M19,13H5v-2h14v2z"
|
||||
android:fillColor="#ffffff"/>
|
||||
</vector>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="960"
|
||||
android:viewportHeight="960">
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M440,520L240,520q-17,0 -28.5,-11.5T200,480q0,-17 11.5,-28.5T240,440h200v-200q0,-17 11.5,-28.5T480,200q17,0 28.5,11.5T520,240v200h200q17,0 28.5,11.5T760,480q0,17 -11.5,28.5T720,520L520,520v200q0,17 -11.5,28.5T480,760q-17,0 -28.5,-11.5T440,720v-200Z"
|
||||
android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"
|
||||
android:fillColor="@android:color/white"/>
|
||||
</vector>
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
android:layout_gravity="center_vertical"
|
||||
android:fontFamily="@string/robotoMedium"
|
||||
tools:text="Some text should go here"
|
||||
android:textAppearance="@style/MwmTextAppearance.Body1"
|
||||
android:textAppearance="@style/MwmTextAppearance.Body3"
|
||||
android:textColor="?colorSecondary"/>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="start|bottom"
|
||||
android:background="@android:color/transparent"
|
||||
android:clickable="true"
|
||||
android:gravity="start|top"
|
||||
android:text="@string/category_desc_more"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="@dimen/editor_height_field"
|
||||
android:animateLayoutChanges="true"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
@@ -14,7 +14,8 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:hint="@string/editor_edit_place_name_hint">
|
||||
android:hint="@string/editor_edit_place_name_hint"
|
||||
android:textColorHint="?android:textColorSecondary">
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input"
|
||||
style="@style/MwmWidget.Editor.FieldLayout.EditText"
|
||||
@@ -30,5 +31,5 @@
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:padding="@dimen/margin_half_plus"
|
||||
app:srcCompat="@drawable/ic_close"
|
||||
app:tint="?iconTint" />
|
||||
app:tint="@color/base_red" />
|
||||
</LinearLayout>
|
||||
@@ -35,10 +35,10 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="2"
|
||||
android:padding="@dimen/margin_half"
|
||||
android:padding="@dimen/margin_quarter"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:autoSizeMinTextSize="19sp"
|
||||
android:autoSizeMaxTextSize="24sp"
|
||||
android:autoSizeMaxTextSize="25sp"
|
||||
android:minHeight="60dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="center"
|
||||
|
||||
@@ -11,14 +11,14 @@
|
||||
style="@style/MwmWidget.M3.FAB.MapButton.Zoom"
|
||||
android:tint="?iconTint"
|
||||
app:srcCompat="@drawable/ic_plus"
|
||||
app:shapeAppearance="@style/Widget.MaterialComponents.FloatingActionButton"
|
||||
android:layout_marginBottom="@dimen/margin_half"
|
||||
app:shapeAppearanceOverlay="@style/ShapeAppearance.MapButton.Zoom.Minus"
|
||||
android:layout_marginBottom="@dimen/margin_eighth"
|
||||
android:contentDescription="@string/zoom_in"/>
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/nav_zoom_out"
|
||||
style="@style/MwmWidget.M3.FAB.MapButton.Zoom"
|
||||
android:tint="?iconTint"
|
||||
app:srcCompat="@drawable/ic_minus"
|
||||
app:shapeAppearance="@style/Widget.MaterialComponents.FloatingActionButton"
|
||||
app:shapeAppearanceOverlay="@style/ShapeAppearance.MapButton.Zoom.Plus"
|
||||
android:contentDescription="@string/zoom_out"/>
|
||||
</LinearLayout>
|
||||
@@ -34,7 +34,8 @@
|
||||
android:textAppearance="?android:attr/textAppearance"
|
||||
android:gravity="start|top"
|
||||
android:textColor="?attr/colorSecondary"
|
||||
android:text="@string/category_desc_more" />
|
||||
android:text="@string/category_desc_more"
|
||||
android:background="@android:color/transparent"/>
|
||||
<include
|
||||
layout="@layout/item_divider"/>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
<string name="pref_tts_info" translatable="false">TtsInfo</string>
|
||||
<string name="pref_tts_info_link" translatable="false">TtsInfoLink</string>
|
||||
<string name="pref_tts_speed_cameras" translatable="false">SpeedCameras</string>
|
||||
<string name="pref_tts_speed_cameras_info" translatable="false">SpeedCamerasInfo</string>
|
||||
<string name="prefs_routing" translatable="false">RoutingOptions</string>
|
||||
<string name="pref_autodownload" translatable="false">AutoDownloadMap</string>
|
||||
<string name="pref_3d" translatable="false">3D</string>
|
||||
|
||||
@@ -609,7 +609,6 @@
|
||||
\nOpen your device\'s settings → Language and input → Speech → Text to speech output.
|
||||
\nHere you can manage settings for speech synthesis (for example, download language pack for offline use) and select another text-to-speech engine.</string>
|
||||
<string name="prefs_languages_information_off_link">For more information please check this guide</string>
|
||||
<string name="prefs_speed_cameras_information">Speed camera warnings are disabled in countries where alerts are prohibited by local law.</string>
|
||||
<string name="transliteration_title">Transliterate into Latin alphabet</string>
|
||||
<string name="learn_more">Learn more</string>
|
||||
<!-- User selected the destination by pressing Route To, but the current position is unknown. User needs to select a starting point of a route using search or by tapping on the map and then pressing "Route From". -->
|
||||
|
||||
@@ -424,4 +424,17 @@
|
||||
<item name="android:maxWidth">@dimen/map_buttons_bottom_max_width</item>
|
||||
<item name="android:padding">@dimen/nav_frame_padding</item>
|
||||
</style>
|
||||
|
||||
<style name="ShapeAppearance.MapButton.Zoom.Plus" parent="">
|
||||
<item name="cornerSizeTopLeft">10%</item>
|
||||
<item name="cornerSizeTopRight">10%</item>
|
||||
<item name="cornerSizeBottomRight">50%</item>
|
||||
<item name="cornerSizeBottomLeft">50%</item>
|
||||
</style>
|
||||
<style name="ShapeAppearance.MapButton.Zoom.Minus" parent="">
|
||||
<item name="cornerSizeBottomLeft">10%</item>
|
||||
<item name="cornerSizeBottomRight">10%</item>
|
||||
<item name="cornerSizeTopLeft">50%</item>
|
||||
<item name="cornerSizeTopRight">50%</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
||||
@@ -57,11 +57,4 @@
|
||||
android:entryValues="@array/speed_cameras_values"
|
||||
android:defaultValue="@string/auto_enum_value"
|
||||
app:iconSpaceReserved="false" />
|
||||
<Preference
|
||||
android:enabled="true"
|
||||
android:key="@string/pref_tts_info_link"
|
||||
android:persistent="false"
|
||||
android:selectable="false"
|
||||
android:summary="@string/prefs_speed_cameras_information"
|
||||
app:iconSpaceReserved="false" />
|
||||
</androidx.preference.PreferenceScreen>
|
||||
|
||||
@@ -26,6 +26,7 @@ import app.organicmaps.sdk.util.LocationUtils;
|
||||
import app.organicmaps.sdk.util.NetworkPolicy;
|
||||
import app.organicmaps.sdk.util.log.Logger;
|
||||
import org.chromium.base.ObserverList;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class LocationHelper implements BaseLocationProvider.Listener
|
||||
{
|
||||
@@ -35,6 +36,8 @@ public class LocationHelper implements BaseLocationProvider.Listener
|
||||
private static final long AGPS_EXPIRATION_TIME_MS = 16 * 60 * 60 * 1000; // 16 hours
|
||||
private static final long LOCATION_UPDATE_TIMEOUT_MS = 30 * 1000; // 30 seconds
|
||||
|
||||
private static final double SPEED_AVERAGING_TIME = 0.5; // 0.5 seconds
|
||||
|
||||
@NonNull
|
||||
private final Context mContext;
|
||||
@NonNull
|
||||
@@ -56,6 +59,10 @@ public class LocationHelper implements BaseLocationProvider.Listener
|
||||
private Handler mHandler;
|
||||
private Runnable mLocationTimeoutRunnable = this::notifyLocationUpdateTimeout;
|
||||
|
||||
private double mTimeElapsedAtLastAverage = Double.NaN;
|
||||
private float mLastAverageSpeed = Float.NaN;
|
||||
private ArrayList<Float> mSpeedHistory = new ArrayList<>();
|
||||
|
||||
@NonNull
|
||||
private final GnssStatusCompat.Callback mGnssStatusCallback = new GnssStatusCompat.Callback() {
|
||||
@Override
|
||||
@@ -167,6 +174,8 @@ public class LocationHelper implements BaseLocationProvider.Listener
|
||||
mSavedLocation.getLongitude(), mSavedLocation.getAccuracy(),
|
||||
mSavedLocation.getAltitude(), mSavedLocation.getSpeed(),
|
||||
mSavedLocation.getBearing());
|
||||
|
||||
updateSpeedHistory();
|
||||
}
|
||||
|
||||
private void notifyLocationUpdateTimeout()
|
||||
@@ -479,4 +488,41 @@ public class LocationHelper implements BaseLocationProvider.Listener
|
||||
Framework.nativeRunFirstLaunchAnimation();
|
||||
}
|
||||
}
|
||||
|
||||
private void updateSpeedHistory()
|
||||
{
|
||||
if (mSavedLocation == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (Double.isNaN(mTimeElapsedAtLastAverage))
|
||||
{
|
||||
mTimeElapsedAtLastAverage = mSavedLocation.getElapsedRealtimeNanos() * 1.0E-9;
|
||||
}
|
||||
mSpeedHistory.add(mSavedLocation.getSpeed());
|
||||
}
|
||||
|
||||
public float getAverageSpeed()
|
||||
{
|
||||
if (mSavedLocation == null)
|
||||
return Float.NaN;
|
||||
if (Double.isNaN(mTimeElapsedAtLastAverage))
|
||||
updateSpeedHistory();
|
||||
double timeDiff = mSavedLocation.getElapsedRealtimeNanos() * 1.0E-9 - mTimeElapsedAtLastAverage;
|
||||
if (timeDiff < SPEED_AVERAGING_TIME || mSpeedHistory.isEmpty())
|
||||
{
|
||||
if (!Float.isNaN(mLastAverageSpeed))
|
||||
return mLastAverageSpeed;
|
||||
else
|
||||
return mSavedLocation.getSpeed();
|
||||
}
|
||||
else {
|
||||
mLastAverageSpeed = mSpeedHistory.stream().reduce(0.0F, Float::sum);
|
||||
mLastAverageSpeed /= mSpeedHistory.size();
|
||||
mSpeedHistory.clear();
|
||||
mTimeElapsedAtLastAverage = mSavedLocation.getElapsedRealtimeNanos() * 1.0E-9;
|
||||
return mLastAverageSpeed;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,9 +14,9 @@ import android.text.TextUtils;
|
||||
import android.util.Pair;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.core.os.ConfigurationCompat;
|
||||
import androidx.core.os.LocaleListCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.media.AudioAttributesCompat;
|
||||
import androidx.media.AudioFocusRequestCompat;
|
||||
import androidx.media.AudioManagerCompat;
|
||||
@@ -137,8 +137,7 @@ public enum TtsPlayer
|
||||
return findSupportedLanguage(Config.TTS.getLanguage(), langs);
|
||||
}
|
||||
|
||||
private @Nullable LanguageData getSystemLanguage(List<LanguageData> langs)
|
||||
{
|
||||
private @Nullable LanguageData getSystemLanguage(List<LanguageData> langs) {
|
||||
LanguageData res;
|
||||
|
||||
// Try default system locale
|
||||
@@ -148,8 +147,7 @@ public enum TtsPlayer
|
||||
return res;
|
||||
|
||||
// Try other installed system locales
|
||||
for (int i = 0; i < mInstalledSystemLocales.size(); i++)
|
||||
{
|
||||
for(int i=0; i < mInstalledSystemLocales.size(); i++) {
|
||||
Locale loc = mInstalledSystemLocales.get(i);
|
||||
res = findSupportedLanguage(loc, langs);
|
||||
if (res != null && res.downloaded)
|
||||
@@ -158,20 +156,19 @@ public enum TtsPlayer
|
||||
return null;
|
||||
}
|
||||
|
||||
private @Nullable LanguageData getTTSLanguage(List<LanguageData> langs)
|
||||
{
|
||||
private @Nullable LanguageData getTTSLanguage(List<LanguageData> langs) {
|
||||
LanguageData res;
|
||||
|
||||
// Try all TTS installed languages
|
||||
Set<Locale> ttsLocales = mTts.getAvailableLanguages();
|
||||
for (Locale loc : ttsLocales)
|
||||
{
|
||||
for(Locale loc : ttsLocales) {
|
||||
res = findSupportedLanguage(loc, langs);
|
||||
if (res != null && res.downloaded)
|
||||
return res;
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
private static @Nullable LanguageData getDefaultLanguage(List<LanguageData> langs)
|
||||
@@ -389,8 +386,7 @@ public enum TtsPlayer
|
||||
Logger.d("TtsPlayer", "Selected locale " + res.internalCode + " will be used for TTS");
|
||||
return res;
|
||||
}
|
||||
Logger.d("TtsPlayer", "Selected locale " + Config.TTS.getLanguage()
|
||||
+ " is not available or not downloaded, trying system locales...");
|
||||
Logger.d("TtsPlayer", "Selected locale " + Config.TTS.getLanguage() + " is not available or not downloaded, trying system locales...");
|
||||
|
||||
res = getSystemLanguage(outList);
|
||||
if (res != null && res.downloaded)
|
||||
@@ -398,8 +394,7 @@ public enum TtsPlayer
|
||||
Logger.d("TtsPlayer", "System locale " + res.internalCode + " will be used for TTS");
|
||||
return res;
|
||||
}
|
||||
Logger.d("TtsPlayer",
|
||||
"None of the system locales are available, or they are not downloaded, trying default locale...");
|
||||
Logger.d("TtsPlayer", "None of the system locales are available, or they are not downloaded, trying default locale...");
|
||||
|
||||
res = getDefaultLanguage(outList);
|
||||
if (res != null && res.downloaded)
|
||||
@@ -407,8 +402,7 @@ public enum TtsPlayer
|
||||
Logger.d("TtsPlayer", "Default locale " + res.internalCode + " will be used for TTS");
|
||||
return res;
|
||||
}
|
||||
Logger.d("TtsPlayer",
|
||||
"Default locale " + DEFAULT_LOCALE + " can not be used either, trying all installed TTS locales...");
|
||||
Logger.d("TtsPlayer", "Default locale " + DEFAULT_LOCALE + " can not be used either, trying all installed TTS locales...");
|
||||
|
||||
res = getTTSLanguage(outList);
|
||||
if (res != null && res.downloaded)
|
||||
@@ -417,8 +411,7 @@ public enum TtsPlayer
|
||||
return res;
|
||||
}
|
||||
|
||||
Logger.d("TtsPlayer",
|
||||
"None of the TTS engine locales are available, or they are not downloaded, disabling TTS :( ");
|
||||
Logger.d("TtsPlayer", "None of the TTS engine locales are available, or they are not downloaded, disabling TTS :( ");
|
||||
Config.TTS.setEnabled(false);
|
||||
return null;
|
||||
}
|
||||
|
||||
4588
data/countries.txt
4588
data/countries.txt
File diff suppressed because it is too large
Load Diff
@@ -13,6 +13,7 @@ node[shop],
|
||||
node[amenity=car_wash],
|
||||
node[amenity=fuel],
|
||||
node[amenity=studio],
|
||||
node[amenity=toilets],
|
||||
node[amenity=vehicle_inspection],
|
||||
node[craft],
|
||||
node[landuse=industrial][industrial=mine],
|
||||
@@ -137,7 +138,6 @@ node[amenity=prison],
|
||||
node[amenity=recycling][recycling_type=centre],
|
||||
node[amenity=sailing_school],
|
||||
node[amenity=school],
|
||||
node[amenity=toilets],
|
||||
node[amenity=townhall],
|
||||
node[amenity=university][name],
|
||||
node[barrier=border_control],
|
||||
|
||||
@@ -502,12 +502,12 @@ int main(int argc, char * argv[])
|
||||
if (ImGui::GetIO().WantCaptureMouse)
|
||||
framework.MakeFrameActive();
|
||||
|
||||
if (touchActive)
|
||||
#if defined(OMIM_OS_MAC)
|
||||
x *= visualScale;
|
||||
x *= visualScale;
|
||||
y *= visualScale;
|
||||
#endif
|
||||
framework.TouchEvent(GetTouchEvent(framework, x, y, touchMods, df::TouchEvent::TOUCH_MOVE));
|
||||
if (touchActive)
|
||||
framework.TouchEvent(GetTouchEvent(framework, x, y, touchMods, df::TouchEvent::TOUCH_MOVE));
|
||||
};
|
||||
glfwSetCursorPosCallback(window, [](GLFWwindow *, double x, double y) { handlers.onMouseMove(x, y); });
|
||||
|
||||
|
||||
@@ -165,18 +165,16 @@ void TestAltitudesBuilding(std::vector<TPoint3DList> const & roads, bool hasAlti
|
||||
AltitudeGetter & altitudeGetter)
|
||||
{
|
||||
classificator::Load();
|
||||
Platform & platform = GetPlatform();
|
||||
std::string const testDirFullPath = base::JoinPath(platform.WritableDir(), kTestDir);
|
||||
|
||||
std::string const testDirFullPath = base::JoinPath(GetPlatform().WritableDir(), kTestDir);
|
||||
ScopedDirCleanup testScopedDir(testDirFullPath);
|
||||
|
||||
// Building mwm without altitude section.
|
||||
LocalCountryFile country(testDirFullPath, CountryFile(kTestMwm), 1);
|
||||
ScopedDir testScopedDir(kTestDir);
|
||||
ScopedFile testScopedMwm(base::JoinPath(kTestDir, kTestMwm + DATA_FILE_EXTENSION), ScopedFile::Mode::Create);
|
||||
|
||||
BuildMwmWithoutAltitudes(roads, country);
|
||||
|
||||
// Adding altitude section to mwm.
|
||||
auto const mwmPath = testScopedMwm.GetFullPath();
|
||||
auto const mwmPath = base::JoinPath(testDirFullPath, kTestMwm + DATA_FILE_EXTENSION);
|
||||
BuildRoadAltitudes(mwmPath, altitudeGetter);
|
||||
|
||||
// Reading from mwm and testing altitude information.
|
||||
|
||||
@@ -64,18 +64,15 @@ std::unique_ptr<CityRoads> LoadCityRoads(LocalCountryFile const & country)
|
||||
/// section and then read from it.
|
||||
void TestCityRoadsBuilding(vector<uint32_t> && cityRoadFeatureIds)
|
||||
{
|
||||
string const writableDir = GetPlatform().WritableDir();
|
||||
string const testDir = base::JoinPath(GetPlatform().WritableDir(), kTestDir);
|
||||
ScopedDirCleanup scopedDir(testDir);
|
||||
|
||||
// Building empty mwm.
|
||||
LocalCountryFile country(base::JoinPath(writableDir, kTestDir), CountryFile(kTestMwm), 0 /* version */);
|
||||
ScopedDir const scopedDir(kTestDir);
|
||||
|
||||
string const mwmRelativePath = base::JoinPath(kTestDir, kTestMwm + DATA_FILE_EXTENSION);
|
||||
ScopedFile const scopedMwm(mwmRelativePath, ScopedFile::Mode::Create);
|
||||
LocalCountryFile country(testDir, CountryFile(kTestMwm), 0 /* version */);
|
||||
BuildEmptyMwm(country);
|
||||
|
||||
// Adding city_roads section to mwm.
|
||||
string const mwmFullPath = base::JoinPath(writableDir, mwmRelativePath);
|
||||
string const mwmFullPath = base::JoinPath(testDir, kTestMwm + DATA_FILE_EXTENSION);
|
||||
vector<uint32_t> originalCityRoadFeatureIds = cityRoadFeatureIds;
|
||||
routing_builder::SerializeCityRoads(mwmFullPath, std::move(cityRoadFeatureIds));
|
||||
|
||||
|
||||
@@ -73,19 +73,18 @@ void TestMaxspeedsSection(Features const & roads, string const & maxspeedsCsvCon
|
||||
FeatureIdToOsmId const & featureIdToOsmId)
|
||||
{
|
||||
classificator::Load();
|
||||
|
||||
string const testDirFullPath = base::JoinPath(GetPlatform().WritableDir(), kTestDir);
|
||||
ScopedDir testScopedDir(kTestDir);
|
||||
ScopedDirCleanup testScopedDir(testDirFullPath);
|
||||
|
||||
// Writing |maxspeedsCsvContent| to a file in |kTestDir|.
|
||||
ScopedFile testScopedMaxspeedsCsv(base::JoinPath(kTestDir, kCsv), maxspeedsCsvContent);
|
||||
|
||||
// Writing |roads| to test mwm.
|
||||
LocalCountryFile country(testDirFullPath, CountryFile(kTestMwm), 1 /* version */);
|
||||
string const testMwm = kTestMwm + DATA_FILE_EXTENSION;
|
||||
ScopedFile testScopedMwm(base::JoinPath(kTestDir, testMwm), ScopedFile::Mode::Create);
|
||||
BuildGeometry(roads, country);
|
||||
|
||||
string const testMwmFullPath = base::JoinPath(testDirFullPath, testMwm);
|
||||
string const testMwmFullPath = base::JoinPath(testDirFullPath, kTestMwm + DATA_FILE_EXTENSION);
|
||||
|
||||
// Create routing graph for test mwm.
|
||||
auto const countryParentGetter = [](std::string const &) { return string(); };
|
||||
|
||||
@@ -134,33 +134,26 @@ void LoadRestrictions(string const & mwmFilePath, vector<Restriction> & restrict
|
||||
/// loads the restriction section and test loaded restrictions.
|
||||
/// \param |restrictionPath| comma separated text with restrictions in osm id terms.
|
||||
/// \param |osmIdsToFeatureIdContent| comma separated text with mapping from osm ids to feature ids.
|
||||
void TestRestrictionBuilding(string const & restrictionPath, string const & osmIdsToFeatureIdContent,
|
||||
void TestRestrictionBuilding(string const & restrictionContent, string const & osmIdsToFeatureIdContent,
|
||||
unique_ptr<IndexGraph> graph, vector<Restriction> & expectedNotUTurn,
|
||||
vector<RestrictionUTurnForTests> & expectedUTurn)
|
||||
{
|
||||
Platform & platform = GetPlatform();
|
||||
string const writableDir = platform.WritableDir();
|
||||
string const targetDir = base::JoinPath(GetPlatform().WritableDir(), kTestDir);
|
||||
ScopedDirCleanup scopedDir(targetDir);
|
||||
|
||||
string const targetDir = base::JoinPath(writableDir, kTestDir);
|
||||
// Building empty mwm.
|
||||
LocalCountryFile country(targetDir, CountryFile(kTestMwm), 0 /* version */);
|
||||
ScopedDir const scopedDir(kTestDir);
|
||||
string const mwmRelativePath = base::JoinPath(kTestDir, kTestMwm + DATA_FILE_EXTENSION);
|
||||
ScopedFile const scopedMwm(mwmRelativePath, ScopedFile::Mode::Create);
|
||||
BuildEmptyMwm(country);
|
||||
|
||||
// Creating a file with restrictions.
|
||||
string const restrictionRelativePath = base::JoinPath(kTestDir, kRestrictionFileName);
|
||||
ScopedFile const restrictionScopedFile(restrictionRelativePath, restrictionPath);
|
||||
ScopedFile const restrictionScopedFile(base::JoinPath(kTestDir, kRestrictionFileName), restrictionContent);
|
||||
|
||||
// Creating osm ids to feature ids mapping.
|
||||
string const mappingRelativePath = base::JoinPath(kTestDir, kOsmIdsToFeatureIdsName);
|
||||
ScopedFile const mappingFile(mappingRelativePath, ScopedFile::Mode::Create);
|
||||
string const & osmIdsToFeatureIdFullPath = mappingFile.GetFullPath();
|
||||
string const osmIdsToFeatureIdFullPath = base::JoinPath(targetDir, kOsmIdsToFeatureIdsName);
|
||||
ReEncodeOsmIdsToFeatureIdsMapping(osmIdsToFeatureIdContent, osmIdsToFeatureIdFullPath);
|
||||
|
||||
string const restrictionFullPath = base::JoinPath(writableDir, restrictionRelativePath);
|
||||
string const & mwmFullPath = scopedMwm.GetFullPath();
|
||||
string const restrictionFullPath = base::JoinPath(targetDir, kRestrictionFileName);
|
||||
string const mwmFullPath = base::JoinPath(targetDir, kTestMwm + DATA_FILE_EXTENSION);
|
||||
|
||||
// Prepare data to collector.
|
||||
auto restrictionCollector =
|
||||
|
||||
@@ -151,7 +151,7 @@ public:
|
||||
// Set speed as-is from parent link.
|
||||
if (parentHwType == hwType)
|
||||
return {{s.GetForward(), s.GetUnits()}};
|
||||
/*
|
||||
|
||||
using routing::HighwayType;
|
||||
if ((*parentHwType == HighwayType::HighwayMotorway && hwType == HighwayType::HighwayMotorwayLink) ||
|
||||
(*parentHwType == HighwayType::HighwayTrunk && hwType == HighwayType::HighwayTrunkLink) ||
|
||||
@@ -163,7 +163,6 @@ public:
|
||||
return converter.ClosestValidMacro(
|
||||
{base::asserted_cast<MaxspeedType>(std::lround(s.GetForward() * kLinkToMainSpeedFactor)), s.GetUnits()});
|
||||
}
|
||||
*/
|
||||
|
||||
return {};
|
||||
};
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
#include "indexer/data_source.hpp"
|
||||
|
||||
#include "base/assert.hpp"
|
||||
|
||||
#include "defines.hpp"
|
||||
|
||||
namespace descriptions
|
||||
@@ -20,17 +18,28 @@ std::string Loader::GetWikiDescription(FeatureID const & featureId, std::vector<
|
||||
if (!value.m_cont.IsExist(DESCRIPTIONS_FILE_TAG))
|
||||
return {};
|
||||
|
||||
EntryPtr entry;
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(m_mutex);
|
||||
entry = m_deserializers.try_emplace(featureId.m_mwmId, std::make_shared<Entry>()).first->second;
|
||||
}
|
||||
// No need to have separate mutexes for each MWM since there is no concurrent Wiki pages reading.
|
||||
// Pros: lock is called once and a simple logic with OnMwmDeregistered synchronization.
|
||||
/// @todo Consider removing mutex at all or make wiki loading async (PlacePage info).
|
||||
|
||||
ASSERT(entry, ());
|
||||
std::lock_guard lock(m_mutex);
|
||||
Deserializer & deserializer = m_deserializers[featureId.m_mwmId];
|
||||
|
||||
auto readerPtr = value.m_cont.GetReader(DESCRIPTIONS_FILE_TAG);
|
||||
|
||||
std::lock_guard<std::mutex> lock(entry->m_mutex);
|
||||
return entry->m_deserializer.Deserialize(*readerPtr.GetPtr(), featureId.m_index, langPriority);
|
||||
return deserializer.Deserialize(*readerPtr.GetPtr(), featureId.m_index, langPriority);
|
||||
}
|
||||
|
||||
void Loader::OnMwmDeregistered(platform::LocalCountryFile const & countryFile)
|
||||
{
|
||||
std::lock_guard lock(m_mutex);
|
||||
for (auto it = m_deserializers.begin(); it != m_deserializers.end(); ++it)
|
||||
{
|
||||
if (it->first.IsDeregistered(countryFile))
|
||||
{
|
||||
m_deserializers.erase(it);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace descriptions
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
#include "indexer/feature_decl.hpp"
|
||||
#include "indexer/mwm_set.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@@ -23,18 +21,11 @@ public:
|
||||
explicit Loader(DataSource const & dataSource) : m_dataSource(dataSource) {}
|
||||
|
||||
std::string GetWikiDescription(FeatureID const & featureId, std::vector<int8_t> const & langPriority);
|
||||
void OnMwmDeregistered(platform::LocalCountryFile const & countryFile);
|
||||
|
||||
private:
|
||||
struct Entry
|
||||
{
|
||||
std::mutex m_mutex;
|
||||
Deserializer m_deserializer;
|
||||
};
|
||||
|
||||
using EntryPtr = std::shared_ptr<Entry>;
|
||||
|
||||
DataSource const & m_dataSource;
|
||||
std::map<MwmSet::MwmId, EntryPtr> m_deserializers;
|
||||
std::map<MwmSet::MwmId, Deserializer> m_deserializers;
|
||||
std::mutex m_mutex;
|
||||
};
|
||||
} // namespace descriptions
|
||||
|
||||
@@ -231,14 +231,6 @@ void SymbolsTexture::Invalidate(ref_ptr<dp::GraphicsContext> context, std::strin
|
||||
Load(context, skinPathName, allocator);
|
||||
}
|
||||
|
||||
void SymbolsTexture::Invalidate(ref_ptr<dp::GraphicsContext> context, std::string const & skinPathName,
|
||||
ref_ptr<HWTextureAllocator> allocator,
|
||||
std::vector<drape_ptr<HWTexture>> & internalTextures)
|
||||
{
|
||||
internalTextures.push_back(std::move(m_hwTexture));
|
||||
Invalidate(context, skinPathName, allocator);
|
||||
}
|
||||
|
||||
ref_ptr<Texture::ResourceInfo> SymbolsTexture::FindResource(Texture::Key const & key, bool & newResource)
|
||||
{
|
||||
newResource = false;
|
||||
|
||||
@@ -36,8 +36,6 @@ public:
|
||||
|
||||
void Invalidate(ref_ptr<dp::GraphicsContext> context, std::string const & skinPathName,
|
||||
ref_ptr<HWTextureAllocator> allocator);
|
||||
void Invalidate(ref_ptr<dp::GraphicsContext> context, std::string const & skinPathName,
|
||||
ref_ptr<HWTextureAllocator> allocator, std::vector<drape_ptr<HWTexture>> & internalTextures);
|
||||
|
||||
bool IsSymbolContained(std::string const & symbolName) const;
|
||||
|
||||
|
||||
@@ -73,6 +73,12 @@ public:
|
||||
|
||||
static bool IsPowerOfTwo(uint32_t width, uint32_t height);
|
||||
|
||||
void DeferredCleanup(std::vector<drape_ptr<HWTexture>> & toCleanup)
|
||||
{
|
||||
toCleanup.push_back(std::move(m_hwTexture));
|
||||
Destroy();
|
||||
}
|
||||
|
||||
protected:
|
||||
void Destroy();
|
||||
bool AllocateTexture(ref_ptr<dp::GraphicsContext> context, ref_ptr<HWTextureAllocator> allocator);
|
||||
|
||||
@@ -87,6 +87,10 @@ drape_ptr<Texture> CreateArrowTexture(ref_ptr<dp::GraphicsContext> context,
|
||||
useDefaultResourceFolder ? StaticTexture::kDefaultResource : std::string(),
|
||||
dp::TextureFormat::RGBA8, textureAllocator, true /* allowOptional */);
|
||||
}
|
||||
|
||||
// There is no "arrow-texture.png".
|
||||
// BackendRenderer::m_arrow3dPreloadedData mesh is used by default.
|
||||
/// @todo Texture arrow is still present in case if somebody wants to use it?
|
||||
return make_unique_dp<StaticTexture>(context, "arrow-texture.png", StaticTexture::kDefaultResource,
|
||||
dp::TextureFormat::RGBA8, textureAllocator, true /* allowOptional */);
|
||||
}
|
||||
@@ -315,39 +319,7 @@ void TextureManager::Init(ref_ptr<dp::GraphicsContext> context, Params const & p
|
||||
m_smaaSearchTexture = make_unique_dp<StaticTexture>(context, "smaa-search.png", StaticTexture::kDefaultResource,
|
||||
dp::TextureFormat::Red, make_ref(m_textureAllocator));
|
||||
|
||||
// Initialize patterns (reserved ./data/patterns.txt lines count).
|
||||
std::set<PenPatternT> patterns;
|
||||
|
||||
double const visualScale = params.m_visualScale;
|
||||
uint32_t rowsCount = 0;
|
||||
impl::ParsePatternsList(params.m_patterns, [&](buffer_vector<double, 8> const & pattern)
|
||||
{
|
||||
PenPatternT toAdd;
|
||||
for (double d : pattern)
|
||||
toAdd.push_back(PatternFloat2Pixel(d * visualScale));
|
||||
|
||||
if (!patterns.insert(toAdd).second)
|
||||
return;
|
||||
|
||||
if (IsTrianglePattern(toAdd))
|
||||
{
|
||||
rowsCount = rowsCount + toAdd[2] + toAdd[3];
|
||||
}
|
||||
else
|
||||
{
|
||||
ASSERT_EQUAL(toAdd.size(), 2, ());
|
||||
++rowsCount;
|
||||
}
|
||||
});
|
||||
|
||||
m_stipplePenTexture = make_unique_dp<StipplePenTexture>(StipplePenTextureSize(rowsCount, m_maxTextureSize),
|
||||
make_ref(m_textureAllocator));
|
||||
|
||||
LOG(LDEBUG, ("Patterns texture size =", m_stipplePenTexture->GetWidth(), m_stipplePenTexture->GetHeight()));
|
||||
|
||||
ref_ptr<StipplePenTexture> stipplePenTex = make_ref(m_stipplePenTexture);
|
||||
for (auto const & p : patterns)
|
||||
stipplePenTex->ReservePattern(p);
|
||||
InitStipplePen(params);
|
||||
|
||||
// Initialize colors (reserved ./data/colors.txt lines count).
|
||||
std::vector<dp::Color> colors;
|
||||
@@ -380,25 +352,73 @@ void TextureManager::Init(ref_ptr<dp::GraphicsContext> context, Params const & p
|
||||
m_nothingToUpload.clear();
|
||||
}
|
||||
|
||||
void TextureManager::InitStipplePen(Params const & params)
|
||||
{
|
||||
// Initialize patterns (reserved ./data/patterns.txt lines count).
|
||||
std::set<PenPatternT> patterns;
|
||||
uint32_t rowsCount = 0;
|
||||
|
||||
impl::ParsePatternsList(params.m_patterns, [&](buffer_vector<double, 8> const & pattern)
|
||||
{
|
||||
PenPatternT toAdd;
|
||||
for (double d : pattern)
|
||||
toAdd.push_back(PatternFloat2Pixel(d * params.m_visualScale));
|
||||
|
||||
if (!patterns.insert(toAdd).second)
|
||||
return;
|
||||
|
||||
if (IsTrianglePattern(toAdd))
|
||||
{
|
||||
rowsCount = rowsCount + toAdd[2] + toAdd[3];
|
||||
}
|
||||
else
|
||||
{
|
||||
ASSERT_EQUAL(toAdd.size(), 2, ());
|
||||
++rowsCount;
|
||||
}
|
||||
});
|
||||
|
||||
m_stipplePenTexture = make_unique_dp<StipplePenTexture>(StipplePenTextureSize(rowsCount, m_maxTextureSize),
|
||||
make_ref(m_textureAllocator));
|
||||
|
||||
LOG(LDEBUG, ("Patterns texture size =", m_stipplePenTexture->GetWidth(), m_stipplePenTexture->GetHeight()));
|
||||
|
||||
ref_ptr<StipplePenTexture> stipplePenTex = make_ref(m_stipplePenTexture);
|
||||
for (auto const & p : patterns)
|
||||
stipplePenTex->ReservePattern(p);
|
||||
}
|
||||
|
||||
void TextureManager::OnSwitchMapStyle(ref_ptr<dp::GraphicsContext> context)
|
||||
{
|
||||
CHECK(m_isInitialized, ());
|
||||
|
||||
bool const isVulkan = context->GetApiVersion() == dp::ApiVersion::Vulkan;
|
||||
|
||||
// Here we need invalidate only textures which can be changed in map style switch.
|
||||
// Now we update only symbol textures, if we need update other textures they must be added here.
|
||||
// For Vulkan we use m_texturesToCleanup to defer textures destroying.
|
||||
for (auto const & m_symbolTexture : m_symbolTextures)
|
||||
for (auto const & texture : m_symbolTextures)
|
||||
{
|
||||
ref_ptr<SymbolsTexture> symbolsTexture = make_ref(m_symbolTexture);
|
||||
ASSERT(symbolsTexture != nullptr, ());
|
||||
ref_ptr<SymbolsTexture> symbolsTexture = make_ref(texture);
|
||||
if (isVulkan)
|
||||
symbolsTexture->DeferredCleanup(m_texturesToCleanup);
|
||||
|
||||
if (context->GetApiVersion() != dp::ApiVersion::Vulkan)
|
||||
symbolsTexture->Invalidate(context, m_resPostfix, make_ref(m_textureAllocator));
|
||||
else
|
||||
symbolsTexture->Invalidate(context, m_resPostfix, make_ref(m_textureAllocator), m_texturesToCleanup);
|
||||
symbolsTexture->Invalidate(context, m_resPostfix, make_ref(m_textureAllocator));
|
||||
}
|
||||
}
|
||||
|
||||
void TextureManager::OnVisualScaleChanged(ref_ptr<dp::GraphicsContext> context, Params const & params)
|
||||
{
|
||||
m_resPostfix = params.m_resPostfix;
|
||||
|
||||
OnSwitchMapStyle(context);
|
||||
|
||||
if (context->GetApiVersion() == dp::ApiVersion::Vulkan)
|
||||
m_stipplePenTexture->DeferredCleanup(m_texturesToCleanup);
|
||||
|
||||
InitStipplePen(params);
|
||||
}
|
||||
|
||||
void TextureManager::InvalidateArrowTexture(ref_ptr<dp::GraphicsContext> context,
|
||||
std::string const & texturePath /* = {} */,
|
||||
bool useDefaultResourceFolder /* = false */)
|
||||
@@ -416,10 +436,13 @@ void TextureManager::ApplyInvalidatedStaticTextures()
|
||||
}
|
||||
}
|
||||
|
||||
void TextureManager::GetTexturesToCleanup(std::vector<drape_ptr<HWTexture>> & textures)
|
||||
std::vector<drape_ptr<HWTexture>> TextureManager::GetTexturesToCleanup()
|
||||
{
|
||||
CHECK(m_isInitialized, ());
|
||||
std::swap(textures, m_texturesToCleanup);
|
||||
|
||||
auto res = std::move(m_texturesToCleanup);
|
||||
m_texturesToCleanup.clear();
|
||||
return res;
|
||||
}
|
||||
|
||||
bool TextureManager::GetSymbolRegionSafe(std::string const & symbolName, SymbolRegion & region)
|
||||
|
||||
@@ -77,7 +77,9 @@ public:
|
||||
|
||||
void Init(ref_ptr<dp::GraphicsContext> context, Params const & params);
|
||||
void OnSwitchMapStyle(ref_ptr<dp::GraphicsContext> context);
|
||||
void GetTexturesToCleanup(std::vector<drape_ptr<HWTexture>> & textures);
|
||||
void OnVisualScaleChanged(ref_ptr<dp::GraphicsContext> context, Params const & params);
|
||||
|
||||
std::vector<drape_ptr<HWTexture>> GetTexturesToCleanup();
|
||||
|
||||
bool GetSymbolRegionSafe(std::string const & symbolName, SymbolRegion & region);
|
||||
void GetSymbolRegion(std::string const & symbolName, SymbolRegion & region);
|
||||
@@ -121,6 +123,8 @@ public:
|
||||
ref_ptr<HWTextureAllocator> GetTextureAllocator() const;
|
||||
|
||||
private:
|
||||
void InitStipplePen(Params const & params);
|
||||
|
||||
struct GlyphGroup
|
||||
{
|
||||
std::set<GlyphFontAndId> m_glyphKeys;
|
||||
|
||||
@@ -525,9 +525,11 @@ void ApplyPointFeature::ProcessPointRules(SymbolRuleProto const * symbolRule, Ca
|
||||
params.m_depth = PriorityToDepth(symbolRule->priority(), drule::symbol, 0);
|
||||
params.m_symbolName = symbolRule->name();
|
||||
ASSERT_GREATER_OR_EQUAL(symbolRule->min_distance(), 0, ());
|
||||
|
||||
// Where 0.1 comes from: https://github.com/organicmaps/organicmaps/pull/649
|
||||
auto const & vp = df::VisualParams::Instance();
|
||||
params.m_extendingSize =
|
||||
static_cast<uint32_t>(vp.GetVisualScale() * symbolRule->min_distance() * vp.GetPoiExtendScale());
|
||||
params.m_extendingSize = static_cast<uint32_t>(vp.GetVisualScale() * symbolRule->min_distance() * 0.1);
|
||||
|
||||
params.m_posZ = m_posZ;
|
||||
params.m_hasArea = HasArea();
|
||||
params.m_prioritized = createdByEditor;
|
||||
|
||||
@@ -17,8 +17,6 @@
|
||||
#include "drape/support_manager.hpp"
|
||||
#include "drape/texture_manager.hpp"
|
||||
|
||||
#include "indexer/scales.hpp"
|
||||
|
||||
#include "platform/platform.hpp"
|
||||
|
||||
#include "base/file_name_utils.hpp"
|
||||
@@ -355,18 +353,37 @@ void BackendRenderer::AcceptMessage(ref_ptr<Message> message)
|
||||
m_trafficGenerator->InvalidateTexturesCache();
|
||||
m_transitBuilder->RebuildSchemes(m_context, m_texMng);
|
||||
|
||||
// For Vulkan we initialize deferred cleaning up.
|
||||
if (m_context->GetApiVersion() == dp::ApiVersion::Vulkan)
|
||||
{
|
||||
std::vector<drape_ptr<dp::HWTexture>> textures;
|
||||
m_texMng->GetTexturesToCleanup(textures);
|
||||
if (!textures.empty())
|
||||
{
|
||||
m_commutator->PostMessage(ThreadsCommutator::RenderThread,
|
||||
make_unique_dp<CleanupTexturesMessage>(std::move(textures)), MessagePriority::Normal);
|
||||
}
|
||||
}
|
||||
CleanupTextures();
|
||||
break;
|
||||
}
|
||||
|
||||
case Message::Type::VisualScaleChanged:
|
||||
{
|
||||
ref_ptr<VisualScaleChangedMessage> msg = message;
|
||||
msg->FilterDependentMessages();
|
||||
|
||||
CHECK(m_context != nullptr, ());
|
||||
|
||||
dp::TextureManager::Params params;
|
||||
params.m_resPostfix = VisualParams::Instance().GetResourcePostfix();
|
||||
params.m_visualScale = df::VisualParams::Instance().GetVisualScale();
|
||||
#ifdef BUILD_DESIGNER
|
||||
params.m_patterns = "patterns_design.txt";
|
||||
#else
|
||||
params.m_patterns = "patterns.txt";
|
||||
#endif // BUILD_DESIGNER
|
||||
|
||||
m_texMng->OnVisualScaleChanged(m_context, params);
|
||||
|
||||
RecacheMapShapes();
|
||||
RecacheGui(m_lastWidgetsInfo, false /* needResetOldGui */);
|
||||
#ifdef RENDER_DEBUG_INFO_LABELS
|
||||
RecacheDebugLabels();
|
||||
#endif
|
||||
m_trafficGenerator->InvalidateTexturesCache();
|
||||
m_transitBuilder->RebuildSchemes(m_context, m_texMng);
|
||||
|
||||
CleanupTextures();
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -611,21 +628,8 @@ void BackendRenderer::AcceptMessage(ref_ptr<Message> message)
|
||||
m_arrow3dPreloadedData = Arrow3d::PreloadMesh(m_arrow3dCustomDecl, m_texMng);
|
||||
}
|
||||
|
||||
// Recache map shapes.
|
||||
RecacheMapShapes();
|
||||
|
||||
// For Vulkan we initialize deferred cleaning up.
|
||||
if (m_context->GetApiVersion() == dp::ApiVersion::Vulkan)
|
||||
{
|
||||
std::vector<drape_ptr<dp::HWTexture>> textures;
|
||||
m_texMng->GetTexturesToCleanup(textures);
|
||||
if (!textures.empty())
|
||||
{
|
||||
m_commutator->PostMessage(ThreadsCommutator::RenderThread,
|
||||
make_unique_dp<CleanupTexturesMessage>(std::move(textures)), MessagePriority::Normal);
|
||||
}
|
||||
}
|
||||
|
||||
CleanupTextures();
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -772,6 +776,18 @@ void BackendRenderer::RecacheMapShapes()
|
||||
m_commutator->PostMessage(ThreadsCommutator::RenderThread, std::move(msg), MessagePriority::Normal);
|
||||
}
|
||||
|
||||
void BackendRenderer::CleanupTextures()
|
||||
{
|
||||
// For Vulkan we initialize deferred cleaning up.
|
||||
if (m_context->GetApiVersion() == dp::ApiVersion::Vulkan)
|
||||
{
|
||||
auto textures = m_texMng->GetTexturesToCleanup();
|
||||
if (!textures.empty())
|
||||
m_commutator->PostMessage(ThreadsCommutator::RenderThread,
|
||||
make_unique_dp<CleanupTexturesMessage>(std::move(textures)), MessagePriority::Normal);
|
||||
}
|
||||
}
|
||||
|
||||
void BackendRenderer::FlushGeometry(TileKey const & key, dp::RenderState const & state,
|
||||
drape_ptr<dp::RenderBucket> && buffer)
|
||||
{
|
||||
|
||||
@@ -83,6 +83,7 @@ private:
|
||||
void RecacheGui(gui::TWidgetsInitInfo const & initInfo, bool needResetOldGui);
|
||||
void RecacheChoosePositionMark();
|
||||
void RecacheMapShapes();
|
||||
void CleanupTextures();
|
||||
|
||||
#ifdef RENDER_DEBUG_INFO_LABELS
|
||||
void RecacheDebugLabels();
|
||||
|
||||
@@ -897,10 +897,8 @@ void DrapeEngine::UpdateVisualScale(double vs, bool needStopRendering)
|
||||
if (needStopRendering)
|
||||
SetRenderingEnabled();
|
||||
|
||||
RecacheGui(false);
|
||||
RecacheMapShapes();
|
||||
m_threadCommutator->PostMessage(ThreadsCommutator::RenderThread,
|
||||
make_unique_dp<RecoverContextDependentResourcesMessage>(), MessagePriority::Normal);
|
||||
m_threadCommutator->PostMessage(ThreadsCommutator::RenderThread, make_unique_dp<UpdateVisualScaleMessage>(),
|
||||
MessagePriority::High);
|
||||
}
|
||||
|
||||
void DrapeEngine::UpdateMyPositionRoutingOffset(bool useDefault, int offsetY)
|
||||
|
||||
@@ -640,51 +640,11 @@ void FrontendRenderer::AcceptMessage(ref_ptr<Message> message)
|
||||
break;
|
||||
}
|
||||
|
||||
case Message::Type::RecoverContextDependentResources:
|
||||
{
|
||||
UpdateContextDependentResources();
|
||||
break;
|
||||
}
|
||||
case Message::Type::RecoverContextDependentResources: UpdateContextDependentResources(); break;
|
||||
|
||||
case Message::Type::UpdateMapStyle:
|
||||
{
|
||||
#ifdef BUILD_DESIGNER
|
||||
classificator::Load();
|
||||
#endif // BUILD_DESIGNER
|
||||
case Message::Type::UpdateMapStyle: UpdateAll<SwitchMapStyleMessage>(); break;
|
||||
|
||||
// Clear all graphics.
|
||||
for (RenderLayer & layer : m_layers)
|
||||
{
|
||||
layer.m_renderGroups.clear();
|
||||
layer.m_isDirty = false;
|
||||
}
|
||||
|
||||
// Must be recreated on map style changing.
|
||||
CHECK(m_context != nullptr, ());
|
||||
m_transitBackground = make_unique_dp<ScreenQuadRenderer>(m_context);
|
||||
|
||||
// Invalidate read manager.
|
||||
{
|
||||
BaseBlockingMessage::Blocker blocker;
|
||||
m_commutator->PostMessage(ThreadsCommutator::ResourceUploadThread,
|
||||
make_unique_dp<InvalidateReadManagerRectMessage>(blocker), MessagePriority::Normal);
|
||||
blocker.Wait();
|
||||
}
|
||||
|
||||
// Delete all messages which can contain render states (and textures references inside).
|
||||
auto f = [this]() { InstantMessageFilter([](ref_ptr<Message> msg) { return msg->ContainsRenderState(); }); };
|
||||
|
||||
// Notify backend renderer and wait for completion.
|
||||
{
|
||||
BaseBlockingMessage::Blocker blocker;
|
||||
m_commutator->PostMessage(ThreadsCommutator::ResourceUploadThread,
|
||||
make_unique_dp<SwitchMapStyleMessage>(blocker, std::move(f)), MessagePriority::Normal);
|
||||
blocker.Wait();
|
||||
}
|
||||
|
||||
UpdateContextDependentResources();
|
||||
break;
|
||||
}
|
||||
case Message::Type::VisualScaleChanged: UpdateAll<VisualScaleChangedMessage>(); break;
|
||||
|
||||
case Message::Type::AllowAutoZoom:
|
||||
{
|
||||
@@ -810,7 +770,7 @@ void FrontendRenderer::AcceptMessage(ref_ptr<Message> message)
|
||||
zoom = scales::GetAddNewPlaceScale();
|
||||
AddUserEvent(make_unique_dp<SetCenterEvent>(
|
||||
pt ? *pt : m_userEventStream.GetCurrentScreen().GlobalRect().Center(), zoom, true /* isAnim */,
|
||||
false /* trackVisibleViewport */, nullptr /* parallelAnimCreator */));
|
||||
true /* trackVisibleViewport */, nullptr /* parallelAnimCreator */));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1023,6 +983,46 @@ void FrontendRenderer::AcceptMessage(ref_ptr<Message> message)
|
||||
}
|
||||
}
|
||||
|
||||
template <class MessageT>
|
||||
void FrontendRenderer::UpdateAll()
|
||||
{
|
||||
#ifdef BUILD_DESIGNER
|
||||
classificator::Load();
|
||||
#endif // BUILD_DESIGNER
|
||||
|
||||
// Clear all graphics.
|
||||
for (RenderLayer & layer : m_layers)
|
||||
{
|
||||
layer.m_renderGroups.clear();
|
||||
layer.m_isDirty = false;
|
||||
}
|
||||
|
||||
// Must be recreated on map style changing.
|
||||
CHECK(m_context != nullptr, ());
|
||||
m_transitBackground = make_unique_dp<ScreenQuadRenderer>(m_context);
|
||||
|
||||
// Invalidate read manager.
|
||||
{
|
||||
BaseBlockingMessage::Blocker blocker;
|
||||
m_commutator->PostMessage(ThreadsCommutator::ResourceUploadThread,
|
||||
make_unique_dp<InvalidateReadManagerRectMessage>(blocker), MessagePriority::Normal);
|
||||
blocker.Wait();
|
||||
}
|
||||
|
||||
// Delete all messages which can contain render states (and textures references inside).
|
||||
auto f = [this]() { InstantMessageFilter([](ref_ptr<Message> msg) { return msg->ContainsRenderState(); }); };
|
||||
|
||||
// Notify backend renderer and wait for completion.
|
||||
{
|
||||
BaseBlockingMessage::Blocker blocker;
|
||||
m_commutator->PostMessage(ThreadsCommutator::ResourceUploadThread, make_unique_dp<MessageT>(blocker, std::move(f)),
|
||||
MessagePriority::Normal);
|
||||
blocker.Wait();
|
||||
}
|
||||
|
||||
UpdateContextDependentResources();
|
||||
}
|
||||
|
||||
std::unique_ptr<threads::IRoutine> FrontendRenderer::CreateRoutine()
|
||||
{
|
||||
return std::make_unique<Routine>(*this);
|
||||
|
||||
@@ -247,6 +247,9 @@ private:
|
||||
void ReleaseResources();
|
||||
void UpdateContextDependentResources();
|
||||
|
||||
template <class MessageT>
|
||||
void UpdateAll();
|
||||
|
||||
void BeginUpdateOverlayTree(ScreenBase const & modelView);
|
||||
void UpdateOverlayTree(ScreenBase const & modelView, drape_ptr<RenderGroup> & renderGroup);
|
||||
void EndUpdateOverlayTree();
|
||||
|
||||
@@ -103,6 +103,7 @@ std::string DebugPrint(Message::Type msgType)
|
||||
case Message::Type::EnableIsolines: return "EnableIsolines";
|
||||
case Message::Type::OnEnterBackground: return "OnEnterBackground";
|
||||
case Message::Type::Arrow3dRecache: return "Arrow3dRecache";
|
||||
case Message::Type::VisualScaleChanged: return "VisualScaleChanged";
|
||||
}
|
||||
ASSERT(false, ("Unknown message type."));
|
||||
return "Unknown type";
|
||||
|
||||
@@ -103,7 +103,8 @@ public:
|
||||
NotifyGraphicsReady,
|
||||
EnableIsolines,
|
||||
OnEnterBackground,
|
||||
Arrow3dRecache
|
||||
Arrow3dRecache,
|
||||
VisualScaleChanged,
|
||||
};
|
||||
|
||||
virtual ~Message() = default;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "drape_frontend/circles_pack_shape.hpp"
|
||||
#include "drape_frontend/color_constants.hpp"
|
||||
#include "drape_frontend/custom_features_context.hpp"
|
||||
#include "drape_frontend/drape_api.hpp"
|
||||
#include "drape_frontend/drape_api_builder.hpp"
|
||||
@@ -14,8 +13,7 @@
|
||||
#include "drape_frontend/overlay_batcher.hpp"
|
||||
#include "drape_frontend/postprocess_renderer.hpp"
|
||||
#include "drape_frontend/render_node.hpp"
|
||||
#include "drape_frontend/render_state_extension.hpp"
|
||||
#include "drape_frontend/route_builder.hpp"
|
||||
#include "drape_frontend/route_shape.hpp"
|
||||
#include "drape_frontend/selection_shape.hpp"
|
||||
#include "drape_frontend/tile_utils.hpp"
|
||||
#include "drape_frontend/traffic_generator.hpp"
|
||||
@@ -26,13 +24,10 @@
|
||||
|
||||
#include "drape/pointers.hpp"
|
||||
#include "drape/render_bucket.hpp"
|
||||
#include "drape/viewport.hpp"
|
||||
|
||||
#include "platform/location.hpp"
|
||||
|
||||
#include "geometry/polyline2d.hpp"
|
||||
#include "geometry/rect2d.hpp"
|
||||
#include "geometry/screenbase.hpp"
|
||||
#include "geometry/triangle2d.hpp"
|
||||
|
||||
#include <condition_variable>
|
||||
@@ -40,7 +35,6 @@
|
||||
#include <map>
|
||||
#include <mutex>
|
||||
#include <optional>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace df
|
||||
@@ -737,6 +731,12 @@ public:
|
||||
Type GetType() const override { return Type::UpdateMapStyle; }
|
||||
};
|
||||
|
||||
class UpdateVisualScaleMessage : public Message
|
||||
{
|
||||
public:
|
||||
Type GetType() const override { return Type::VisualScaleChanged; }
|
||||
};
|
||||
|
||||
class FollowRouteMessage : public Message
|
||||
{
|
||||
public:
|
||||
@@ -783,6 +783,14 @@ private:
|
||||
FilterMessagesHandler m_filterMessagesHandler;
|
||||
};
|
||||
|
||||
class VisualScaleChangedMessage : public SwitchMapStyleMessage
|
||||
{
|
||||
public:
|
||||
using SwitchMapStyleMessage::SwitchMapStyleMessage;
|
||||
|
||||
Type GetType() const override { return Type::VisualScaleChanged; }
|
||||
};
|
||||
|
||||
class InvalidateMessage : public Message
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -4,14 +4,8 @@
|
||||
|
||||
#include "indexer/scales.hpp"
|
||||
|
||||
#include "platform/settings.hpp"
|
||||
|
||||
#include "geometry/angles.hpp"
|
||||
#include "geometry/distance_on_sphere.hpp"
|
||||
#include "geometry/point2d.hpp"
|
||||
#include "geometry/transformations.hpp"
|
||||
|
||||
#include "base/logging.hpp"
|
||||
|
||||
namespace df
|
||||
{
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
#include "geometry/screenbase.hpp"
|
||||
|
||||
#include "base/matrix.hpp"
|
||||
|
||||
namespace df
|
||||
{
|
||||
extern double const kDefault3dScale;
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
#include "screen_operations.hpp"
|
||||
|
||||
#include "drape_frontend/animation/interpolators.hpp"
|
||||
#include "drape_frontend/animation/linear_animation.hpp"
|
||||
#include "drape_frontend/animation/scale_animation.hpp"
|
||||
#include "drape_frontend/animation_constants.hpp"
|
||||
#include "drape_frontend/visual_params.hpp"
|
||||
|
||||
#include "indexer/scales.hpp"
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#include "drape_frontend/visual_params.hpp"
|
||||
|
||||
#include "indexer/scales.hpp"
|
||||
|
||||
#include "coding/point_coding.hpp" // kMwmPointAccuracy
|
||||
|
||||
#include "geometry/mercator.hpp"
|
||||
|
||||
#include "base/assert.hpp"
|
||||
@@ -12,21 +16,11 @@
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <limits>
|
||||
#include <utility>
|
||||
|
||||
namespace df
|
||||
{
|
||||
using VisualScale = std::pair<std::string, double>;
|
||||
|
||||
#ifdef DEBUG
|
||||
static bool g_isInited = false;
|
||||
#define RISE_INITED g_isInited = true
|
||||
#define ASSERT_INITED ASSERT(g_isInited, ())
|
||||
#else
|
||||
#define RISE_INITED
|
||||
#define ASSERT_INITED
|
||||
#endif
|
||||
|
||||
VisualParams & VisualParams::Instance()
|
||||
{
|
||||
static VisualParams vizParams;
|
||||
@@ -35,7 +29,8 @@ VisualParams & VisualParams::Instance()
|
||||
|
||||
void VisualParams::Init(double vs, uint32_t tileSize)
|
||||
{
|
||||
ASSERT_LESS_OR_EQUAL(vs, kMaxVisualScale, ());
|
||||
CHECK(vs >= 1.0 && vs <= kMaxVisualScale, (vs));
|
||||
CHECK(tileSize >= 32, (tileSize));
|
||||
|
||||
VisualParams & vizParams = Instance();
|
||||
vizParams.m_tileSize = tileSize;
|
||||
@@ -47,35 +42,34 @@ void VisualParams::Init(double vs, uint32_t tileSize)
|
||||
else
|
||||
vizParams.m_glyphVisualParams = {0.5f, 0.06f, 0.2f, 0.01f, 0.49f, 0.04f};
|
||||
|
||||
RISE_INITED;
|
||||
vizParams.m_isInited = true;
|
||||
|
||||
LOG(LINFO, ("Visual scale =", vs, "; Tile size =", tileSize, "; Resources =", GetResourcePostfix(vs)));
|
||||
}
|
||||
|
||||
double VisualParams::GetFontScale() const
|
||||
{
|
||||
ASSERT_INITED;
|
||||
ASSERT(m_isInited, ());
|
||||
return m_fontScale;
|
||||
}
|
||||
|
||||
void VisualParams::SetFontScale(double fontScale)
|
||||
{
|
||||
ASSERT_INITED;
|
||||
ASSERT(m_isInited, ());
|
||||
m_fontScale = math::Clamp(fontScale, 0.5, 2.0);
|
||||
}
|
||||
|
||||
void VisualParams::SetVisualScale(double visualScale)
|
||||
void VisualParams::SetVisualScale(double vs)
|
||||
{
|
||||
ASSERT_INITED;
|
||||
ASSERT_LESS_OR_EQUAL(visualScale, kMaxVisualScale, ());
|
||||
m_visualScale = visualScale;
|
||||
ASSERT(m_isInited, ());
|
||||
CHECK(vs >= 1.0 && vs <= kMaxVisualScale, (vs));
|
||||
m_visualScale = vs;
|
||||
|
||||
LOG(LINFO, ("Visual scale =", visualScale));
|
||||
LOG(LINFO, ("Visual scale =", vs));
|
||||
}
|
||||
|
||||
std::string const & VisualParams::GetResourcePostfix(double visualScale)
|
||||
{
|
||||
ASSERT_INITED;
|
||||
static VisualScale postfixes[] = {
|
||||
/// @todo Not used in mobile because of minimal visual scale (@see visual_scale.hpp)
|
||||
{"mdpi", kMdpiScale},
|
||||
@@ -103,52 +97,61 @@ std::string const & VisualParams::GetResourcePostfix(double visualScale)
|
||||
|
||||
std::string const & VisualParams::GetResourcePostfix() const
|
||||
{
|
||||
ASSERT_INITED;
|
||||
ASSERT(m_isInited, ());
|
||||
return VisualParams::GetResourcePostfix(m_visualScale);
|
||||
}
|
||||
|
||||
double VisualParams::GetVisualScale() const
|
||||
{
|
||||
ASSERT_INITED;
|
||||
ASSERT(m_isInited, ());
|
||||
return m_visualScale;
|
||||
}
|
||||
|
||||
double VisualParams::GetPoiExtendScale() const
|
||||
{
|
||||
ASSERT_INITED;
|
||||
return m_poiExtendScale;
|
||||
}
|
||||
|
||||
uint32_t VisualParams::GetTileSize() const
|
||||
{
|
||||
ASSERT_INITED;
|
||||
CHECK(m_isInited, ());
|
||||
return m_tileSize;
|
||||
}
|
||||
|
||||
uint32_t VisualParams::GetTouchRectRadius() const
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
ASSERT_INITED;
|
||||
float constexpr kRadiusInPixels = 20.0f;
|
||||
=======
|
||||
ASSERT(m_isInited, ());
|
||||
float const kRadiusInPixels = 20.0f;
|
||||
>>>>>>> 9cff373c8 ([drape] Refactor VisualParams.)
|
||||
return static_cast<uint32_t>(kRadiusInPixels * GetVisualScale());
|
||||
}
|
||||
|
||||
double VisualParams::GetDragThreshold() const
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
ASSERT_INITED;
|
||||
double constexpr kDragThresholdInPixels = 10.0;
|
||||
=======
|
||||
ASSERT(m_isInited, ());
|
||||
double const kDragThresholdInPixels = 10.0;
|
||||
>>>>>>> 9cff373c8 ([drape] Refactor VisualParams.)
|
||||
return kDragThresholdInPixels * GetVisualScale();
|
||||
}
|
||||
|
||||
double VisualParams::GetScaleThreshold() const
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
ASSERT_INITED;
|
||||
double constexpr kScaleThresholdInPixels = 2.0;
|
||||
=======
|
||||
ASSERT(m_isInited, ());
|
||||
double const kScaleThresholdInPixels = 2.0;
|
||||
>>>>>>> 9cff373c8 ([drape] Refactor VisualParams.)
|
||||
return kScaleThresholdInPixels * GetVisualScale();
|
||||
}
|
||||
|
||||
VisualParams::GlyphVisualParams const & VisualParams::GetGlyphVisualParams() const
|
||||
{
|
||||
ASSERT_INITED;
|
||||
ASSERT(m_isInited, ());
|
||||
return m_glyphVisualParams;
|
||||
}
|
||||
|
||||
@@ -178,8 +181,7 @@ int GetTileScaleBase(ScreenBase const & s)
|
||||
|
||||
int GetTileScaleBase(m2::RectD const & r)
|
||||
{
|
||||
double const sz = std::max(r.SizeX(), r.SizeY());
|
||||
ASSERT_GREATER(sz, 0., ("Rect should not be a point:", r));
|
||||
double const sz = std::max(std::max(r.SizeX(), r.SizeY()), kMwmPointAccuracy);
|
||||
return std::max(1, math::iround(std::log2(mercator::Bounds::kRangeX / sz)));
|
||||
}
|
||||
|
||||
@@ -190,7 +192,7 @@ double GetTileScaleBase(double drawScale)
|
||||
|
||||
int GetTileScaleIncrement(uint32_t tileSize, double visualScale)
|
||||
{
|
||||
return static_cast<int>(std::log2(tileSize / 256.0 / visualScale));
|
||||
return math::iround(std::log2(tileSize / 256.0 / visualScale));
|
||||
}
|
||||
|
||||
int GetTileScaleIncrement()
|
||||
@@ -257,10 +259,18 @@ uint32_t CalculateTileSize(uint32_t screenWidth, uint32_t screenHeight)
|
||||
#endif
|
||||
}
|
||||
|
||||
namespace
|
||||
{
|
||||
double GetDrawTileScale(double baseScale)
|
||||
{
|
||||
return baseScale + GetTileScaleIncrement();
|
||||
}
|
||||
|
||||
int GetDrawTileScale(int baseScale, uint32_t tileSize, double visualScale)
|
||||
{
|
||||
return std::max(1, baseScale + GetTileScaleIncrement(tileSize, visualScale));
|
||||
return baseScale + GetTileScaleIncrement(tileSize, visualScale);
|
||||
}
|
||||
} // namespace
|
||||
|
||||
int GetDrawTileScale(ScreenBase const & s, uint32_t tileSize, double visualScale)
|
||||
{
|
||||
@@ -272,17 +282,6 @@ int GetDrawTileScale(m2::RectD const & r, uint32_t tileSize, double visualScale)
|
||||
return GetDrawTileScale(GetTileScaleBase(r), tileSize, visualScale);
|
||||
}
|
||||
|
||||
int GetDrawTileScale(int baseScale)
|
||||
{
|
||||
VisualParams const & p = VisualParams::Instance();
|
||||
return GetDrawTileScale(baseScale, p.GetTileSize(), p.GetVisualScale());
|
||||
}
|
||||
|
||||
double GetDrawTileScale(double baseScale)
|
||||
{
|
||||
return std::max(1.0, baseScale + GetTileScaleIncrement());
|
||||
}
|
||||
|
||||
int GetDrawTileScale(ScreenBase const & s)
|
||||
{
|
||||
VisualParams const & p = VisualParams::Instance();
|
||||
|
||||
@@ -1,15 +1,10 @@
|
||||
#pragma once
|
||||
#include "indexer/scales.hpp"
|
||||
|
||||
#include "geometry/rect2d.hpp"
|
||||
#include "geometry/screenbase.hpp"
|
||||
|
||||
#include "base/macros.hpp"
|
||||
|
||||
#include <atomic>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace df
|
||||
{
|
||||
@@ -36,8 +31,6 @@ public:
|
||||
std::string const & GetResourcePostfix() const;
|
||||
|
||||
double GetVisualScale() const;
|
||||
/// This is a scale factor to decrease extending of bbox for POI icons. It could be removed with new style
|
||||
double GetPoiExtendScale() const;
|
||||
uint32_t GetTileSize() const;
|
||||
|
||||
/// How many pixels around touch point are used to get bookmark or POI in consideration of visual scale.
|
||||
@@ -62,7 +55,7 @@ public:
|
||||
void SetFontScale(double fontScale);
|
||||
|
||||
// This method can be called ONLY if rendering is disabled.
|
||||
void SetVisualScale(double visualScale);
|
||||
void SetVisualScale(double vs);
|
||||
|
||||
private:
|
||||
VisualParams() = default;
|
||||
@@ -71,8 +64,8 @@ private:
|
||||
|
||||
uint32_t m_tileSize = 0;
|
||||
double m_visualScale = 0.0;
|
||||
double m_poiExtendScale = 0.1; // Found empirically.
|
||||
std::atomic<double> m_fontScale = 1.0;
|
||||
double m_fontScale = 1.0;
|
||||
bool m_isInited = false;
|
||||
|
||||
DISALLOW_COPY_AND_MOVE(VisualParams);
|
||||
};
|
||||
@@ -89,11 +82,8 @@ double GetTileScaleBase(double drawScale);
|
||||
int GetTileScaleIncrement(uint32_t tileSize, double visualScale);
|
||||
int GetTileScaleIncrement();
|
||||
|
||||
int GetDrawTileScale(int baseScale, uint32_t tileSize, double visualScale);
|
||||
int GetDrawTileScale(ScreenBase const & s, uint32_t tileSize, double visualScale);
|
||||
int GetDrawTileScale(m2::RectD const & r, uint32_t tileSize, double visualScale);
|
||||
int GetDrawTileScale(int baseScale);
|
||||
double GetDrawTileScale(double baseScale);
|
||||
int GetDrawTileScale(ScreenBase const & s);
|
||||
int GetDrawTileScale(m2::RectD const & r);
|
||||
|
||||
|
||||
@@ -5,8 +5,6 @@ set(SRC
|
||||
altitude_loader.hpp
|
||||
brands_holder.cpp
|
||||
brands_holder.hpp
|
||||
caching_rank_table_loader.cpp
|
||||
caching_rank_table_loader.hpp
|
||||
categories_holder.cpp
|
||||
categories_holder.hpp
|
||||
categories_holder_loader.cpp
|
||||
@@ -155,7 +153,6 @@ file(COPY ${OTHER_FILES} DESTINATION ${CMAKE_BINARY_DIR})
|
||||
omim_add_library(${PROJECT_NAME} ${SRC})
|
||||
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
search # search::DummyRankTable in CachingRankTableLoader
|
||||
platform
|
||||
geometry
|
||||
protobuf
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
#include "indexer/caching_rank_table_loader.hpp"
|
||||
|
||||
#include "search/dummy_rank_table.hpp"
|
||||
|
||||
#include "indexer/data_source.hpp"
|
||||
|
||||
CachingRankTableLoader::CachingRankTableLoader(DataSource const & dataSource, std::string const & sectionName)
|
||||
: m_dataSource(dataSource)
|
||||
, m_sectionName(sectionName)
|
||||
{}
|
||||
|
||||
uint8_t CachingRankTableLoader::Get(FeatureID const & featureId) const
|
||||
{
|
||||
auto const handle = m_dataSource.GetMwmHandleById(featureId.m_mwmId);
|
||||
|
||||
if (!handle.IsAlive())
|
||||
return search::RankTable::kNoRank;
|
||||
|
||||
auto it = m_deserializers.find(featureId.m_mwmId);
|
||||
|
||||
if (it == m_deserializers.end())
|
||||
{
|
||||
auto rankTable = search::RankTable::Load(handle.GetValue()->m_cont, m_sectionName);
|
||||
|
||||
if (!rankTable)
|
||||
rankTable = std::make_unique<search::DummyRankTable>();
|
||||
|
||||
auto const result = m_deserializers.emplace(featureId.m_mwmId, std::move(rankTable));
|
||||
it = result.first;
|
||||
}
|
||||
|
||||
return it->second->Get(featureId.m_index);
|
||||
}
|
||||
|
||||
void CachingRankTableLoader::OnMwmDeregistered(platform::LocalCountryFile const & localFile)
|
||||
{
|
||||
for (auto it = m_deserializers.begin(); it != m_deserializers.end(); ++it)
|
||||
{
|
||||
if (it->first.IsDeregistered(localFile))
|
||||
{
|
||||
m_deserializers.erase(it);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "indexer/feature_decl.hpp"
|
||||
#include "indexer/mwm_set.hpp"
|
||||
#include "indexer/rank_table.hpp"
|
||||
|
||||
#include "base/macros.hpp"
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
class DataSource;
|
||||
struct FeatureID;
|
||||
|
||||
// *NOTE* This class IS NOT thread-safe.
|
||||
class CachingRankTableLoader
|
||||
{
|
||||
public:
|
||||
CachingRankTableLoader(DataSource const & dataSource, std::string const & sectionName);
|
||||
|
||||
/// @return 0 if there is no rank for feature.
|
||||
uint8_t Get(FeatureID const & featureId) const;
|
||||
void OnMwmDeregistered(platform::LocalCountryFile const & localFile);
|
||||
|
||||
private:
|
||||
DataSource const & m_dataSource;
|
||||
std::string const m_sectionName;
|
||||
mutable std::map<MwmSet::MwmId, std::unique_ptr<search::RankTable>> m_deserializers;
|
||||
|
||||
DISALLOW_COPY(CachingRankTableLoader);
|
||||
};
|
||||
@@ -276,7 +276,6 @@ Framework::Framework(FrameworkParams const & params, bool loadMaps)
|
||||
, m_trafficManager(bind(&Framework::GetMwmsByRect, this, _1, false /* rough */), kMaxTrafficCacheSizeBytes,
|
||||
m_routingManager.RoutingSession())
|
||||
, m_lastReportedCountry(kInvalidCountryId)
|
||||
, m_popularityLoader(m_featuresFetcher.GetDataSource(), POPULARITY_RANKS_FILE_TAG)
|
||||
, m_descriptionsLoader(std::make_unique<descriptions::Loader>(m_featuresFetcher.GetDataSource()))
|
||||
{
|
||||
// Editor should be initialized from the main thread to set its ThreadChecker.
|
||||
@@ -445,7 +444,7 @@ void Framework::OnMapDeregistered(platform::LocalCountryFile const & localFile)
|
||||
m_transitManager.OnMwmDeregistered(localFile);
|
||||
m_isolinesManager.OnMwmDeregistered(localFile);
|
||||
m_trafficManager.OnMwmDeregistered(localFile);
|
||||
m_popularityLoader.OnMwmDeregistered(localFile);
|
||||
m_descriptionsLoader->OnMwmDeregistered(localFile);
|
||||
|
||||
m_storage.DeleteCustomCountryVersion(localFile);
|
||||
};
|
||||
@@ -3072,10 +3071,6 @@ osm::Editor::SaveResult Framework::SaveEditedMapObject(osm::EditableMapObject em
|
||||
|
||||
auto const result = osm::Editor::Instance().SaveEditedFeature(emo);
|
||||
|
||||
// Automatically select newly created and edited objects.
|
||||
if (m_currentPlacePageInfo)
|
||||
DeactivateMapSelection();
|
||||
|
||||
place_page::BuildInfo info;
|
||||
info.m_mercator = emo.GetMercator();
|
||||
info.m_featureId = emo.GetID();
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
#include "editor/new_feature_categories.hpp"
|
||||
#include "editor/osm_editor.hpp"
|
||||
|
||||
#include "indexer/caching_rank_table_loader.hpp"
|
||||
#include "indexer/data_source.hpp"
|
||||
#include "indexer/data_source_helpers.hpp"
|
||||
#include "indexer/map_object.hpp"
|
||||
@@ -484,8 +483,6 @@ private:
|
||||
|
||||
TrackRecordingUpdateHandler m_trackRecordingUpdateHandler;
|
||||
|
||||
CachingRankTableLoader m_popularityLoader;
|
||||
|
||||
std::unique_ptr<descriptions::Loader> m_descriptionsLoader;
|
||||
|
||||
public:
|
||||
|
||||
@@ -57,5 +57,16 @@ std::string DebugPrint(ScopedDir const & dir)
|
||||
os << "ScopedDir [" << dir.GetFullPath() << "]";
|
||||
return os.str();
|
||||
}
|
||||
|
||||
ScopedDirCleanup::ScopedDirCleanup(std::string const & path) : m_fullPath(path)
|
||||
{
|
||||
UNUSED_VALUE(Platform::MkDir(m_fullPath));
|
||||
}
|
||||
|
||||
ScopedDirCleanup::~ScopedDirCleanup()
|
||||
{
|
||||
UNUSED_VALUE(Platform::RmDirRecursively(m_fullPath));
|
||||
}
|
||||
|
||||
} // namespace tests_support
|
||||
} // namespace platform
|
||||
|
||||
@@ -38,6 +38,15 @@ private:
|
||||
DISALLOW_COPY_AND_MOVE(ScopedDir);
|
||||
};
|
||||
|
||||
class ScopedDirCleanup
|
||||
{
|
||||
std::string const m_fullPath;
|
||||
|
||||
public:
|
||||
explicit ScopedDirCleanup(std::string const & path);
|
||||
~ScopedDirCleanup();
|
||||
};
|
||||
|
||||
std::string DebugPrint(ScopedDir const & dir);
|
||||
} // namespace tests_support
|
||||
} // namespace platform
|
||||
|
||||
@@ -1506,10 +1506,9 @@ void QueryParams::ClearStreetIndices()
|
||||
char const * arr[] = {
|
||||
"a", "and", "s", "the", // English
|
||||
"am", "an", "auf", "der", "im", "und", "zum", // German
|
||||
"as", "d", "da", "das", "de", "del", "di", "do",
|
||||
"dos", "du", "e", "el", "et", "la", "las", "le",
|
||||
"les", "los", "o", "os", "y", // French, Italian, Portuguese, Spanish
|
||||
"в", "и", "на", "я" // Cyrillic
|
||||
"d", "da", "de", "del", "di", "du", "el",
|
||||
"et", "la", "las", "le", "les", "los", "y", // French, Spanish, Italian
|
||||
"в", "и", "на", "я" // Cyrillic
|
||||
};
|
||||
for (char const * s : arr)
|
||||
m_strings.insert(NormalizeAndSimplifyString(s));
|
||||
|
||||
@@ -339,7 +339,8 @@ void MapWidget::ShowInfoPopup(QMouseEvent * e, m2::PointD const & pt)
|
||||
auto types = feature::TypesHolder(ft);
|
||||
types.SortBySpec();
|
||||
for (auto const & type : types.ToObjectNames())
|
||||
concat += type + " ";
|
||||
concat = concat + type + " ";
|
||||
concat = concat + "| " + DebugPrint(ft.GetGeomType());
|
||||
addStringFn(concat);
|
||||
|
||||
// Name
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#include "base/assert.hpp"
|
||||
#include "base/logging.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <limits>
|
||||
|
||||
@@ -200,7 +199,7 @@ void UpdateDialog::OnItemClick(QTreeWidgetItem * item, int column)
|
||||
case NodeStatus::Partly: st.DownloadNode(countryId); break;
|
||||
|
||||
case NodeStatus::InQueue:
|
||||
case NodeStatus::Downloading: st.DeleteNode(countryId); break;
|
||||
case NodeStatus::Downloading: st.CancelDownloadNode(countryId); break;
|
||||
|
||||
case NodeStatus::Applying:
|
||||
// Do nothing.
|
||||
|
||||
@@ -38,7 +38,7 @@ def multithread_run_if_one_country(func):
|
||||
kwargs.update({"threads_count": settings.THREADS_COUNT})
|
||||
# Otherwise index stage of Taiwan_* mwms continues to run after all other mwms have finished:
|
||||
elif country == 'Taiwan_North':
|
||||
kwargs.update({"threads_count": 5})
|
||||
kwargs.update({"threads_count": 6})
|
||||
elif country == 'Taiwan_South':
|
||||
kwargs.update({"threads_count": 2})
|
||||
func(env, country, **kwargs)
|
||||
|
||||
@@ -31,22 +31,22 @@ python3 -m venv /tmp/venv
|
||||
echo "<$(date +%T)> Copying map generator INI..."
|
||||
cp var/etc/map_generator.ini.prod var/etc/map_generator.ini
|
||||
|
||||
GENARGS=""
|
||||
$GENARGS=""
|
||||
|
||||
if [ $MWMTEST == "true" ]; then
|
||||
if [ $MWMTEST -gt 0 ]; then
|
||||
echo "Marking as a test (non-prod) generation"
|
||||
# TODO: output test maps into e.g. osm-maps-test/ and use a different generation.log
|
||||
GENARGS="$GENARGS -s=test"
|
||||
$GENARGS="$GENARGS -s=test"
|
||||
fi
|
||||
|
||||
if [ $MWMCONTINUE == "true" ]; then
|
||||
if [ $MWMCONTINUE -gt 0 ]; then
|
||||
echo "Continuing from preexisting generator run"
|
||||
GENARGS="$GENARGS --continue"
|
||||
$GENARGS="$GENARGS --continue"
|
||||
fi
|
||||
|
||||
if [[ -n $MWMCOUNTRIES ]]; then
|
||||
echo "Generating only specific maps for [$MWMCOUNTRIES]"
|
||||
GENARGS="$GENARGS --countries=$MWMCOUNTRIES"
|
||||
$GENARGS="$GENARGS --countries=$MWMCOUNTRIES"
|
||||
fi
|
||||
|
||||
cd ~/comaps/tools/python
|
||||
|
||||
@@ -46,8 +46,6 @@
|
||||
394E1E0B22BBB5EB00E4BC75 /* utils.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 394E1E0922BBB5EB00E4BC75 /* utils.hpp */; };
|
||||
39F376C0207D32450058E8E0 /* cities_boundaries_serdes_tests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39F376BE207D32410058E8E0 /* cities_boundaries_serdes_tests.cpp */; };
|
||||
39F376C3207D32510058E8E0 /* scale_index_reading_tests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39F376C1207D324E0058E8E0 /* scale_index_reading_tests.cpp */; };
|
||||
3D12E3D72111B4BE0015A9A9 /* caching_rank_table_loader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3D12E3D52111B4BD0015A9A9 /* caching_rank_table_loader.cpp */; };
|
||||
3D12E3D82111B4BE0015A9A9 /* caching_rank_table_loader.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3D12E3D62111B4BD0015A9A9 /* caching_rank_table_loader.hpp */; };
|
||||
3D489BC61D3D220F0052AA38 /* editable_map_object_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3D489BA71D3D1F8A0052AA38 /* editable_map_object_test.cpp */; };
|
||||
3D489BC71D3D22150052AA38 /* features_vector_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3D489BA81D3D1F8A0052AA38 /* features_vector_test.cpp */; };
|
||||
3D489BC81D3D22190052AA38 /* string_slice_tests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3D489BA91D3D1F8A0052AA38 /* string_slice_tests.cpp */; };
|
||||
@@ -271,8 +269,6 @@
|
||||
394E1E0922BBB5EB00E4BC75 /* utils.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = utils.hpp; sourceTree = "<group>"; };
|
||||
39F376BE207D32410058E8E0 /* cities_boundaries_serdes_tests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cities_boundaries_serdes_tests.cpp; sourceTree = "<group>"; };
|
||||
39F376C1207D324E0058E8E0 /* scale_index_reading_tests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = scale_index_reading_tests.cpp; sourceTree = "<group>"; };
|
||||
3D12E3D52111B4BD0015A9A9 /* caching_rank_table_loader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = caching_rank_table_loader.cpp; sourceTree = "<group>"; };
|
||||
3D12E3D62111B4BD0015A9A9 /* caching_rank_table_loader.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = caching_rank_table_loader.hpp; sourceTree = "<group>"; };
|
||||
3D452AF71EE6D9F5009EAB9B /* wheelchair_tests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wheelchair_tests.cpp; sourceTree = "<group>"; };
|
||||
3D452AF81EE6D9F5009EAB9B /* feature_names_test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = feature_names_test.cpp; sourceTree = "<group>"; };
|
||||
3D452AF91EE6D9F5009EAB9B /* centers_table_test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = centers_table_test.cpp; sourceTree = "<group>"; };
|
||||
@@ -609,8 +605,6 @@
|
||||
34664CEF1D49FEC1003D7096 /* altitude_loader.hpp */,
|
||||
4088CE1F21AE993F00E2702A /* brands_holder.cpp */,
|
||||
4088CE1E21AE993F00E2702A /* brands_holder.hpp */,
|
||||
3D12E3D52111B4BD0015A9A9 /* caching_rank_table_loader.cpp */,
|
||||
3D12E3D62111B4BD0015A9A9 /* caching_rank_table_loader.hpp */,
|
||||
56C74C121C749E4700B71B9F /* categories_holder_loader.cpp */,
|
||||
56C74C131C749E4700B71B9F /* categories_holder.cpp */,
|
||||
56C74C141C749E4700B71B9F /* categories_holder.hpp */,
|
||||
@@ -788,7 +782,6 @@
|
||||
347F337D1C454242009758CC /* succinct_trie_builder.hpp in Headers */,
|
||||
675341381A3F540F00A0A8C3 /* mwm_set.hpp in Headers */,
|
||||
456E1B181F90E5B7009C32E1 /* cities_boundaries_serdes.hpp in Headers */,
|
||||
3D12E3D82111B4BE0015A9A9 /* caching_rank_table_loader.hpp in Headers */,
|
||||
670EE56D1B60033A001E8064 /* unique_index.hpp in Headers */,
|
||||
675340FF1A3F540F00A0A8C3 /* cell_coverer.hpp in Headers */,
|
||||
56C74C251C749E4700B71B9F /* search_string_utils.hpp in Headers */,
|
||||
@@ -1001,7 +994,6 @@
|
||||
6753410D1A3F540F00A0A8C3 /* drawing_rules.cpp in Sources */,
|
||||
675341301A3F540F00A0A8C3 /* data_source.cpp in Sources */,
|
||||
34664CF61D49FEC1003D7096 /* centers_table.cpp in Sources */,
|
||||
3D12E3D72111B4BE0015A9A9 /* caching_rank_table_loader.cpp in Sources */,
|
||||
6753414D1A3F540F00A0A8C3 /* types_mapping.cpp in Sources */,
|
||||
34583BC71C88552100F94664 /* cuisines.cpp in Sources */,
|
||||
675341121A3F540F00A0A8C3 /* feature_algo.cpp in Sources */,
|
||||
|
||||
@@ -50,8 +50,6 @@
|
||||
671ED38F20D403B300D4317E /* search_api_tests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 671ED38A20D403B300D4317E /* search_api_tests.cpp */; };
|
||||
674A29F01B26FD6F001A525C /* testingmain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 674A29EE1B26FD5F001A525C /* testingmain.cpp */; };
|
||||
674A2A2F1B26FF7B001A525C /* libmap.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 675345BB1A4054AD00A0A8C3 /* libmap.a */; };
|
||||
674A2A361B27011A001A525C /* working_time_tests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 674A2A351B27011A001A525C /* working_time_tests.cpp */; };
|
||||
674A2A381B2715FB001A525C /* osm_opening_hours.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 674A2A371B2715FB001A525C /* osm_opening_hours.hpp */; };
|
||||
674C38621BFF3095000D603B /* user_mark.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 674C385F1BFF3095000D603B /* user_mark.cpp */; };
|
||||
675346481A4054E800A0A8C3 /* bookmark_manager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 675345D91A4054E800A0A8C3 /* bookmark_manager.cpp */; };
|
||||
675346491A4054E800A0A8C3 /* bookmark_manager.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 675345DA1A4054E800A0A8C3 /* bookmark_manager.hpp */; };
|
||||
@@ -202,8 +200,6 @@
|
||||
674A29CF1B26FCFE001A525C /* mwm_url_tests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = mwm_url_tests.cpp; sourceTree = "<group>"; };
|
||||
674A29DF1B26FD1C001A525C /* map_tests.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = map_tests.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
674A29EE1B26FD5F001A525C /* testingmain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = testingmain.cpp; path = ../../../libs/testing/testingmain.cpp; sourceTree = "<group>"; };
|
||||
674A2A351B27011A001A525C /* working_time_tests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = working_time_tests.cpp; sourceTree = "<group>"; };
|
||||
674A2A371B2715FB001A525C /* osm_opening_hours.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = osm_opening_hours.hpp; sourceTree = "<group>"; };
|
||||
674C385F1BFF3095000D603B /* user_mark.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = user_mark.cpp; sourceTree = "<group>"; };
|
||||
675345BB1A4054AD00A0A8C3 /* libmap.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libmap.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
675345D91A4054E800A0A8C3 /* bookmark_manager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = bookmark_manager.cpp; sourceTree = "<group>"; };
|
||||
@@ -357,7 +353,6 @@
|
||||
671ED38A20D403B300D4317E /* search_api_tests.cpp */,
|
||||
674A29EE1B26FD5F001A525C /* testingmain.cpp */,
|
||||
BB421D6A1E8C0026005BFA4D /* transliteration_test.cpp */,
|
||||
674A2A351B27011A001A525C /* working_time_tests.cpp */,
|
||||
ED49D74B2CEF3CE3004AF27E /* elevation_info_tests.cpp */,
|
||||
ED85D1CF2D5F508700D8075D /* track_statistics_tests.cpp */,
|
||||
);
|
||||
@@ -432,7 +427,6 @@
|
||||
45F6EE9B1FB1C77500019892 /* mwm_tree.hpp */,
|
||||
675346051A4054E800A0A8C3 /* mwm_url.cpp */,
|
||||
675346061A4054E800A0A8C3 /* mwm_url.hpp */,
|
||||
674A2A371B2715FB001A525C /* osm_opening_hours.hpp */,
|
||||
34583BCD1C88556800F94664 /* place_page_info.cpp */,
|
||||
34583BCE1C88556800F94664 /* place_page_info.hpp */,
|
||||
3DF528D5237DC82E000ED0D5 /* position_provider.hpp */,
|
||||
@@ -519,7 +513,6 @@
|
||||
6753469C1A4054E800A0A8C3 /* track.hpp in Headers */,
|
||||
675346651A4054E800A0A8C3 /* framework.hpp in Headers */,
|
||||
BBA014B120754997007402E4 /* user_mark_id_storage.hpp in Headers */,
|
||||
674A2A381B2715FB001A525C /* osm_opening_hours.hpp in Headers */,
|
||||
ED85D1CC2D5F4B5B00D8075D /* track_statistics.hpp in Headers */,
|
||||
3DEE1ADF21EE03B400054A91 /* power_manager.hpp in Headers */,
|
||||
F6D2CE7F1EDEB7F500636DFD /* routing_manager.hpp in Headers */,
|
||||
@@ -671,7 +664,6 @@
|
||||
FAA8387426BB3C0F002E54C6 /* countries_names_tests.cpp in Sources */,
|
||||
679624B01D1017DB00AE4E3C /* gps_track_storage_test.cpp in Sources */,
|
||||
674A29F01B26FD6F001A525C /* testingmain.cpp in Sources */,
|
||||
674A2A361B27011A001A525C /* working_time_tests.cpp in Sources */,
|
||||
679624B11D1017DB00AE4E3C /* gps_track_test.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
|
||||
Reference in New Issue
Block a user