diff --git a/android/jni/framework.cpp b/android/jni/framework.cpp index 9946ac2fe9..9bc36491ba 100644 --- a/android/jni/framework.cpp +++ b/android/jni/framework.cpp @@ -1,6 +1,7 @@ #include "framework.h" #include "jni_helper.h" #include "rendering.h" +#include "../../std/shared_ptr.hpp" #include "../../base/logging.hpp" diff --git a/geometry/screenbase.hpp b/geometry/screenbase.hpp index b637749538..df0be885af 100644 --- a/geometry/screenbase.hpp +++ b/geometry/screenbase.hpp @@ -57,6 +57,12 @@ public: void Rotate(double angle); void ReverseTransformInPixelCoords(double s, double a, double dx, double dy); + void OnSize(m2::RectI const & r) + { + m_PixelRect = m2::RectD(r); + UpdateDependentParameters(); + } + void OnSize(int x0, int y0, int w, int h) { m_PixelRect = m2::RectD(x0, y0, x0 + w, y0 + h); diff --git a/iphone/Maps/Classes/EAGLView.mm b/iphone/Maps/Classes/EAGLView.mm index 0458c62392..280fe58707 100644 --- a/iphone/Maps/Classes/EAGLView.mm +++ b/iphone/Maps/Classes/EAGLView.mm @@ -102,7 +102,9 @@ blitVBSize, blitIBSize, 10, 512, 256, 6, 512, 256, 4, - 256, 256, 40, + GetPlatform().TileSize(), + GetPlatform().TileSize(), + GetPlatform().MaxTilesCount(), "unicode_blocks.txt", "fonts_whitelist.txt", "fonts_blacklist.txt", diff --git a/map/framework.cpp b/map/framework.cpp index 3938a90c7a..6ea6d5250e 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -934,7 +934,14 @@ void FrameWork::AddRedrawCommandSure() m_renderQueue.TileCache().touchTile(ri); yg::Tile tile = m_renderQueue.TileCache().getTile(ri); m_renderQueue.TileCache().unlock(); - pDrawer->screen()->blit(tile.m_renderTarget, tile.m_tileScreen, currentScreen, true); + + size_t tileWidth = tile.m_renderTarget->width(); + size_t tileHeight = tile.m_renderTarget->height(); + + pDrawer->screen()->blit(tile.m_renderTarget, tile.m_tileScreen, currentScreen, true, + yg::Color(), + m2::RectI(0, 0, tileWidth - 2, tileHeight - 2), + m2::RectU(1, 1, tileWidth - 1, tileHeight - 1)); } else { diff --git a/map/render_queue_routine.cpp b/map/render_queue_routine.cpp index 03d8e0645d..5b765fc9b3 100644 --- a/map/render_queue_routine.cpp +++ b/map/render_queue_routine.cpp @@ -96,7 +96,9 @@ void RenderQueueRoutine::Do() m_threadDrawer->SetVisualScale(m_visualScale); ScreenBase frameScreen; - frameScreen.OnSize(0, 0, tileWidth, tileHeight); + m2::RectI renderRect(1, 1, tileWidth - 1, tileWidth - 1); + + frameScreen.OnSize(renderRect); while (!IsCancelled()) { @@ -146,10 +148,23 @@ void RenderQueueRoutine::Do() m_threadDrawer->beginFrame(); + m_threadDrawer->clear(yg::Color(m_bgColor.r, m_bgColor.g, m_bgColor.b, 0)); + m_threadDrawer->screen()->setClipRect(renderRect); m_threadDrawer->clear(m_bgColor); +// frameScreen.OnSize(renderRect); frameScreen.SetFromRect(m_currentCommand->m_rectInfo.m_rect); +/* m2::RectI r0(renderRect); + m2::RectD r1; + + r0.Inflate(40.0, 40.0); + + frameScreen.PtoG(m2::RectD(r0), r1); + + frameScreen.OnSize(r0); + frameScreen.SetFromRect(r1);*/ + m_currentCommand->m_renderFn( m_currentCommand->m_paintEvent, frameScreen,