Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/map
diff options
context:
space:
mode:
authorr.kuznetsov <r.kuznetsov@corp.mail.ru>2017-08-05 15:01:46 +0300
committerDaria Volvenkova <d.volvenkova@corp.mail.ru>2017-08-07 15:11:09 +0300
commit26f348e47f45ebaa2a3def023d84b105ad8600c2 (patch)
tree38f8dae145e78beb3b5fcf17bb3773c8d616f61d /map
parent0cb5cd6f0d7a875e6b71ad02a4da76ec403de8e6 (diff)
Moved obsolete watch renderer to own library
Diffstat (limited to 'map')
-rw-r--r--map/benchmark_tool/benchmark_tool.pro2
-rw-r--r--map/framework.cpp67
-rw-r--r--map/framework.hpp30
-rw-r--r--map/map_tests/CMakeLists.txt1
-rw-r--r--map/map_tests/map_tests.pro2
-rw-r--r--map/mwm_tests/CMakeLists.txt1
-rw-r--r--map/mwm_tests/mwm_tests.pro2
-rw-r--r--map/style_tests/CMakeLists.txt1
-rw-r--r--map/style_tests/style_tests.pro2
9 files changed, 7 insertions, 101 deletions
diff --git a/map/benchmark_tool/benchmark_tool.pro b/map/benchmark_tool/benchmark_tool.pro
index 3a7049deea..8e65ff1fad 100644
--- a/map/benchmark_tool/benchmark_tool.pro
+++ b/map/benchmark_tool/benchmark_tool.pro
@@ -7,7 +7,7 @@ TEMPLATE = app
ROOT_DIR = ../..
-DEPENDENCIES = map ugc indexer platform editor geometry coding base gflags protobuf succinct pugixml stats_client icu
+DEPENDENCIES = map ugc indexer platform editor geometry coding base gflags protobuf succinct pugixml stats_client icu agg
include($$ROOT_DIR/common.pri)
diff --git a/map/framework.cpp b/map/framework.cpp
index fd7e54ffdd..df3279be0a 100644
--- a/map/framework.cpp
+++ b/map/framework.cpp
@@ -38,8 +38,6 @@
#include "drape_frontend/gps_track_point.hpp"
#include "drape_frontend/route_renderer.hpp"
#include "drape_frontend/visual_params.hpp"
-#include "drape_frontend/watch/cpu_drawer.hpp"
-#include "drape_frontend/watch/feature_processor.hpp"
#include "drape/constants.hpp"
@@ -547,71 +545,6 @@ cian::Api * Framework::GetCianApi(platform::NetworkPolicy const & policy)
return nullptr;
}
-void Framework::DrawWatchFrame(m2::PointD const & center, int zoomModifier,
- uint32_t pxWidth, uint32_t pxHeight,
- df::watch::FrameSymbols const & symbols,
- df::watch::FrameImage & image)
-{
- ASSERT(IsWatchFrameRendererInited(), ());
-
- int resultZoom = -1;
- ScreenBase screen = m_cpuDrawer->CalculateScreen(center, zoomModifier, pxWidth, pxHeight, symbols, resultZoom);
- ASSERT_GREATER(resultZoom, 0, ());
-
- uint32_t const bgColor = drule::rules().GetBgColor(resultZoom);
- m_cpuDrawer->BeginFrame(pxWidth, pxHeight, dp::Extract(bgColor, 255 - (bgColor >> 24)));
-
- m2::RectD renderRect = m2::RectD(0, 0, pxWidth, pxHeight);
- m2::RectD selectRect;
- m2::RectD clipRect;
- double const inflationSize = 24 * m_cpuDrawer->GetVisualScale();
- screen.PtoG(m2::Inflate(renderRect, inflationSize, inflationSize), clipRect);
- screen.PtoG(renderRect, selectRect);
-
- uint32_t const tileSize = static_cast<uint32_t>(df::CalculateTileSize(pxWidth, pxHeight));
- int const drawScale = df::GetDrawTileScale(screen, tileSize, m_cpuDrawer->GetVisualScale());
- df::watch::FeatureProcessor doDraw(make_ref(m_cpuDrawer), clipRect, screen, drawScale);
-
- int const upperScale = scales::GetUpperScale();
- m_model.ForEachFeature(selectRect, doDraw, min(upperScale, drawScale));
-
- m_cpuDrawer->Flush();
- m_cpuDrawer->DrawMyPosition(screen.GtoP(center));
-
- if (symbols.m_showSearchResult)
- {
- if (!screen.PixelRect().IsPointInside(screen.GtoP(symbols.m_searchResult)))
- m_cpuDrawer->DrawSearchArrow(ang::AngleTo(center, symbols.m_searchResult));
- else
- m_cpuDrawer->DrawSearchResult(screen.GtoP(symbols.m_searchResult));
- }
-
- m_cpuDrawer->EndFrame(image);
-}
-
-void Framework::InitWatchFrameRenderer(float visualScale)
-{
- using namespace df::watch;
-
- ASSERT(!IsWatchFrameRendererInited(), ());
- if (m_cpuDrawer == nullptr)
- {
- string resPostfix = df::VisualParams::GetResourcePostfix(visualScale);
- m_cpuDrawer = make_unique_dp<CPUDrawer>(CPUDrawer::Params(resPostfix, visualScale));
- }
-}
-
-void Framework::ReleaseWatchFrameRenderer()
-{
- if (IsWatchFrameRendererInited())
- m_cpuDrawer.reset();
-}
-
-bool Framework::IsWatchFrameRendererInited() const
-{
- return m_cpuDrawer != nullptr;
-}
-
void Framework::ShowNode(storage::TCountryId const & countryId)
{
StopLocationFollow();
diff --git a/map/framework.hpp b/map/framework.hpp
index 4e1ea322b2..e2f33fe291 100644
--- a/map/framework.hpp
+++ b/map/framework.hpp
@@ -17,7 +17,6 @@
#include "drape_frontend/drape_api.hpp"
#include "drape_frontend/drape_engine.hpp"
#include "drape_frontend/user_event_stream.hpp"
-#include "drape_frontend/watch/frame_image.hpp"
#include "drape/oglcontextfactory.hpp"
@@ -90,14 +89,6 @@ struct DownloaderSearchParams;
namespace routing { namespace turns{ class Settings; } }
-namespace df
-{
- namespace watch
- {
- class CPUDrawer;
- }
-}
-
namespace platform
{
class NetworkPolicy;
@@ -172,7 +163,6 @@ protected:
TViewportChanged m_viewportChanged;
drape_ptr<df::DrapeEngine> m_drapeEngine;
- drape_ptr<df::watch::CPUDrawer> m_cpuDrawer;
double m_startForegroundTime;
double m_startBackgroundTime;
@@ -237,26 +227,6 @@ public:
storage::Storage::TProgressFunction const & progress);
void Migrate(bool keepDownloaded = true);
- void InitWatchFrameRenderer(float visualScale);
-
- /// @param center - map center in Mercator
- /// @param zoomModifier - result zoom calculate like "base zoom" + zoomModifier
- /// if we are have search result "base zoom" calculate that my position and search result
- /// will be see with some bottom clamp.
- /// if we are't have search result "base zoom" == scales::GetUpperComfortScale() - 1
- /// @param pxWidth - result image width.
- /// It must be equal render buffer width. For retina it's equal 2.0 * displayWidth
- /// @param pxHeight - result image height.
- /// It must be equal render buffer height. For retina it's equal 2.0 * displayHeight
- /// @param symbols - configuration for symbols on the frame
- /// @param image [out] - result image
- void DrawWatchFrame(m2::PointD const & center, int zoomModifier,
- uint32_t pxWidth, uint32_t pxHeight,
- df::watch::FrameSymbols const & symbols,
- df::watch::FrameImage & image);
- void ReleaseWatchFrameRenderer();
- bool IsWatchFrameRendererInited() const;
-
/// \returns true if there're unsaved changes in map with |countryId| and false otherwise.
/// \note It works for group and leaf node.
bool HasUnsavedEdits(storage::TCountryId const & countryId);
diff --git a/map/map_tests/CMakeLists.txt b/map/map_tests/CMakeLists.txt
index 692c7535c7..cfdc528b2c 100644
--- a/map/map_tests/CMakeLists.txt
+++ b/map/map_tests/CMakeLists.txt
@@ -43,6 +43,7 @@ omim_link_libraries(
base
freetype
icu
+ agg
expat
protobuf
jansson
diff --git a/map/map_tests/map_tests.pro b/map/map_tests/map_tests.pro
index 15a057c11c..6629df0bee 100644
--- a/map/map_tests/map_tests.pro
+++ b/map/map_tests/map_tests.pro
@@ -8,7 +8,7 @@ TEMPLATE = app
ROOT_DIR = ../..
DEPENDENCIES = map drape_frontend routing traffic routing_common search storage tracking drape \
ugc indexer partners_api local_ads platform editor geometry coding base freetype expat \
- protobuf jansson osrm stats_client minizip succinct pugixml stats_client stb_image sdf_image icu
+ protobuf jansson osrm stats_client minizip succinct pugixml stats_client stb_image sdf_image icu agg
DEPENDENCIES *= opening_hours
diff --git a/map/mwm_tests/CMakeLists.txt b/map/mwm_tests/CMakeLists.txt
index 90ddc73d8a..0bd8aa1fa8 100644
--- a/map/mwm_tests/CMakeLists.txt
+++ b/map/mwm_tests/CMakeLists.txt
@@ -27,6 +27,7 @@ omim_link_libraries(
opening_hours
freetype
icu
+ agg
expat
oauthcpp
protobuf
diff --git a/map/mwm_tests/mwm_tests.pro b/map/mwm_tests/mwm_tests.pro
index 8e7df6dc1a..087b2cf53a 100644
--- a/map/mwm_tests/mwm_tests.pro
+++ b/map/mwm_tests/mwm_tests.pro
@@ -7,7 +7,7 @@ TEMPLATE = app
ROOT_DIR = ../..
DEPENDENCIES = map traffic search storage ugc indexer platform editor geometry coding base \
- freetype expat protobuf jansson succinct pugixml stats_client icu
+ freetype expat protobuf jansson succinct pugixml stats_client icu agg
include($$ROOT_DIR/common.pri)
diff --git a/map/style_tests/CMakeLists.txt b/map/style_tests/CMakeLists.txt
index 0ec219f02f..656b5bff66 100644
--- a/map/style_tests/CMakeLists.txt
+++ b/map/style_tests/CMakeLists.txt
@@ -30,6 +30,7 @@ omim_link_libraries(
base
protobuf
icu
+ agg
stats_client
${LIBZ}
)
diff --git a/map/style_tests/style_tests.pro b/map/style_tests/style_tests.pro
index 6f44d0850d..d5f7048d2f 100644
--- a/map/style_tests/style_tests.pro
+++ b/map/style_tests/style_tests.pro
@@ -9,7 +9,7 @@ CONFIG += console warn_on
INCLUDEPATH += ../../3party/protobuf/protobuf/src
ROOT_DIR = ../..
-DEPENDENCIES = map traffic ugc indexer platform geometry coding base expat protobuf stats_client icu
+DEPENDENCIES = map traffic ugc indexer platform geometry coding base expat protobuf stats_client icu agg
macx-*: LIBS *= "-framework IOKit"