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

Unified Diff: cc/test/test_compositor_frame_sink.h

Issue 2609253003: Remove ForceReclaimResources (Closed)
Patch Set: cleanup Created 3 years, 11 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
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 52b4aeca1125b315eaef00aa2674cb62b45a09aa..1db93c86d84aeeb4927d7e27d67a7fcc9b6db50c 100644
--- a/cc/test/test_compositor_frame_sink.h
+++ b/cc/test/test_compositor_frame_sink.h
@@ -54,8 +54,7 @@ class TestCompositorFrameSink : public CompositorFrameSink,
gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
const RendererSettings& renderer_settings,
scoped_refptr<base::SingleThreadTaskRunner> task_runner,
- bool synchronous_composite,
- bool force_disable_reclaim_resources);
+ bool synchronous_composite);
~TestCompositorFrameSink() override;
// This client must be set before BindToClient() happens.
@@ -65,6 +64,9 @@ class TestCompositorFrameSink : public CompositorFrameSink,
void SetEnlargePassTextureAmount(const gfx::Size& s) {
enlarge_pass_texture_amount_ = s;
}
+ void SetForceReclaimResourcesAfterSwap() {
+ force_reclaim_resources_after_swap_ = true;
+ }
Display* display() const { return display_.get(); }
@@ -75,7 +77,6 @@ class TestCompositorFrameSink : public CompositorFrameSink,
bool BindToClient(CompositorFrameSinkClient* client) override;
void DetachFromClient() override;
void SubmitCompositorFrame(CompositorFrame frame) override;
- void ForceReclaimResources() override;
// SurfaceFactoryClient implementation.
void ReturnResources(const ReturnedResourceArray& resources) override;
@@ -116,6 +117,9 @@ class TestCompositorFrameSink : public CompositorFrameSink,
std::vector<std::unique_ptr<CopyOutputRequest>> copy_requests_;
+ // If true, we will attempt to reclaim resources after each swap.
+ bool force_reclaim_resources_after_swap_ = false;
+
base::WeakPtrFactory<TestCompositorFrameSink> weak_ptr_factory_;
};

Powered by Google App Engine
This is Rietveld 408576698