Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1802)

Unified Diff: cc/test/test_compositor_frame_sink.h

Issue 2445553002: cc: Make OutputSurface entirely live on one thread in tests. (Closed)
Patch Set: osonthread: fixcontextdeleteintest Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/test/layer_tree_test.cc ('k') | cc/test/test_compositor_frame_sink.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/test_compositor_frame_sink.h
diff --git a/cc/test/test_compositor_frame_sink.h b/cc/test/test_compositor_frame_sink.h
index 8c33f9023746fbce49d9df0f4ed6ea7844f76e67..32d54f7aec767e97eb93b5bce44c33f329700c9d 100644
--- a/cc/test/test_compositor_frame_sink.h
+++ b/cc/test/test_compositor_frame_sink.h
@@ -29,6 +29,11 @@ class TestCompositorFrameSinkClient {
public:
virtual ~TestCompositorFrameSinkClient() {}
+ // This passes the ContextProvider being used by LayerTreeHostImpl which
+ // can be used for the OutputSurface optionally.
+ virtual std::unique_ptr<OutputSurface> CreateDisplayOutputSurface(
+ scoped_refptr<ContextProvider> compositor_context_provider) = 0;
+
virtual void DisplayReceivedCompositorFrame(const CompositorFrame& frame) = 0;
virtual void DisplayWillDrawAndSwap(bool will_draw_and_swap,
const RenderPassList& render_passes) = 0;
@@ -45,7 +50,6 @@ class TestCompositorFrameSink : public CompositorFrameSink,
TestCompositorFrameSink(
scoped_refptr<ContextProvider> compositor_context_provider,
scoped_refptr<ContextProvider> worker_context_provider,
- std::unique_ptr<OutputSurface> display_output_surface,
SharedBitmapManager* shared_bitmap_manager,
gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
const RendererSettings& renderer_settings,
@@ -54,6 +58,7 @@ class TestCompositorFrameSink : public CompositorFrameSink,
bool force_disable_reclaim_resources);
~TestCompositorFrameSink() override;
+ // This client must be set before BindToClient() happens.
void SetClient(TestCompositorFrameSinkClient* client) {
test_client_ = client;
}
@@ -85,6 +90,11 @@ class TestCompositorFrameSink : public CompositorFrameSink,
private:
void DidDrawCallback();
+ const bool synchronous_composite_;
+ const RendererSettings renderer_settings_;
+ SharedBitmapManager* const shared_bitmap_manager_;
+ gpu::GpuMemoryBufferManager* const gpu_memory_buffer_manager_;
+
scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
FrameSinkId frame_sink_id_;
@@ -100,8 +110,6 @@ class TestCompositorFrameSink : public CompositorFrameSink,
// Uses surface_manager_.
std::unique_ptr<Display> display_;
- const bool display_context_shared_with_compositor_;
-
bool bound_ = false;
TestCompositorFrameSinkClient* test_client_ = nullptr;
gfx::Size enlarge_pass_texture_amount_;
« no previous file with comments | « cc/test/layer_tree_test.cc ('k') | cc/test/test_compositor_frame_sink.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698