diff options
author | r.kuznetsov <r.kuznetsov@corp.mail.ru> | 2018-08-08 11:15:09 +0300 |
---|---|---|
committer | Daria Volvenkova <d.volvenkova@corp.mail.ru> | 2018-08-09 11:50:39 +0300 |
commit | bd4188777f19fd807f46052c95744a7be5ba3e1e (patch) | |
tree | 7209c5d0f4788f7c75ad9ead3dbb1327b51df32c /drape_frontend | |
parent | 257c5d09b4f3a4e6f366a4a0acf94d4795b2dc06 (diff) |
Fixed compilation under diagnostics
Diffstat (limited to 'drape_frontend')
-rw-r--r-- | drape_frontend/animation_system.hpp | 4 | ||||
-rw-r--r-- | drape_frontend/apply_feature_functors.cpp | 14 | ||||
-rw-r--r-- | drape_frontend/apply_feature_functors.hpp | 12 | ||||
-rw-r--r-- | drape_frontend/backend_renderer.cpp | 3 | ||||
-rw-r--r-- | drape_frontend/gps_track_renderer.cpp | 5 | ||||
-rw-r--r-- | drape_frontend/gui/skin.hpp | 5 | ||||
-rw-r--r-- | drape_frontend/message_queue.cpp | 6 | ||||
-rw-r--r-- | drape_frontend/message_queue.hpp | 5 |
8 files changed, 25 insertions, 29 deletions
diff --git a/drape_frontend/animation_system.hpp b/drape_frontend/animation_system.hpp index 8004fa8e53..05a997c669 100644 --- a/drape_frontend/animation_system.hpp +++ b/drape_frontend/animation_system.hpp @@ -2,6 +2,8 @@ #include "drape_frontend/animation/animation.hpp" +#include "drape/drape_diagnostics.hpp" + #include "geometry/screenbase.hpp" #include "base/macros.hpp" @@ -14,8 +16,6 @@ #include <string> #include <utility> -//#define DEBUG_ANIMATIONS - namespace df { class AnimationSystem diff --git a/drape_frontend/apply_feature_functors.cpp b/drape_frontend/apply_feature_functors.cpp index b49ace75b7..f5d7b58212 100644 --- a/drape_frontend/apply_feature_functors.cpp +++ b/drape_frontend/apply_feature_functors.cpp @@ -68,7 +68,7 @@ uint32_t const kPathTextBaseTextIndex = 128; uint32_t const kShieldBaseTextIndex = 0; int const kShieldMinVisibleZoomLevel = 10; -#ifdef CALC_FILTERED_POINTS +#ifdef LINES_GENERATION_CALC_FILTERED_POINTS class LinesStat { public: @@ -858,15 +858,15 @@ ApplyLineFeatureGeometry::ApplyLineFeatureGeometry(TileKey const & tileKey, , m_simplify(tileKey.m_zoomLevel >= kLineSimplifyLevelStart && tileKey.m_zoomLevel <= kLineSimplifyLevelEnd) , m_initialPointsCount(pointsCount) -#ifdef CALC_FILTERED_POINTS - , m_readedCount(0) +#ifdef LINES_GENERATION_CALC_FILTERED_POINTS + , m_readCount(0) #endif {} void ApplyLineFeatureGeometry::operator() (m2::PointD const & point) { -#ifdef CALC_FILTERED_POINTS - ++m_readedCount; +#ifdef LINES_GENERATION_CALC_FILTERED_POINTS + ++m_readCount; #endif if (m_spline.IsNull()) @@ -948,8 +948,8 @@ void ApplyLineFeatureGeometry::ProcessLineRule(Stylist::TRuleWrapper const & rul void ApplyLineFeatureGeometry::Finish() { -#ifdef CALC_FILTERED_POINTS - LinesStat::Get().InsertLine(m_id, m_currentScaleGtoP, m_readedCount, m_spline->GetSize()); +#ifdef LINES_GENERATION_CALC_FILTERED_POINTS + LinesStat::Get().InsertLine(m_id, m_currentScaleGtoP, m_readCount, static_cast<int>(m_spline->GetSize())); #endif } diff --git a/drape_frontend/apply_feature_functors.hpp b/drape_frontend/apply_feature_functors.hpp index 01cc0f60a8..e8262b923a 100644 --- a/drape_frontend/apply_feature_functors.hpp +++ b/drape_frontend/apply_feature_functors.hpp @@ -4,6 +4,7 @@ #include "drape_frontend/tile_key.hpp" #include "drape_frontend/shape_view_params.hpp" +#include "drape/drape_diagnostics.hpp" #include "drape/pointers.hpp" #include "indexer/ftypes_matcher.hpp" @@ -13,14 +14,13 @@ #include "geometry/polyline2d.hpp" #include "geometry/spline.hpp" +#include <functional> #include <vector> class CaptionDefProto; class ShieldRuleProto; class SymbolRuleProto; -//#define CALC_FILTERED_POINTS - namespace dp { class TextureManager; @@ -33,7 +33,7 @@ struct TextViewParams; class MapShape; struct BuildingOutline; -using TInsertShapeFn = function<void(drape_ptr<MapShape> && shape)>; +using TInsertShapeFn = std::function<void(drape_ptr<MapShape> && shape)>; class BaseApplyFeature { @@ -42,7 +42,7 @@ public: FeatureID const & id, int minVisibleScale, uint8_t rank, CaptionDescription const & captions); - virtual ~BaseApplyFeature() {} + virtual ~BaseApplyFeature() = default; struct HotelData { @@ -165,8 +165,8 @@ private: bool m_simplify; size_t m_initialPointsCount; -#ifdef CALC_FILTERED_POINTS - int m_readedCount; +#ifdef LINES_GENERATION_CALC_FILTERED_POINTS + int m_readCount; #endif }; diff --git a/drape_frontend/backend_renderer.cpp b/drape_frontend/backend_renderer.cpp index 85f8fe86d7..1e34b502f4 100644 --- a/drape_frontend/backend_renderer.cpp +++ b/drape_frontend/backend_renderer.cpp @@ -101,7 +101,8 @@ void BackendRenderer::RecacheGui(gui::TWidgetsInitInfo const & initInfo, bool ne #ifdef RENDER_DEBUG_INFO_LABELS void BackendRenderer::RecacheDebugLabels() { - drape_ptr<gui::LayerRenderer> layerRenderer = m_guiCacher.RecacheDebugLabels(m_texMng); + auto context = m_contextFactory->GetResourcesUploadContext(); + drape_ptr<gui::LayerRenderer> layerRenderer = m_guiCacher.RecacheDebugLabels(m_texMng, make_ref(context)); drape_ptr<Message> outputMsg = make_unique_dp<GuiLayerRecachedMessage>(std::move(layerRenderer), false); m_commutator->PostMessage(ThreadsCommutator::RenderThread, std::move(outputMsg), MessagePriority::Normal); } diff --git a/drape_frontend/gps_track_renderer.cpp b/drape_frontend/gps_track_renderer.cpp index a27cd8c412..b6a44ca690 100644 --- a/drape_frontend/gps_track_renderer.cpp +++ b/drape_frontend/gps_track_renderer.cpp @@ -6,6 +6,7 @@ #include "shaders/programs.hpp" +#include "drape/drape_diagnostics.hpp" #include "drape/glsl_func.hpp" #include "drape/vertex_array_buffer.hpp" @@ -20,8 +21,6 @@ namespace df { namespace { -//#define SHOW_RAW_POINTS - df::ColorConstant const kTrackUnknownDistanceColor = "TrackUnknownDistance"; df::ColorConstant const kTrackCarSpeedColor = "TrackCarSpeed"; df::ColorConstant const kTrackPlaneSpeedColor = "TrackPlaneSpeed"; @@ -273,7 +272,7 @@ void GpsTrackRenderer::RenderTrack(ScreenBase const & screen, int zoomLevel, it.Advance(diameterMercator + kDistanceScalar * diameterMercator); } -#ifdef SHOW_RAW_POINTS +#ifdef GPS_TRACK_SHOW_RAW_POINTS for (size_t i = 0; i < m_points.size(); i++) { m2::PointD const convertedPt = MapShape::ConvertToLocal(m_points[i].m_point, m_pivot, kShapeCoordScalar); diff --git a/drape_frontend/gui/skin.hpp b/drape_frontend/gui/skin.hpp index 76deead8ca..ca1ffb443b 100644 --- a/drape_frontend/gui/skin.hpp +++ b/drape_frontend/gui/skin.hpp @@ -1,5 +1,6 @@ #pragma once +#include "drape/drape_diagnostics.hpp" #include "drape/drape_global.hpp" #include "geometry/point2d.hpp" @@ -9,8 +10,6 @@ #include <map> #include <string> -//#define RENDER_DEBUG_INFO_LABELS - namespace gui { enum EWidget @@ -20,7 +19,7 @@ enum EWidget WIDGET_COPYRIGHT = 0x4, WIDGET_SCALE_FPS_LABEL = 0x8, WIDGET_WATERMARK = 0x10, - /// Following widgets controlled by rendering kernel. Don't use them in platform code + // The following widgets are controlled by the engine. Don't use them in platform code. WIDGET_CHOOSE_POSITION_MARK = 0x8000, #ifdef RENDER_DEBUG_INFO_LABELS WIDGET_DEBUG_INFO diff --git a/drape_frontend/message_queue.cpp b/drape_frontend/message_queue.cpp index ee1c46950e..8ff981910e 100644 --- a/drape_frontend/message_queue.cpp +++ b/drape_frontend/message_queue.cpp @@ -126,19 +126,17 @@ void MessageQueue::DisableMessageFiltering() } #ifdef DEBUG_MESSAGE_QUEUE - bool MessageQueue::IsEmpty() const { - lock_guard<mutex> lock(m_mutex); + std::lock_guard<std::mutex> lock(m_mutex); return m_messages.empty() && m_lowPriorityMessages.empty(); } size_t MessageQueue::GetSize() const { - lock_guard<mutex> lock(m_mutex); + std::lock_guard<std::mutex> lock(m_mutex); return m_messages.size() + m_lowPriorityMessages.size(); } - #endif void MessageQueue::CancelWait() diff --git a/drape_frontend/message_queue.hpp b/drape_frontend/message_queue.hpp index b491e0d6b5..7cab89ca78 100644 --- a/drape_frontend/message_queue.hpp +++ b/drape_frontend/message_queue.hpp @@ -2,6 +2,7 @@ #include "drape_frontend/message.hpp" +#include "drape/drape_diagnostics.hpp" #include "drape/pointers.hpp" #include "base/condition.hpp" @@ -13,15 +14,13 @@ namespace df { -//#define DEBUG_MESSAGE_QUEUE - class MessageQueue { public: MessageQueue(); ~MessageQueue(); - /// if queue is empty then return NULL + // If the queue is empty then it returns nullptr or wait for a message. drape_ptr<Message> PopMessage(bool waitForMessage); void PushMessage(drape_ptr<Message> && message, MessagePriority priority); void CancelWait(); |