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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 2537683002: cc: Add image decode queue functionality to image manager. (Closed)
Patch Set: test fix 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
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('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 f4ce94d2bd4be5f8189366801b9704f29dc308c9..ab2763bd69ce48141875aff77917967bed0b6216 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -190,10 +190,12 @@ std::unique_ptr<LayerTreeHostImpl> LayerTreeHostImpl::Create(
RenderingStatsInstrumentation* rendering_stats_instrumentation,
TaskGraphRunner* task_graph_runner,
std::unique_ptr<MutatorHost> mutator_host,
- int id) {
+ int id,
+ scoped_refptr<base::SequencedTaskRunner> image_worker_task_runner) {
return base::WrapUnique(new LayerTreeHostImpl(
settings, client, task_runner_provider, rendering_stats_instrumentation,
- task_graph_runner, std::move(mutator_host), id));
+ task_graph_runner, std::move(mutator_host), id,
+ std::move(image_worker_task_runner)));
}
LayerTreeHostImpl::LayerTreeHostImpl(
@@ -203,7 +205,8 @@ LayerTreeHostImpl::LayerTreeHostImpl(
RenderingStatsInstrumentation* rendering_stats_instrumentation,
TaskGraphRunner* task_graph_runner,
std::unique_ptr<MutatorHost> mutator_host,
- int id)
+ int id,
+ scoped_refptr<base::SequencedTaskRunner> image_worker_task_runner)
: client_(client),
task_runner_provider_(task_runner_provider),
current_begin_frame_tracker_(BEGINFRAMETRACKER_FROM_HERE),
@@ -229,6 +232,7 @@ LayerTreeHostImpl::LayerTreeHostImpl(
// task_runner_provider_.
tile_manager_(this,
GetTaskRunner(),
+ std::move(image_worker_task_runner),
is_synchronous_single_threaded_
? std::numeric_limits<size_t>::max()
: settings.scheduled_raster_task_limit,
@@ -273,6 +277,8 @@ LayerTreeHostImpl::LayerTreeHostImpl(
browser_controls_offset_manager_ = BrowserControlsOffsetManager::Create(
this, settings.top_controls_show_threshold,
settings.top_controls_hide_threshold);
+
+ tile_manager_.SetDecodedImageTracker(&decoded_image_tracker_);
}
LayerTreeHostImpl::~LayerTreeHostImpl() {
@@ -1837,6 +1843,7 @@ void LayerTreeHostImpl::WillBeginImplFrame(const BeginFrameArgs& args) {
void LayerTreeHostImpl::DidFinishImplFrame() {
current_begin_frame_tracker_.Finish();
+ decoded_image_tracker_.NotifyFrameFinished();
}
void LayerTreeHostImpl::UpdateViewportContainerSizes() {
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698