| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CONTENT_BROWSER_COMPOSITOR_REFLECTOR_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_COMPOSITOR_REFLECTOR_IMPL_H_ |
| 6 #define CONTENT_BROWSER_COMPOSITOR_REFLECTOR_IMPL_H_ | 6 #define CONTENT_BROWSER_COMPOSITOR_REFLECTOR_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/id_map.h" | 8 #include "base/id_map.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 // A reflector implementation that copies the framebuffer content | 31 // A reflector implementation that copies the framebuffer content |
| 32 // to the texture, then draw it onto the mirroring compositor. | 32 // to the texture, then draw it onto the mirroring compositor. |
| 33 class ReflectorImpl : public base::SupportsWeakPtr<ReflectorImpl>, | 33 class ReflectorImpl : public base::SupportsWeakPtr<ReflectorImpl>, |
| 34 public ui::Reflector { | 34 public ui::Reflector { |
| 35 public: | 35 public: |
| 36 ReflectorImpl( | 36 ReflectorImpl( |
| 37 ui::Compositor* mirrored_compositor, | 37 ui::Compositor* mirrored_compositor, |
| 38 ui::Layer* mirroring_layer, | 38 ui::Layer* mirroring_layer, |
| 39 IDMap<BrowserCompositorOutputSurface>* output_surface_map, | 39 IDMap<BrowserCompositorOutputSurface>* output_surface_map, |
| 40 base::MessageLoopProxy* compositor_thread_loop, |
| 40 int surface_id); | 41 int surface_id); |
| 41 | 42 |
| 42 ui::Compositor* mirrored_compositor() { | 43 ui::Compositor* mirrored_compositor() { |
| 43 return GetMain().mirrored_compositor; | 44 return GetMain().mirrored_compositor; |
| 44 } | 45 } |
| 45 | 46 |
| 46 void InitOnImplThread(const gpu::MailboxHolder& mailbox_holder); | 47 void InitOnImplThread(const gpu::MailboxHolder& mailbox_holder); |
| 47 void Shutdown(); | 48 void Shutdown(); |
| 48 void ShutdownOnImplThread(); | 49 void ShutdownOnImplThread(); |
| 49 | 50 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 | 131 |
| 131 // Can be accessed on both. | 132 // Can be accessed on both. |
| 132 scoped_refptr<base::MessageLoopProxy> impl_message_loop_; | 133 scoped_refptr<base::MessageLoopProxy> impl_message_loop_; |
| 133 scoped_refptr<base::MessageLoopProxy> main_message_loop_; | 134 scoped_refptr<base::MessageLoopProxy> main_message_loop_; |
| 134 int surface_id_; | 135 int surface_id_; |
| 135 }; | 136 }; |
| 136 | 137 |
| 137 } // namespace content | 138 } // namespace content |
| 138 | 139 |
| 139 #endif // CONTENT_BROWSER_COMPOSITOR_REFLECTOR_IMPL_H_ | 140 #endif // CONTENT_BROWSER_COMPOSITOR_REFLECTOR_IMPL_H_ |
| OLD | NEW |