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

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

Issue 1449133002: TaskGraphRunner refactor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: feedback Created 5 years 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
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | components/mus/gles2/raster_thread_helper.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 #include "cc/output/software_renderer.h" 51 #include "cc/output/software_renderer.h"
52 #include "cc/output/texture_mailbox_deleter.h" 52 #include "cc/output/texture_mailbox_deleter.h"
53 #include "cc/quads/render_pass_draw_quad.h" 53 #include "cc/quads/render_pass_draw_quad.h"
54 #include "cc/quads/shared_quad_state.h" 54 #include "cc/quads/shared_quad_state.h"
55 #include "cc/quads/solid_color_draw_quad.h" 55 #include "cc/quads/solid_color_draw_quad.h"
56 #include "cc/quads/texture_draw_quad.h" 56 #include "cc/quads/texture_draw_quad.h"
57 #include "cc/raster/bitmap_tile_task_worker_pool.h" 57 #include "cc/raster/bitmap_tile_task_worker_pool.h"
58 #include "cc/raster/gpu_rasterizer.h" 58 #include "cc/raster/gpu_rasterizer.h"
59 #include "cc/raster/gpu_tile_task_worker_pool.h" 59 #include "cc/raster/gpu_tile_task_worker_pool.h"
60 #include "cc/raster/one_copy_tile_task_worker_pool.h" 60 #include "cc/raster/one_copy_tile_task_worker_pool.h"
61 #include "cc/raster/synchronous_task_graph_runner.h"
61 #include "cc/raster/tile_task_worker_pool.h" 62 #include "cc/raster/tile_task_worker_pool.h"
62 #include "cc/raster/zero_copy_tile_task_worker_pool.h" 63 #include "cc/raster/zero_copy_tile_task_worker_pool.h"
63 #include "cc/resources/memory_history.h" 64 #include "cc/resources/memory_history.h"
64 #include "cc/resources/resource_pool.h" 65 #include "cc/resources/resource_pool.h"
65 #include "cc/resources/ui_resource_bitmap.h" 66 #include "cc/resources/ui_resource_bitmap.h"
66 #include "cc/scheduler/delay_based_time_source.h" 67 #include "cc/scheduler/delay_based_time_source.h"
67 #include "cc/tiles/eviction_tile_priority_queue.h" 68 #include "cc/tiles/eviction_tile_priority_queue.h"
68 #include "cc/tiles/picture_layer_tiling.h" 69 #include "cc/tiles/picture_layer_tiling.h"
69 #include "cc/tiles/raster_tile_priority_queue.h" 70 #include "cc/tiles/raster_tile_priority_queue.h"
70 #include "cc/trees/damage_tracker.h" 71 #include "cc/trees/damage_tracker.h"
(...skipping 2082 matching lines...) Expand 10 before | Expand all | Expand 10 after
2153 DCHECK(GetTaskRunner()); 2154 DCHECK(GetTaskRunner());
2154 // TODO(vmpstr): Make this a DCHECK (or remove) when crbug.com/419086 is 2155 // TODO(vmpstr): Make this a DCHECK (or remove) when crbug.com/419086 is
2155 // resolved. 2156 // resolved.
2156 CHECK(resource_provider_); 2157 CHECK(resource_provider_);
2157 2158
2158 // Pass the single-threaded synchronous task graph runner to the worker pool 2159 // Pass the single-threaded synchronous task graph runner to the worker pool
2159 // if we're in synchronous single-threaded mode. 2160 // if we're in synchronous single-threaded mode.
2160 TaskGraphRunner* task_graph_runner = task_graph_runner_; 2161 TaskGraphRunner* task_graph_runner = task_graph_runner_;
2161 if (is_synchronous_single_threaded_) { 2162 if (is_synchronous_single_threaded_) {
2162 DCHECK(!single_thread_synchronous_task_graph_runner_); 2163 DCHECK(!single_thread_synchronous_task_graph_runner_);
2163 single_thread_synchronous_task_graph_runner_.reset(new TaskGraphRunner); 2164 single_thread_synchronous_task_graph_runner_.reset(
2165 new SynchronousTaskGraphRunner);
2164 task_graph_runner = single_thread_synchronous_task_graph_runner_.get(); 2166 task_graph_runner = single_thread_synchronous_task_graph_runner_.get();
2165 } 2167 }
2166 2168
2167 ContextProvider* context_provider = output_surface_->context_provider(); 2169 ContextProvider* context_provider = output_surface_->context_provider();
2168 if (!context_provider) { 2170 if (!context_provider) {
2169 *resource_pool = 2171 *resource_pool =
2170 ResourcePool::Create(resource_provider_.get(), GetTaskRunner()); 2172 ResourcePool::Create(resource_provider_.get(), GetTaskRunner());
2171 2173
2172 *tile_task_worker_pool = BitmapTileTaskWorkerPool::Create( 2174 *tile_task_worker_pool = BitmapTileTaskWorkerPool::Create(
2173 GetTaskRunner(), task_graph_runner, resource_provider_.get()); 2175 GetTaskRunner(), task_graph_runner, resource_provider_.get());
(...skipping 1563 matching lines...) Expand 10 before | Expand all | Expand 10 after
3737 return task_runner_provider_->HasImplThread(); 3739 return task_runner_provider_->HasImplThread();
3738 } 3740 }
3739 3741
3740 bool LayerTreeHostImpl::CommitToActiveTree() const { 3742 bool LayerTreeHostImpl::CommitToActiveTree() const {
3741 // In single threaded mode we skip the pending tree and commit directly to the 3743 // In single threaded mode we skip the pending tree and commit directly to the
3742 // active tree. 3744 // active tree.
3743 return !task_runner_provider_->HasImplThread(); 3745 return !task_runner_provider_->HasImplThread();
3744 } 3746 }
3745 3747
3746 } // namespace cc 3748 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | components/mus/gles2/raster_thread_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698