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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 2822143003: Remove ForceReclaimResources (Closed)
Patch Set: Change to RunLoop. Created 3 years, 8 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/test_compositor_frame_sink.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 6965594181cb0a4dd868f89b7894ae6e36d2fdfa..1e6530d9a8141ab028c44fbb555157904df3b0a0 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -324,15 +324,6 @@ void LayerTreeHostImpl::BeginMainFrameAborted(
void LayerTreeHostImpl::BeginCommit() {
TRACE_EVENT0("cc", "LayerTreeHostImpl::BeginCommit");
- // Ensure all textures are returned so partial texture updates can happen
- // during the commit.
- // TODO(ericrk): We should not need to ForceReclaimResources when using
- // Impl-side-painting as it doesn't upload during commits. However,
- // Display::Draw currently relies on resource being reclaimed to block drawing
- // between BeginCommit / Swap. See crbug.com/489515.
- if (compositor_frame_sink_)
- compositor_frame_sink_->ForceReclaimResources();
-
if (!CommitToActiveTree())
CreatePendingTree();
}
@@ -800,8 +791,8 @@ DrawResult LayerTreeHostImpl::CalculateRenderPasses(FrameData* frame) {
!root_surface->layer_list().empty();
bool hud_wants_to_draw_ = active_tree_->hud_layer() &&
active_tree_->hud_layer()->IsAnimatingHUDContents();
- bool resources_must_be_resent =
- compositor_frame_sink_->capabilities().can_force_reclaim_resources;
+ bool must_always_swap =
+ compositor_frame_sink_->capabilities().must_always_swap;
// When touch handle visibility changes there is no visible damage
// because touch handles are composited in the browser. However we
// still want the browser to be notified that the handles changed
@@ -812,8 +803,7 @@ DrawResult LayerTreeHostImpl::CalculateRenderPasses(FrameData* frame) {
if (root_surface_has_contributing_layers &&
root_surface_has_no_visible_damage &&
!active_tree_->property_trees()->effect_tree.HasCopyRequests() &&
- !resources_must_be_resent && !hud_wants_to_draw_ &&
- !handle_visibility_changed) {
+ !must_always_swap && !hud_wants_to_draw_ && !handle_visibility_changed) {
TRACE_EVENT0("cc",
"LayerTreeHostImpl::CalculateRenderPasses::EmptyDamageRect");
frame->has_no_damage = true;
« no previous file with comments | « cc/test/test_compositor_frame_sink.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698