| 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 30 matching lines...) Expand all Loading... |
| 41 | 41 |
| 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<cc::ContextProvider>& context, | 51 const scoped_refptr<ContextProviderCommandBuffer>& context, |
| 52 int surface_id, | 52 int surface_id, |
| 53 IDMap<BrowserCompositorOutputSurface>* output_surface_map, | 53 IDMap<BrowserCompositorOutputSurface>* output_surface_map, |
| 54 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager); | 54 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager); |
| 55 | 55 |
| 56 // Constructor used by the software implementation. | 56 // Constructor used by the software implementation. |
| 57 BrowserCompositorOutputSurface( | 57 BrowserCompositorOutputSurface( |
| 58 scoped_ptr<cc::SoftwareOutputDevice> software_device, | 58 scoped_ptr<cc::SoftwareOutputDevice> software_device, |
| 59 int surface_id, | 59 int surface_id, |
| 60 IDMap<BrowserCompositorOutputSurface>* output_surface_map, | 60 IDMap<BrowserCompositorOutputSurface>* output_surface_map, |
| 61 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager); | 61 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager); |
| 62 | 62 |
| 63 int surface_id_; | 63 int surface_id_; |
| 64 IDMap<BrowserCompositorOutputSurface>* output_surface_map_; | 64 IDMap<BrowserCompositorOutputSurface>* output_surface_map_; |
| 65 | 65 |
| 66 scoped_refptr<ui::CompositorVSyncManager> vsync_manager_; | 66 scoped_refptr<ui::CompositorVSyncManager> vsync_manager_; |
| 67 scoped_refptr<ReflectorImpl> reflector_; | 67 scoped_refptr<ReflectorImpl> reflector_; |
| 68 | 68 |
| 69 private: | 69 private: |
| 70 void Initialize(); | 70 void Initialize(); |
| 71 | 71 |
| 72 DISALLOW_COPY_AND_ASSIGN(BrowserCompositorOutputSurface); | 72 DISALLOW_COPY_AND_ASSIGN(BrowserCompositorOutputSurface); |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 } // namespace content | 75 } // namespace content |
| 76 | 76 |
| 77 #endif // CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ | 77 #endif // CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ |
| OLD | NEW |