| 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, | |
| 60 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, | 59 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, |
| 61 scoped_ptr<BrowserCompositorOverlayCandidateValidator> | 60 scoped_ptr<BrowserCompositorOverlayCandidateValidator> |
| 62 overlay_candidate_validator); | 61 overlay_candidate_validator); |
| 63 | 62 |
| 64 // Constructor used by the software implementation. | 63 // Constructor used by the software implementation. |
| 65 BrowserCompositorOutputSurface( | 64 BrowserCompositorOutputSurface( |
| 66 scoped_ptr<cc::SoftwareOutputDevice> software_device, | 65 scoped_ptr<cc::SoftwareOutputDevice> software_device, |
| 67 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager); | 66 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager); |
| 68 | 67 |
| 69 scoped_refptr<ui::CompositorVSyncManager> vsync_manager_; | 68 scoped_refptr<ui::CompositorVSyncManager> vsync_manager_; |
| 70 ReflectorImpl* reflector_; | 69 ReflectorImpl* reflector_; |
| 71 | 70 |
| 72 // True when BeginFrame scheduling is enabled. | 71 // True when BeginFrame scheduling is enabled. |
| 73 bool use_begin_frame_scheduling_; | 72 bool use_begin_frame_scheduling_; |
| 74 | 73 |
| 75 private: | 74 private: |
| 76 void Initialize(); | 75 void Initialize(); |
| 77 | 76 |
| 78 scoped_ptr<BrowserCompositorOverlayCandidateValidator> | 77 scoped_ptr<BrowserCompositorOverlayCandidateValidator> |
| 79 overlay_candidate_validator_; | 78 overlay_candidate_validator_; |
| 80 | 79 |
| 81 DISALLOW_COPY_AND_ASSIGN(BrowserCompositorOutputSurface); | 80 DISALLOW_COPY_AND_ASSIGN(BrowserCompositorOutputSurface); |
| 82 }; | 81 }; |
| 83 | 82 |
| 84 } // namespace content | 83 } // namespace content |
| 85 | 84 |
| 86 #endif // CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ | 85 #endif // CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ |
| OLD | NEW |