| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |