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

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 1287043002: cc: Setup API to release OutputSurface from LTHClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unit test Created 5 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 #include "cc/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 2176 matching lines...) Expand 10 before | Expand all | Expand 10 after
2187 } 2187 }
2188 2188
2189 void LayerTreeHostImpl::CleanUpTileManager() { 2189 void LayerTreeHostImpl::CleanUpTileManager() {
2190 tile_manager_->FinishTasksAndCleanUp(); 2190 tile_manager_->FinishTasksAndCleanUp();
2191 resource_pool_ = nullptr; 2191 resource_pool_ = nullptr;
2192 staging_resource_pool_ = nullptr; 2192 staging_resource_pool_ = nullptr;
2193 tile_task_worker_pool_ = nullptr; 2193 tile_task_worker_pool_ = nullptr;
2194 single_thread_synchronous_task_graph_runner_ = nullptr; 2194 single_thread_synchronous_task_graph_runner_ = nullptr;
2195 } 2195 }
2196 2196
2197 scoped_ptr<OutputSurface> LayerTreeHostImpl::GetOutputSurface() {
2198 return output_surface_.Pass();
no sievers 2015/09/10 00:00:22 |renderer_| and |resource_provider_| still have po
sohanjg 2015/09/10 15:07:23 Done.
2199 }
2200
2197 bool LayerTreeHostImpl::InitializeRenderer( 2201 bool LayerTreeHostImpl::InitializeRenderer(
2198 scoped_ptr<OutputSurface> output_surface) { 2202 scoped_ptr<OutputSurface> output_surface) {
2199 TRACE_EVENT0("cc", "LayerTreeHostImpl::InitializeRenderer"); 2203 TRACE_EVENT0("cc", "LayerTreeHostImpl::InitializeRenderer");
2200 2204
2201 // Since we will create a new resource provider, we cannot continue to use 2205 // Since we will create a new resource provider, we cannot continue to use
2202 // the old resources (i.e. render_surfaces and texture IDs). Clear them 2206 // the old resources (i.e. render_surfaces and texture IDs). Clear them
2203 // before we destroy the old resource provider. 2207 // before we destroy the old resource provider.
2204 ReleaseTreeResources(); 2208 ReleaseTreeResources();
2205 2209
2206 // Note: order is important here. 2210 // Note: order is important here.
(...skipping 1425 matching lines...) Expand 10 before | Expand all | Expand 10 after
3632 if (active_tree()) { 3636 if (active_tree()) {
3633 LayerAnimationValueProvider* layer = active_tree()->LayerById(layer_id); 3637 LayerAnimationValueProvider* layer = active_tree()->LayerById(layer_id);
3634 if (layer) 3638 if (layer)
3635 return layer->ScrollOffsetForAnimation(); 3639 return layer->ScrollOffsetForAnimation();
3636 } 3640 }
3637 3641
3638 return gfx::ScrollOffset(); 3642 return gfx::ScrollOffset();
3639 } 3643 }
3640 3644
3641 } // namespace cc 3645 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698