Index: cc/surfaces/direct_compositor_frame_sink.cc |
diff --git a/cc/surfaces/direct_compositor_frame_sink.cc b/cc/surfaces/direct_compositor_frame_sink.cc |
index 188f7db7b7a6c5b3afebe45da5afcdbb8fdeec2f..01239ee9f822df7c1f589bf8691e0857cf804881 100644 |
--- a/cc/surfaces/direct_compositor_frame_sink.cc |
+++ b/cc/surfaces/direct_compositor_frame_sink.cc |
@@ -32,7 +32,7 @@ |
display_(display), |
factory_(frame_sink_id, surface_manager, this) { |
DCHECK(thread_checker_.CalledOnValidThread()); |
- capabilities_.must_always_swap = true; |
+ capabilities_.can_force_reclaim_resources = true; |
// Display and DirectCompositorFrameSink share a GL context, so sync |
// points aren't needed when passing resources between them. |
capabilities_.delegated_sync_points_required = false; |
@@ -50,7 +50,7 @@ |
display_(display), |
factory_(frame_sink_id_, surface_manager, this) { |
DCHECK(thread_checker_.CalledOnValidThread()); |
- capabilities_.must_always_swap = true; |
+ capabilities_.can_force_reclaim_resources = true; |
} |
DirectCompositorFrameSink::~DirectCompositorFrameSink() { |
@@ -102,6 +102,11 @@ |
base::Unretained(this))); |
} |
+void DirectCompositorFrameSink::ForceReclaimResources() { |
+ if (delegated_local_frame_id_.is_valid()) |
+ factory_.ClearSurface(); |
+} |
+ |
void DirectCompositorFrameSink::ReturnResources( |
const ReturnedResourceArray& resources) { |
if (client_) |