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_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ | 5 #ifndef CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ |
6 #define CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ | 6 #define CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ |
7 | 7 |
8 #include "base/id_map.h" | 8 #include "base/id_map.h" |
9 #include "base/threading/non_thread_safe.h" | 9 #include "base/threading/non_thread_safe.h" |
10 #include "cc/output/output_surface.h" | 10 #include "cc/output/output_surface.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 #if defined(OS_MACOSX) | 42 #if defined(OS_MACOSX) |
43 virtual void OnSurfaceDisplayed() = 0; | 43 virtual void OnSurfaceDisplayed() = 0; |
44 virtual void OnSurfaceRecycled() = 0; | 44 virtual void OnSurfaceRecycled() = 0; |
45 virtual bool ShouldNotShowFramesAfterRecycle() const = 0; | 45 virtual bool ShouldNotShowFramesAfterRecycle() const = 0; |
46 #endif | 46 #endif |
47 | 47 |
48 protected: | 48 protected: |
49 // Constructor used by the accelerated implementation. | 49 // Constructor used by the accelerated implementation. |
50 BrowserCompositorOutputSurface( | 50 BrowserCompositorOutputSurface( |
51 const scoped_refptr<ContextProviderCommandBuffer>& context, | 51 const scoped_refptr<ContextProviderCommandBuffer>& context, |
| 52 const scoped_refptr<ContextProviderCommandBuffer>& worker_context, |
52 int surface_id, | 53 int surface_id, |
53 IDMap<BrowserCompositorOutputSurface>* output_surface_map, | 54 IDMap<BrowserCompositorOutputSurface>* output_surface_map, |
54 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager); | 55 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager); |
55 | 56 |
56 // Constructor used by the software implementation. | 57 // Constructor used by the software implementation. |
57 BrowserCompositorOutputSurface( | 58 BrowserCompositorOutputSurface( |
58 scoped_ptr<cc::SoftwareOutputDevice> software_device, | 59 scoped_ptr<cc::SoftwareOutputDevice> software_device, |
59 int surface_id, | 60 int surface_id, |
60 IDMap<BrowserCompositorOutputSurface>* output_surface_map, | 61 IDMap<BrowserCompositorOutputSurface>* output_surface_map, |
61 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager); | 62 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager); |
62 | 63 |
63 int surface_id_; | 64 int surface_id_; |
64 IDMap<BrowserCompositorOutputSurface>* output_surface_map_; | 65 IDMap<BrowserCompositorOutputSurface>* output_surface_map_; |
65 | 66 |
66 scoped_refptr<ui::CompositorVSyncManager> vsync_manager_; | 67 scoped_refptr<ui::CompositorVSyncManager> vsync_manager_; |
67 scoped_refptr<ReflectorImpl> reflector_; | 68 scoped_refptr<ReflectorImpl> reflector_; |
68 | 69 |
69 private: | 70 private: |
70 void Initialize(); | 71 void Initialize(); |
71 | 72 |
72 DISALLOW_COPY_AND_ASSIGN(BrowserCompositorOutputSurface); | 73 DISALLOW_COPY_AND_ASSIGN(BrowserCompositorOutputSurface); |
73 }; | 74 }; |
74 | 75 |
75 } // namespace content | 76 } // namespace content |
76 | 77 |
77 #endif // CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ | 78 #endif // CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ |
OLD | NEW |