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

Side by Side Diff: remoting/ios/display/gl_display_handler.mm

Issue 2886233003: [CRD iOS] Fix the leaky RemotingClient (Closed)
Patch Set: WIP 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/app/remoting_view_controller.mm ('k') | remoting/ios/session/remoting_client.mm » ('j') | 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 #include <array> 9 #include <array>
10 10
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 base::WeakPtr<RendererProxy> renderer_proxy_; 71 base::WeakPtr<RendererProxy> renderer_proxy_;
72 72
73 // Will be std::move'd when GrabFrameConsumer() is called. 73 // Will be std::move'd when GrabFrameConsumer() is called.
74 std::unique_ptr<DualBufferFrameConsumer> owned_frame_consumer_; 74 std::unique_ptr<DualBufferFrameConsumer> owned_frame_consumer_;
75 base::WeakPtr<DualBufferFrameConsumer> frame_consumer_; 75 base::WeakPtr<DualBufferFrameConsumer> frame_consumer_;
76 76
77 // TODO(yuweih): Release references once the surface is destroyed. 77 // TODO(yuweih): Release references once the surface is destroyed.
78 EAGLContext* eagl_context_; 78 EAGLContext* eagl_context_;
79 std::unique_ptr<GlRenderer> renderer_; 79 std::unique_ptr<GlRenderer> renderer_;
80 // GlDemoScreen *demo_screen_; 80 // GlDemoScreen *demo_screen_;
81 id<GlDisplayHandlerDelegate> handler_delegate_; 81 __weak id<GlDisplayHandlerDelegate> handler_delegate_;
82 82
83 // Used on display thread. 83 // Used on display thread.
84 base::WeakPtr<Core> weak_ptr_; 84 base::WeakPtr<Core> weak_ptr_;
85 base::WeakPtrFactory<Core> weak_factory_; 85 base::WeakPtrFactory<Core> weak_factory_;
86 86
87 DISALLOW_COPY_AND_ASSIGN(Core); 87 DISALLOW_COPY_AND_ASSIGN(Core);
88 }; 88 };
89 89
90 Core::Core() : weak_factory_(this) { 90 Core::Core() : weak_factory_(this) {
91 runtime_ = ChromotingClientRuntime::GetInstance(); 91 runtime_ = ChromotingClientRuntime::GetInstance();
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 _core->GetWeakPtr(), delegate)); 290 _core->GetWeakPtr(), delegate));
291 } 291 }
292 292
293 - (id<GlDisplayHandlerDelegate>)delegate { 293 - (id<GlDisplayHandlerDelegate>)delegate {
294 // Implementation is still required for UNAVAILABLE_ATTRIBUTE. 294 // Implementation is still required for UNAVAILABLE_ATTRIBUTE.
295 NOTREACHED(); 295 NOTREACHED();
296 return nil; 296 return nil;
297 } 297 }
298 298
299 @end 299 @end
OLDNEW
« no previous file with comments | « remoting/ios/app/remoting_view_controller.mm ('k') | remoting/ios/session/remoting_client.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698