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 11 matching lines...) Expand all Loading... |
22 | 22 |
23 class CONTENT_EXPORT BrowserCompositorOutputSurface | 23 class CONTENT_EXPORT BrowserCompositorOutputSurface |
24 : public cc::OutputSurface, | 24 : public cc::OutputSurface, |
25 public ui::CompositorVSyncManager::Observer, | 25 public ui::CompositorVSyncManager::Observer, |
26 public base::NonThreadSafe { | 26 public base::NonThreadSafe { |
27 public: | 27 public: |
28 virtual ~BrowserCompositorOutputSurface(); | 28 virtual ~BrowserCompositorOutputSurface(); |
29 | 29 |
30 // cc::OutputSurface implementation. | 30 // cc::OutputSurface implementation. |
31 virtual bool BindToClient(cc::OutputSurfaceClient* client) override; | 31 virtual bool BindToClient(cc::OutputSurfaceClient* client) override; |
32 virtual void OnSwapBuffersComplete() override; | |
33 | 32 |
34 // ui::CompositorOutputSurface::Observer implementation. | 33 // ui::CompositorOutputSurface::Observer implementation. |
35 virtual void OnUpdateVSyncParameters(base::TimeTicks timebase, | 34 virtual void OnUpdateVSyncParameters(base::TimeTicks timebase, |
36 base::TimeDelta interval) override; | 35 base::TimeDelta interval) override; |
37 | 36 |
38 void OnUpdateVSyncParametersFromGpu(base::TimeTicks tiembase, | 37 void OnUpdateVSyncParametersFromGpu(base::TimeTicks tiembase, |
39 base::TimeDelta interval); | 38 base::TimeDelta interval); |
40 | 39 |
41 void SetReflector(ReflectorImpl* reflector); | 40 void SetReflector(ReflectorImpl* reflector); |
42 | 41 |
43 #if defined(OS_MACOSX) | 42 #if defined(OS_MACOSX) |
44 void OnSurfaceDisplayed(); | 43 virtual void OnSurfaceDisplayed() = 0; |
45 #endif | 44 #endif |
46 | 45 |
47 protected: | 46 protected: |
48 // Constructor used by the accelerated implementation. | 47 // Constructor used by the accelerated implementation. |
49 BrowserCompositorOutputSurface( | 48 BrowserCompositorOutputSurface( |
50 const scoped_refptr<ContextProviderCommandBuffer>& context, | 49 const scoped_refptr<ContextProviderCommandBuffer>& context, |
51 int surface_id, | 50 int surface_id, |
52 IDMap<BrowserCompositorOutputSurface>* output_surface_map, | 51 IDMap<BrowserCompositorOutputSurface>* output_surface_map, |
53 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager); | 52 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager); |
54 | 53 |
(...skipping 12 matching lines...) Expand all Loading... |
67 | 66 |
68 private: | 67 private: |
69 void Initialize(); | 68 void Initialize(); |
70 | 69 |
71 DISALLOW_COPY_AND_ASSIGN(BrowserCompositorOutputSurface); | 70 DISALLOW_COPY_AND_ASSIGN(BrowserCompositorOutputSurface); |
72 }; | 71 }; |
73 | 72 |
74 } // namespace content | 73 } // namespace content |
75 | 74 |
76 #endif // CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ | 75 #endif // CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ |
OLD | NEW |