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
diff options
context:
space:
mode:
authorr.kuznetsov <r.kuznetsov@corp.mail.ru>2016-02-11 18:54:04 +0300
committerSergey Yershov <yershov@corp.mail.ru>2016-03-23 16:20:45 +0300
commitbc514eaa3210a5dd22707cfdf0eaa89774cb6790 (patch)
tree707591cb65ce836386bcb85f7e0714a07b795f1e /drape/overlay_handle.hpp
parent4cc076b54c1939118d4ba37df69a45df1fd71d42 (diff)
Overlay tree optimization
Diffstat (limited to 'drape/overlay_handle.hpp')
-rw-r--r--drape/overlay_handle.hpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/drape/overlay_handle.hpp b/drape/overlay_handle.hpp
index 0553891a60..83874ba4ba 100644
--- a/drape/overlay_handle.hpp
+++ b/drape/overlay_handle.hpp
@@ -64,15 +64,14 @@ public:
double GetExtendingSize() const { return m_extendingSize; }
void SetExtendingSize(double extendingSize) { m_extendingSize = extendingSize; }
m2::RectD GetExtendedPixelRect(ScreenBase const & screen) const;
- void GetExtendedPixelShape(ScreenBase const & screen, Rects & rects) const;
+ Rects const & GetExtendedPixelShape(ScreenBase const & screen) const;
bool IsIntersect(ScreenBase const & screen, ref_ptr<OverlayHandle> const h) const;
virtual bool IndexesRequired() const { return true; }
void * IndexStorage(uint32_t size);
void GetElementIndexes(ref_ptr<IndexBufferMutator> mutator) const;
- virtual void GetAttributeMutation(ref_ptr<AttributeBufferMutator> mutator,
- ScreenBase const & screen) const;
+ virtual void GetAttributeMutation(ref_ptr<AttributeBufferMutator> mutator) const;
bool HasDynamicAttributes() const;
void AddDynamicAttribute(BindingInfo const & binding, uint32_t offset, uint32_t count);
@@ -90,6 +89,8 @@ public:
int GetOverlayRank() const { return m_overlayRank; }
void SetOverlayRank(int overlayRank) { m_overlayRank = overlayRank; }
+ void SetCachingEnable(bool enable);
+
#ifdef DEBUG_OVERLAYS_OUTPUT
virtual string GetOverlayDebugInfo() { return ""; }
#endif
@@ -125,6 +126,12 @@ private:
struct OffsetNodeFinder;
set<TOffsetNode, LessOffsetNode> m_offsets;
+
+ bool m_enableCaching;
+ mutable Rects m_extendedRectsCache;
+ mutable bool m_extendedRectsDirty;
+ mutable m2::RectD m_extendedRectCache;
+ mutable bool m_extendedRectDirty;
};
class SquareHandle : public OverlayHandle