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

Side by Side Diff: remoting/ios/session/remoting_client.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 unified diff | Download patch
« no previous file with comments | « remoting/ios/display/gl_display_handler.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if !defined(__has_feature) || !__has_feature(objc_arc) 5 #if !defined(__has_feature) || !__has_feature(objc_arc)
6 #error "This file requires ARC support." 6 #error "This file requires ARC support."
7 #endif 7 #endif
8 8
9 #import "remoting/ios/session/remoting_client.h" 9 #import "remoting/ios/session/remoting_client.h"
10 10
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 base::BindBlockArc(^(const remoting::ViewMatrix& matrix) { 126 base::BindBlockArc(^(const remoting::ViewMatrix& matrix) {
127 [weakDisplayHandler onPixelTransformationChanged:matrix]; 127 [weakDisplayHandler onPixelTransformationChanged:matrix];
128 }), 128 }),
129 _session.get())); 129 _session.get()));
130 } 130 }
131 131
132 - (void)disconnectFromHost { 132 - (void)disconnectFromHost {
133 if (_session) { 133 if (_session) {
134 _session->Disconnect(); 134 _session->Disconnect();
135 } 135 }
136 _displayHandler = nil;
136 // TODO(nicholss): Do we need to cleanup more? 137 // TODO(nicholss): Do we need to cleanup more?
137 } 138 }
138 139
139 #pragma mark - Eventing 140 #pragma mark - Eventing
140 141
141 - (void)hostSessionPinProvided:(NSNotification*)notification { 142 - (void)hostSessionPinProvided:(NSNotification*)notification {
142 NSString* pin = [[notification userInfo] objectForKey:kHostSessionPin]; 143 NSString* pin = [[notification userInfo] objectForKey:kHostSessionPin];
143 if (_secretFetchedCallback) { 144 if (_secretFetchedCallback) {
144 _runtime->network_task_runner()->PostTask( 145 _runtime->network_task_runner()->PostTask(
145 FROM_HERE, base::BindBlockArc(^{ 146 FROM_HERE, base::BindBlockArc(^{
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 NSLog(@"TODO(nicholss): implement this, setCapabilities."); 216 NSLog(@"TODO(nicholss): implement this, setCapabilities.");
216 } 217 }
217 218
218 - (void)handleExtensionMessageOfType:(NSString*)type 219 - (void)handleExtensionMessageOfType:(NSString*)type
219 message:(NSString*)message { 220 message:(NSString*)message {
220 NSLog(@"TODO(nicholss): implement this, handleExtensionMessageOfType %@:%@.", 221 NSLog(@"TODO(nicholss): implement this, handleExtensionMessageOfType %@:%@.",
221 type, message); 222 type, message);
222 } 223 }
223 224
224 - (void)surfaceChanged:(const CGRect&)frame { 225 - (void)surfaceChanged:(const CGRect&)frame {
226 // Note that GLKView automatically sets the OpenGL viewport size to the size
227 // of the surface.
225 [_displayHandler onSurfaceChanged:frame]; 228 [_displayHandler onSurfaceChanged:frame];
226 _gestureInterpreter->OnSurfaceSizeChanged(frame.size.width, 229 _gestureInterpreter->OnSurfaceSizeChanged(frame.size.width,
227 frame.size.height); 230 frame.size.height);
228 } 231 }
229 232
230 #pragma mark - GlDisplayHandlerDelegate 233 #pragma mark - GlDisplayHandlerDelegate
231 234
232 - (void)canvasSizeChanged:(CGSize)size { 235 - (void)canvasSizeChanged:(CGSize)size {
233 if (_gestureInterpreter) { 236 if (_gestureInterpreter) {
234 _gestureInterpreter->OnDesktopSizeChanged(size.width, size.height); 237 _gestureInterpreter->OnDesktopSizeChanged(size.width, size.height);
235 } 238 }
236 } 239 }
237 240
238 @end 241 @end
OLDNEW
« no previous file with comments | « remoting/ios/display/gl_display_handler.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698