| 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/threading/non_thread_safe.h" | 8 #include "base/threading/non_thread_safe.h" |
| 9 #include "cc/output/output_surface.h" | 9 #include "cc/output/output_surface.h" |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 #if defined(OS_MACOSX) | 49 #if defined(OS_MACOSX) |
| 50 virtual void OnSurfaceDisplayed() = 0; | 50 virtual void OnSurfaceDisplayed() = 0; |
| 51 virtual void SetSurfaceSuspendedForRecycle(bool suspended) = 0; | 51 virtual void SetSurfaceSuspendedForRecycle(bool suspended) = 0; |
| 52 virtual bool SurfaceShouldNotShowFramesAfterSuspendForRecycle() const = 0; | 52 virtual bool SurfaceShouldNotShowFramesAfterSuspendForRecycle() const = 0; |
| 53 #endif | 53 #endif |
| 54 | 54 |
| 55 protected: | 55 protected: |
| 56 // Constructor used by the accelerated implementation. | 56 // Constructor used by the accelerated implementation. |
| 57 BrowserCompositorOutputSurface( | 57 BrowserCompositorOutputSurface( |
| 58 const scoped_refptr<cc::ContextProvider>& context, | 58 const scoped_refptr<cc::ContextProvider>& context, |
| 59 const scoped_refptr<cc::ContextProvider>& worker_context, |
| 59 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, | 60 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, |
| 60 scoped_ptr<BrowserCompositorOverlayCandidateValidator> | 61 scoped_ptr<BrowserCompositorOverlayCandidateValidator> |
| 61 overlay_candidate_validator); | 62 overlay_candidate_validator); |
| 62 | 63 |
| 63 // Constructor used by the software implementation. | 64 // Constructor used by the software implementation. |
| 64 BrowserCompositorOutputSurface( | 65 BrowserCompositorOutputSurface( |
| 65 scoped_ptr<cc::SoftwareOutputDevice> software_device, | 66 scoped_ptr<cc::SoftwareOutputDevice> software_device, |
| 66 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager); | 67 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager); |
| 67 | 68 |
| 68 scoped_refptr<ui::CompositorVSyncManager> vsync_manager_; | 69 scoped_refptr<ui::CompositorVSyncManager> vsync_manager_; |
| 69 ReflectorImpl* reflector_; | 70 ReflectorImpl* reflector_; |
| 70 | 71 |
| 71 // True when BeginFrame scheduling is enabled. | 72 // True when BeginFrame scheduling is enabled. |
| 72 bool use_begin_frame_scheduling_; | 73 bool use_begin_frame_scheduling_; |
| 73 | 74 |
| 74 private: | 75 private: |
| 75 void Initialize(); | 76 void Initialize(); |
| 76 | 77 |
| 77 scoped_ptr<BrowserCompositorOverlayCandidateValidator> | 78 scoped_ptr<BrowserCompositorOverlayCandidateValidator> |
| 78 overlay_candidate_validator_; | 79 overlay_candidate_validator_; |
| 79 | 80 |
| 80 DISALLOW_COPY_AND_ASSIGN(BrowserCompositorOutputSurface); | 81 DISALLOW_COPY_AND_ASSIGN(BrowserCompositorOutputSurface); |
| 81 }; | 82 }; |
| 82 | 83 |
| 83 } // namespace content | 84 } // namespace content |
| 84 | 85 |
| 85 #endif // CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ | 86 #endif // CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ |
| OLD | NEW |