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

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

Issue 2631453002: Revert of cc: Add image decode queue functionality to image manager. (Closed)
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « cc/trees/layer_tree_host_in_process.h ('k') | content/renderer/gpu/render_widget_compositor.cc » ('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_in_process.h" 5 #include "cc/trees/layer_tree_host_in_process.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 rendering_stats_instrumentation_(RenderingStatsInstrumentation::Create()), 115 rendering_stats_instrumentation_(RenderingStatsInstrumentation::Create()),
116 settings_(*params->settings), 116 settings_(*params->settings),
117 debug_state_(settings_.initial_debug_state), 117 debug_state_(settings_.initial_debug_state),
118 visible_(false), 118 visible_(false),
119 has_gpu_rasterization_trigger_(false), 119 has_gpu_rasterization_trigger_(false),
120 content_is_suitable_for_gpu_rasterization_(true), 120 content_is_suitable_for_gpu_rasterization_(true),
121 gpu_rasterization_histogram_recorded_(false), 121 gpu_rasterization_histogram_recorded_(false),
122 did_complete_scale_animation_(false), 122 did_complete_scale_animation_(false),
123 id_(s_layer_tree_host_sequence_number.GetNext() + 1), 123 id_(s_layer_tree_host_sequence_number.GetNext() + 1),
124 task_graph_runner_(params->task_graph_runner), 124 task_graph_runner_(params->task_graph_runner),
125 image_serialization_processor_(params->image_serialization_processor), 125 image_serialization_processor_(params->image_serialization_processor) {
126 image_worker_task_runner_(params->image_worker_task_runner) {
127 DCHECK(task_graph_runner_); 126 DCHECK(task_graph_runner_);
128 DCHECK(layer_tree_); 127 DCHECK(layer_tree_);
129 DCHECK_NE(compositor_mode_, CompositorMode::REMOTE); 128 DCHECK_NE(compositor_mode_, CompositorMode::REMOTE);
130 129
131 rendering_stats_instrumentation_->set_record_rendering_stats( 130 rendering_stats_instrumentation_->set_record_rendering_stats(
132 debug_state_.RecordRenderingStats()); 131 debug_state_.RecordRenderingStats());
133 } 132 }
134 133
135 void LayerTreeHostInProcess::InitializeThreaded( 134 void LayerTreeHostInProcess::InitializeThreaded(
136 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 135 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 LayerTreeHostImplClient* client) { 438 LayerTreeHostImplClient* client) {
440 DCHECK(task_runner_provider_->IsImplThread()); 439 DCHECK(task_runner_provider_->IsImplThread());
441 440
442 const bool supports_impl_scrolling = task_runner_provider_->HasImplThread(); 441 const bool supports_impl_scrolling = task_runner_provider_->HasImplThread();
443 std::unique_ptr<MutatorHost> mutator_host_impl = 442 std::unique_ptr<MutatorHost> mutator_host_impl =
444 layer_tree_->mutator_host()->CreateImplInstance(supports_impl_scrolling); 443 layer_tree_->mutator_host()->CreateImplInstance(supports_impl_scrolling);
445 444
446 std::unique_ptr<LayerTreeHostImpl> host_impl = LayerTreeHostImpl::Create( 445 std::unique_ptr<LayerTreeHostImpl> host_impl = LayerTreeHostImpl::Create(
447 settings_, client, task_runner_provider_.get(), 446 settings_, client, task_runner_provider_.get(),
448 rendering_stats_instrumentation_.get(), task_graph_runner_, 447 rendering_stats_instrumentation_.get(), task_graph_runner_,
449 std::move(mutator_host_impl), id_, std::move(image_worker_task_runner_)); 448 std::move(mutator_host_impl), id_);
450 host_impl->SetHasGpuRasterizationTrigger(has_gpu_rasterization_trigger_); 449 host_impl->SetHasGpuRasterizationTrigger(has_gpu_rasterization_trigger_);
451 host_impl->SetContentIsSuitableForGpuRasterization( 450 host_impl->SetContentIsSuitableForGpuRasterization(
452 content_is_suitable_for_gpu_rasterization_); 451 content_is_suitable_for_gpu_rasterization_);
453 task_graph_runner_ = NULL; 452 task_graph_runner_ = NULL;
454 input_handler_weak_ptr_ = host_impl->AsWeakPtr(); 453 input_handler_weak_ptr_ = host_impl->AsWeakPtr();
455 return host_impl; 454 return host_impl;
456 } 455 }
457 456
458 void LayerTreeHostInProcess::DidLoseCompositorFrameSink() { 457 void LayerTreeHostInProcess::DidLoseCompositorFrameSink() {
459 TRACE_EVENT0("cc", "LayerTreeHostInProcess::DidLoseCompositorFrameSink"); 458 TRACE_EVENT0("cc", "LayerTreeHostInProcess::DidLoseCompositorFrameSink");
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 return compositor_mode_ == CompositorMode::SINGLE_THREADED; 852 return compositor_mode_ == CompositorMode::SINGLE_THREADED;
854 } 853 }
855 854
856 bool LayerTreeHostInProcess::IsThreaded() const { 855 bool LayerTreeHostInProcess::IsThreaded() const {
857 DCHECK(compositor_mode_ != CompositorMode::THREADED || 856 DCHECK(compositor_mode_ != CompositorMode::THREADED ||
858 task_runner_provider_->HasImplThread()); 857 task_runner_provider_->HasImplThread());
859 return compositor_mode_ == CompositorMode::THREADED; 858 return compositor_mode_ == CompositorMode::THREADED;
860 } 859 }
861 860
862 } // namespace cc 861 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_in_process.h ('k') | content/renderer/gpu/render_widget_compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698