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 <memory> | 8 #include <memory> |
| 9 #include <vector> |
9 | 10 |
10 #include "base/memory/scoped_vector.h" | 11 #include "base/macros.h" |
11 #include "content/browser/compositor/image_transport_factory.h" | 12 #include "content/browser/compositor/image_transport_factory.h" |
12 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
13 #include "gpu/command_buffer/common/mailbox_holder.h" | 14 #include "gpu/command_buffer/common/mailbox_holder.h" |
14 #include "ui/compositor/reflector.h" | 15 #include "ui/compositor/reflector.h" |
15 #include "ui/gfx/geometry/size.h" | 16 #include "ui/gfx/geometry/size.h" |
16 | 17 |
17 namespace gfx { class Rect; } | 18 namespace gfx { class Rect; } |
18 | 19 |
19 namespace ui { | 20 namespace ui { |
20 class Compositor; | 21 class Compositor; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 // Called when the source surface is bound and available. | 58 // Called when the source surface is bound and available. |
58 void OnSourceSurfaceReady(BrowserCompositorOutputSurface* surface); | 59 void OnSourceSurfaceReady(BrowserCompositorOutputSurface* surface); |
59 | 60 |
60 // Called when the mailbox which has the source surface's texture | 61 // Called when the mailbox which has the source surface's texture |
61 // is updated. | 62 // is updated. |
62 void OnSourceTextureMailboxUpdated(scoped_refptr<OwnedMailbox> mailbox); | 63 void OnSourceTextureMailboxUpdated(scoped_refptr<OwnedMailbox> mailbox); |
63 | 64 |
64 private: | 65 private: |
65 struct LayerData; | 66 struct LayerData; |
66 | 67 |
67 ScopedVector<ReflectorImpl::LayerData>::iterator FindLayerData( | 68 std::vector<std::unique_ptr<LayerData>>::iterator FindLayerData( |
68 ui::Layer* layer); | 69 ui::Layer* layer); |
69 void UpdateTexture(LayerData* layer_data, | 70 void UpdateTexture(LayerData* layer_data, |
70 const gfx::Size& size, | 71 const gfx::Size& size, |
71 const gfx::Rect& redraw_rect); | 72 const gfx::Rect& redraw_rect); |
72 | 73 |
73 ui::Compositor* mirrored_compositor_; | 74 ui::Compositor* mirrored_compositor_; |
74 ScopedVector<LayerData> mirroring_layers_; | 75 std::vector<std::unique_ptr<LayerData>> mirroring_layers_; |
75 | 76 |
76 scoped_refptr<OwnedMailbox> mailbox_; | 77 scoped_refptr<OwnedMailbox> mailbox_; |
77 bool flip_texture_; | 78 bool flip_texture_; |
78 BrowserCompositorOutputSurface* output_surface_; | 79 BrowserCompositorOutputSurface* output_surface_; |
| 80 |
| 81 DISALLOW_COPY_AND_ASSIGN(ReflectorImpl); |
79 }; | 82 }; |
80 | 83 |
81 } // namespace content | 84 } // namespace content |
82 | 85 |
83 #endif // CONTENT_BROWSER_COMPOSITOR_REFLECTOR_IMPL_H_ | 86 #endif // CONTENT_BROWSER_COMPOSITOR_REFLECTOR_IMPL_H_ |
OLD | NEW |