| 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_SOFTWARE_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ | 5 #ifndef CONTENT_BROWSER_COMPOSITOR_SOFTWARE_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ |
| 6 #define CONTENT_BROWSER_COMPOSITOR_SOFTWARE_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ | 6 #define CONTENT_BROWSER_COMPOSITOR_SOFTWARE_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| 11 #include "content/browser/compositor/browser_compositor_output_surface.h" | 11 #include "content/browser/compositor/browser_compositor_output_surface.h" |
| 12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
| 13 | 13 |
| 14 namespace cc { | 14 namespace cc { |
| 15 class SoftwareOutputDevice; | 15 class SoftwareOutputDevice; |
| 16 } | 16 } |
| 17 | 17 |
| 18 namespace ui { | 18 namespace ui { |
| 19 class CompositorVSyncManager; | 19 class CompositorVSyncManager; |
| 20 } | 20 } |
| 21 | 21 |
| 22 namespace content { | 22 namespace content { |
| 23 | 23 |
| 24 class CONTENT_EXPORT SoftwareBrowserCompositorOutputSurface | 24 class CONTENT_EXPORT SoftwareBrowserCompositorOutputSurface |
| 25 : public BrowserCompositorOutputSurface { | 25 : public BrowserCompositorOutputSurface { |
| 26 public: | 26 public: |
| 27 SoftwareBrowserCompositorOutputSurface( | 27 SoftwareBrowserCompositorOutputSurface( |
| 28 std::unique_ptr<cc::SoftwareOutputDevice> software_device, | 28 std::unique_ptr<cc::SoftwareOutputDevice> software_device, |
| 29 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, | 29 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, |
| 30 cc::SyntheticBeginFrameSource* begin_frame_source, | |
| 31 scoped_refptr<base::SingleThreadTaskRunner> task_runner); | 30 scoped_refptr<base::SingleThreadTaskRunner> task_runner); |
| 32 | 31 |
| 33 ~SoftwareBrowserCompositorOutputSurface() override; | 32 ~SoftwareBrowserCompositorOutputSurface() override; |
| 34 | 33 |
| 35 // OutputSurface implementation. | 34 // OutputSurface implementation. |
| 36 void BindToClient(cc::OutputSurfaceClient* client) override; | 35 void BindToClient(cc::OutputSurfaceClient* client) override; |
| 37 void EnsureBackbuffer() override; | 36 void EnsureBackbuffer() override; |
| 38 void DiscardBackbuffer() override; | 37 void DiscardBackbuffer() override; |
| 39 void BindFramebuffer() override; | 38 void BindFramebuffer() override; |
| 40 void Reshape(const gfx::Size& size, | 39 void Reshape(const gfx::Size& size, |
| (...skipping 17 matching lines...) Expand all Loading... |
| 58 cc::OutputSurfaceClient* client_ = nullptr; | 57 cc::OutputSurfaceClient* client_ = nullptr; |
| 59 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 58 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| 60 base::WeakPtrFactory<SoftwareBrowserCompositorOutputSurface> weak_factory_; | 59 base::WeakPtrFactory<SoftwareBrowserCompositorOutputSurface> weak_factory_; |
| 61 | 60 |
| 62 DISALLOW_COPY_AND_ASSIGN(SoftwareBrowserCompositorOutputSurface); | 61 DISALLOW_COPY_AND_ASSIGN(SoftwareBrowserCompositorOutputSurface); |
| 63 }; | 62 }; |
| 64 | 63 |
| 65 } // namespace content | 64 } // namespace content |
| 66 | 65 |
| 67 #endif // CONTENT_BROWSER_COMPOSITOR_SOFTWARE_BROWSER_COMPOSITOR_OUTPUT_SURFACE
_H_ | 66 #endif // CONTENT_BROWSER_COMPOSITOR_SOFTWARE_BROWSER_COMPOSITOR_OUTPUT_SURFACE
_H_ |
| OLD | NEW |