| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 void InitOnImplThread(const gpu::MailboxHolder& mailbox_holder); | 47 void InitOnImplThread(const gpu::MailboxHolder& mailbox_holder); |
| 48 void Shutdown(); | 48 void Shutdown(); |
| 49 void ShutdownOnImplThread(); | 49 void ShutdownOnImplThread(); |
| 50 | 50 |
| 51 // Post a task to attach the reflector to the output surface onto ImplThread. | 51 // Post a task to attach the reflector to the output surface onto ImplThread. |
| 52 void ReattachToOutputSurfaceFromMainThread( | 52 void ReattachToOutputSurfaceFromMainThread( |
| 53 BrowserCompositorOutputSurface* surface); | 53 BrowserCompositorOutputSurface* surface); |
| 54 | 54 |
| 55 // ui::Reflector implementation. | 55 // ui::Reflector implementation. |
| 56 virtual void OnMirroringCompositorResized() override; | 56 void OnMirroringCompositorResized() override; |
| 57 | 57 |
| 58 // Called in |BrowserCompositorOutputSurface::SwapBuffers| to copy | 58 // Called in |BrowserCompositorOutputSurface::SwapBuffers| to copy |
| 59 // the full screen image to the |texture_id_|. This must be called | 59 // the full screen image to the |texture_id_|. This must be called |
| 60 // on ImplThread. | 60 // on ImplThread. |
| 61 void OnSwapBuffers(); | 61 void OnSwapBuffers(); |
| 62 | 62 |
| 63 // Called in |BrowserCompositorOutputSurface::PostSubBuffer| copy | 63 // Called in |BrowserCompositorOutputSurface::PostSubBuffer| copy |
| 64 // the sub image given by |rect| to the texture.This must be called | 64 // the sub image given by |rect| to the texture.This must be called |
| 65 // on ImplThread. | 65 // on ImplThread. |
| 66 void OnPostSubBuffer(gfx::Rect rect); | 66 void OnPostSubBuffer(gfx::Rect rect); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 92 explicit ImplThreadData( | 92 explicit ImplThreadData( |
| 93 IDMap<BrowserCompositorOutputSurface>* output_surface_map); | 93 IDMap<BrowserCompositorOutputSurface>* output_surface_map); |
| 94 ~ImplThreadData(); | 94 ~ImplThreadData(); |
| 95 IDMap<BrowserCompositorOutputSurface>* output_surface_map; | 95 IDMap<BrowserCompositorOutputSurface>* output_surface_map; |
| 96 BrowserCompositorOutputSurface* output_surface; | 96 BrowserCompositorOutputSurface* output_surface; |
| 97 scoped_ptr<GLHelper> gl_helper; | 97 scoped_ptr<GLHelper> gl_helper; |
| 98 unsigned texture_id; | 98 unsigned texture_id; |
| 99 gpu::MailboxHolder mailbox_holder; | 99 gpu::MailboxHolder mailbox_holder; |
| 100 }; | 100 }; |
| 101 | 101 |
| 102 virtual ~ReflectorImpl(); | 102 ~ReflectorImpl() override; |
| 103 | 103 |
| 104 void AttachToOutputSurfaceOnImplThread( | 104 void AttachToOutputSurfaceOnImplThread( |
| 105 const gpu::MailboxHolder& mailbox_holder, | 105 const gpu::MailboxHolder& mailbox_holder, |
| 106 BrowserCompositorOutputSurface* surface); | 106 BrowserCompositorOutputSurface* surface); |
| 107 | 107 |
| 108 void UpdateTextureSizeOnMainThread(gfx::Size size); | 108 void UpdateTextureSizeOnMainThread(gfx::Size size); |
| 109 | 109 |
| 110 // Request full redraw on mirroring compositor. | 110 // Request full redraw on mirroring compositor. |
| 111 void FullRedrawOnMainThread(gfx::Size size); | 111 void FullRedrawOnMainThread(gfx::Size size); |
| 112 | 112 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 131 | 131 |
| 132 // Can be accessed on both. | 132 // Can be accessed on both. |
| 133 scoped_refptr<base::MessageLoopProxy> impl_message_loop_; | 133 scoped_refptr<base::MessageLoopProxy> impl_message_loop_; |
| 134 scoped_refptr<base::MessageLoopProxy> main_message_loop_; | 134 scoped_refptr<base::MessageLoopProxy> main_message_loop_; |
| 135 int surface_id_; | 135 int surface_id_; |
| 136 }; | 136 }; |
| 137 | 137 |
| 138 } // namespace content | 138 } // namespace content |
| 139 | 139 |
| 140 #endif // CONTENT_BROWSER_COMPOSITOR_REFLECTOR_IMPL_H_ | 140 #endif // CONTENT_BROWSER_COMPOSITOR_REFLECTOR_IMPL_H_ |
| OLD | NEW |