Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_RENDER_LAYOUT_TEST_DEPENDENCIES_H_ | 5 #ifndef CONTENT_RENDER_LAYOUT_TEST_DEPENDENCIES_H_ |
| 6 #define CONTENT_RENDER_LAYOUT_TEST_DEPENDENCIES_H_ | 6 #define CONTENT_RENDER_LAYOUT_TEST_DEPENDENCIES_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 | 12 |
| 13 namespace cc { | 13 namespace cc { |
| 14 class ContextProvider; | 14 class ContextProvider; |
| 15 class CopyOutputRequest; | |
| 15 class OutputSurface; | 16 class OutputSurface; |
| 17 class SwapPromise; | |
| 16 } | 18 } |
| 17 | 19 |
| 18 namespace gpu { | 20 namespace gpu { |
| 19 class GpuChannelHost; | 21 class GpuChannelHost; |
| 20 } | 22 } |
| 21 | 23 |
| 22 namespace content { | 24 namespace content { |
| 23 class CompositorDependencies; | 25 class CompositorDependencies; |
| 24 | 26 |
| 25 // This class allows injection of LayoutTest-specific behaviour to the | 27 // This class allows injection of LayoutTest-specific behaviour to the |
| 26 // RenderThreadImpl. | 28 // RenderThreadImpl. |
| 27 class LayoutTestDependencies { | 29 class LayoutTestDependencies { |
| 28 public: | 30 public: |
| 29 virtual std::unique_ptr<cc::OutputSurface> CreateOutputSurface( | 31 virtual std::unique_ptr<cc::OutputSurface> CreateOutputSurface( |
| 32 int32_t routing_id, | |
| 30 scoped_refptr<gpu::GpuChannelHost> gpu_channel, | 33 scoped_refptr<gpu::GpuChannelHost> gpu_channel, |
| 31 scoped_refptr<cc::ContextProvider> compositor_context_provider, | 34 scoped_refptr<cc::ContextProvider> compositor_context_provider, |
| 32 scoped_refptr<cc::ContextProvider> worker_context_provider, | 35 scoped_refptr<cc::ContextProvider> worker_context_provider, |
| 33 CompositorDependencies* deps) = 0; | 36 CompositorDependencies* deps) = 0; |
| 37 | |
| 38 // Returns a SwapPromise which should be queued for the appropriate frame. | |
|
danakj
2016/07/22 20:50:26
appropriate = the next compositor frame?
jbroman
2016/07/25 18:50:55
Technically no (you could hold on to this and wait
| |
| 39 virtual std::unique_ptr<cc::SwapPromise> RequestCopyOfOutput( | |
| 40 int32_t routing_id, | |
| 41 std::unique_ptr<cc::CopyOutputRequest> request) = 0; | |
| 34 }; | 42 }; |
| 35 | 43 |
| 36 } // namespace content | 44 } // namespace content |
| 37 | 45 |
| 38 #endif // CONTENT_RENDER_LAYOUT_TEST_DEPENDENCIES_H_ | 46 #endif // CONTENT_RENDER_LAYOUT_TEST_DEPENDENCIES_H_ |
| OLD | NEW |