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:
authorAlex Zolotarev <deathbaba@gmail.com>2011-10-23 05:00:21 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:26:35 +0300
commit175ec47793aa169b2d237fee2ed2383971189679 (patch)
tree34188c078ce8aa1044e49741c726e7b63fd015c2 /iphone/Maps/Classes/EAGLView.mm
parenta062fb71068e973a9f875bcfc4a511a65f02f4af (diff)
[ios] Optimized glview->framework interaction
Diffstat (limited to 'iphone/Maps/Classes/EAGLView.mm')
-rw-r--r--iphone/Maps/Classes/EAGLView.mm19
1 files changed, 9 insertions, 10 deletions
diff --git a/iphone/Maps/Classes/EAGLView.mm b/iphone/Maps/Classes/EAGLView.mm
index cf0cb9f7ad..cfc3804590 100644
--- a/iphone/Maps/Classes/EAGLView.mm
+++ b/iphone/Maps/Classes/EAGLView.mm
@@ -18,7 +18,7 @@ bool _inRepaint = false;
@implementation EAGLView
-@synthesize controller;
+@synthesize framework;
@synthesize windowHandle;
@synthesize drawer;
@synthesize renderContext;
@@ -157,6 +157,7 @@ bool _inRepaint = false;
- (void)onSize:(int)width withHeight:(int)height
{
+ framework->OnSize(width, height);
/// free old video memory
frameBuffer->resetRenderTarget();
renderBuffer.reset();
@@ -168,7 +169,6 @@ bool _inRepaint = false;
frameBuffer->onSize(width, height);
drawer->onSize(width, height);
-
drawer->screen()->beginFrame();
drawer->screen()->clear();
drawer->screen()->endFrame();
@@ -176,15 +176,15 @@ bool _inRepaint = false;
- (void)drawView
{
- [controller drawFrame];
- /*if (windowHandle->needRedraw())
+ shared_ptr<PaintEvent> pe(new PaintEvent(drawer.get()));
+ if (windowHandle->needRedraw())
{
windowHandle->setNeedRedraw(false);
- [controller beginPaint];
- [controller doPaint];
- renderBuffer->present();
- [controller endPaint];
- }*/
+ framework->BeginPaint(pe);
+ framework->DoPaint(pe);
+ renderBuffer->present();
+ framework->EndPaint(pe);
+ }
}
- (void)drawViewThunk:(id)obj
@@ -201,7 +201,6 @@ bool _inRepaint = false;
{
CGFloat const scale = self.contentScaleFactor;
CGSize const s = self.frame.size;
- [controller onResize:s.width * scale withHeight:s.height * scale];
[self onSize:s.width * scale withHeight:s.height * scale];
}