Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(444)

Unified Diff: remoting/ios/app/host_view_controller.mm

Issue 2874143002: [CRD iOS] Some fixes for rendering (Closed)
Patch Set: Just use presentRenderbuffer to swap buffers Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/client/jni/jni_gl_display_handler.cc ('k') | remoting/ios/display/gl_display_handler.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/ios/app/host_view_controller.mm
diff --git a/remoting/ios/app/host_view_controller.mm b/remoting/ios/app/host_view_controller.mm
index 30b19c417349ef07c04fe3de32afb30e462b3490..e866d7691469a9b691043ca4f52103db509ec5d7 100644
--- a/remoting/ios/app/host_view_controller.mm
+++ b/remoting/ios/app/host_view_controller.mm
@@ -75,11 +75,16 @@ static const CGFloat kFabInset = 15.f;
[_client.displayHandler onSurfaceCreated:glView];
// viewDidLayoutSubviews may be called before viewDidAppear, in which case
- // the surface is not ready and onSurfaceChanged will be no-op.
+ // the surface is not ready to handle the transformation matrix.
// Call onSurfaceChanged here to cover that case.
[_client surfaceChanged:self.view.frame];
}
+- (void)viewDidDisappear:(BOOL)animated {
+ [super viewDidDisappear:animated];
+ [(GLKView*)self.view deleteDrawable];
+}
+
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
@@ -96,7 +101,11 @@ static const CGFloat kFabInset = 15.f;
- (void)viewDidLayoutSubviews {
[super viewDidLayoutSubviews];
- [_client surfaceChanged:self.view.frame];
+ if (((GLKView*)self.view).context != nil) {
+ // If the context is not set yet, the view size will be set in
+ // viewDidAppear.
+ [_client surfaceChanged:self.view.bounds];
+ }
CGSize btnSize = _floatingButton.frame.size;
_floatingButton.frame =
« no previous file with comments | « remoting/client/jni/jni_gl_display_handler.cc ('k') | remoting/ios/display/gl_display_handler.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698