| 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/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/threading/non_thread_safe.h" | 9 #include "base/threading/non_thread_safe.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| 11 #include "cc/output/output_surface.h" | 11 #include "cc/output/output_surface.h" |
| 12 #include "cc/scheduler/begin_frame_source.h" |
| 12 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
| 13 #include "ui/compositor/compositor_vsync_manager.h" | 14 #include "ui/compositor/compositor_vsync_manager.h" |
| 14 | 15 |
| 15 namespace cc { | 16 namespace cc { |
| 16 class SoftwareOutputDevice; | 17 class SoftwareOutputDevice; |
| 17 } | 18 } |
| 18 | 19 |
| 19 namespace gfx { | 20 namespace gfx { |
| 20 enum class SwapResult; | 21 enum class SwapResult; |
| 21 } | 22 } |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, | 71 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, |
| 71 scoped_ptr<BrowserCompositorOverlayCandidateValidator> | 72 scoped_ptr<BrowserCompositorOverlayCandidateValidator> |
| 72 overlay_candidate_validator); | 73 overlay_candidate_validator); |
| 73 | 74 |
| 74 // Constructor used by the software implementation. | 75 // Constructor used by the software implementation. |
| 75 BrowserCompositorOutputSurface( | 76 BrowserCompositorOutputSurface( |
| 76 scoped_ptr<cc::SoftwareOutputDevice> software_device, | 77 scoped_ptr<cc::SoftwareOutputDevice> software_device, |
| 77 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager); | 78 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager); |
| 78 | 79 |
| 79 scoped_refptr<ui::CompositorVSyncManager> vsync_manager_; | 80 scoped_refptr<ui::CompositorVSyncManager> vsync_manager_; |
| 81 scoped_ptr<cc::SyntheticBeginFrameSource> synthetic_begin_frame_source_; |
| 80 ReflectorImpl* reflector_; | 82 ReflectorImpl* reflector_; |
| 81 | 83 |
| 82 // True when BeginFrame scheduling is enabled. | 84 // True when BeginFrame scheduling is enabled. |
| 83 bool use_begin_frame_scheduling_; | 85 bool use_begin_frame_scheduling_; |
| 84 | 86 |
| 85 private: | 87 private: |
| 86 void Initialize(); | 88 void Initialize(); |
| 87 | 89 |
| 90 void UpdateVSyncParametersInternal(base::TimeTicks timebase, |
| 91 base::TimeDelta interval); |
| 92 |
| 88 scoped_ptr<BrowserCompositorOverlayCandidateValidator> | 93 scoped_ptr<BrowserCompositorOverlayCandidateValidator> |
| 89 overlay_candidate_validator_; | 94 overlay_candidate_validator_; |
| 90 | 95 |
| 91 DISALLOW_COPY_AND_ASSIGN(BrowserCompositorOutputSurface); | 96 DISALLOW_COPY_AND_ASSIGN(BrowserCompositorOutputSurface); |
| 92 }; | 97 }; |
| 93 | 98 |
| 94 } // namespace content | 99 } // namespace content |
| 95 | 100 |
| 96 #endif // CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ | 101 #endif // CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ |
| OLD | NEW |