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

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

Issue 2362073002: cc/blimp: Add a LayerTreeHostRemote implementation. (Closed)
Patch Set: source frame number Created 4 years, 2 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
« cc/trees/layer_tree_host.cc ('K') | « cc/trees/layer_tree_host.cc ('k') | no next file » | 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>
11 #include <memory> 11 #include <memory>
12 #include <stack> 12 #include <stack>
13 #include <string> 13 #include <string>
14 #include <unordered_map> 14 #include <unordered_map>
15 15
16 #include "base/atomic_sequence_num.h"
17 #include "base/bind.h" 16 #include "base/bind.h"
18 #include "base/command_line.h" 17 #include "base/command_line.h"
19 #include "base/location.h" 18 #include "base/location.h"
20 #include "base/memory/ptr_util.h" 19 #include "base/memory/ptr_util.h"
21 #include "base/metrics/histogram_macros.h" 20 #include "base/metrics/histogram_macros.h"
22 #include "base/numerics/safe_math.h" 21 #include "base/numerics/safe_math.h"
23 #include "base/single_thread_task_runner.h" 22 #include "base/single_thread_task_runner.h"
24 #include "base/stl_util.h" 23 #include "base/stl_util.h"
25 #include "base/strings/string_number_conversions.h" 24 #include "base/strings/string_number_conversions.h"
26 #include "base/threading/thread_task_runner_handle.h" 25 #include "base/threading/thread_task_runner_handle.h"
(...skipping 29 matching lines...) Expand all
56 #include "cc/trees/layer_tree_impl.h" 55 #include "cc/trees/layer_tree_impl.h"
57 #include "cc/trees/property_tree_builder.h" 56 #include "cc/trees/property_tree_builder.h"
58 #include "cc/trees/proxy_main.h" 57 #include "cc/trees/proxy_main.h"
59 #include "cc/trees/remote_channel_impl.h" 58 #include "cc/trees/remote_channel_impl.h"
60 #include "cc/trees/single_thread_proxy.h" 59 #include "cc/trees/single_thread_proxy.h"
61 #include "cc/trees/swap_promise_manager.h" 60 #include "cc/trees/swap_promise_manager.h"
62 #include "cc/trees/tree_synchronizer.h" 61 #include "cc/trees/tree_synchronizer.h"
63 #include "ui/gfx/geometry/size_conversions.h" 62 #include "ui/gfx/geometry/size_conversions.h"
64 #include "ui/gfx/geometry/vector2d_conversions.h" 63 #include "ui/gfx/geometry/vector2d_conversions.h"
65 64
66 namespace {
67 static base::StaticAtomicSequenceNumber s_layer_tree_host_sequence_number;
68 }
69
70 namespace cc { 65 namespace cc {
71 namespace { 66 namespace {
72 67
73 std::unique_ptr<base::trace_event::TracedValue> 68 std::unique_ptr<base::trace_event::TracedValue>
74 ComputeLayerTreeHostProtoSizeSplitAsValue(proto::LayerTreeHost* proto) { 69 ComputeLayerTreeHostProtoSizeSplitAsValue(proto::LayerTreeHost* proto) {
75 std::unique_ptr<base::trace_event::TracedValue> value( 70 std::unique_ptr<base::trace_event::TracedValue> value(
76 new base::trace_event::TracedValue()); 71 new base::trace_event::TracedValue());
77 base::CheckedNumeric<int> base_layer_properties_size = 0; 72 base::CheckedNumeric<int> base_layer_properties_size = 0;
78 base::CheckedNumeric<int> picture_layer_properties_size = 0; 73 base::CheckedNumeric<int> picture_layer_properties_size = 0;
79 base::CheckedNumeric<int> display_item_list_size = 0; 74 base::CheckedNumeric<int> display_item_list_size = 0;
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 client_(params->client), 201 client_(params->client),
207 source_frame_number_(0), 202 source_frame_number_(0),
208 rendering_stats_instrumentation_(RenderingStatsInstrumentation::Create()), 203 rendering_stats_instrumentation_(RenderingStatsInstrumentation::Create()),
209 settings_(*params->settings), 204 settings_(*params->settings),
210 debug_state_(settings_.initial_debug_state), 205 debug_state_(settings_.initial_debug_state),
211 visible_(false), 206 visible_(false),
212 has_gpu_rasterization_trigger_(false), 207 has_gpu_rasterization_trigger_(false),
213 content_is_suitable_for_gpu_rasterization_(true), 208 content_is_suitable_for_gpu_rasterization_(true),
214 gpu_rasterization_histogram_recorded_(false), 209 gpu_rasterization_histogram_recorded_(false),
215 did_complete_scale_animation_(false), 210 did_complete_scale_animation_(false),
216 id_(s_layer_tree_host_sequence_number.GetNext() + 1), 211 id_(LayerTreeHost::GenerateHostId()),
217 next_commit_forces_redraw_(false), 212 next_commit_forces_redraw_(false),
218 shared_bitmap_manager_(params->shared_bitmap_manager), 213 shared_bitmap_manager_(params->shared_bitmap_manager),
219 gpu_memory_buffer_manager_(params->gpu_memory_buffer_manager), 214 gpu_memory_buffer_manager_(params->gpu_memory_buffer_manager),
220 task_graph_runner_(params->task_graph_runner), 215 task_graph_runner_(params->task_graph_runner),
221 image_serialization_processor_(params->image_serialization_processor) { 216 image_serialization_processor_(params->image_serialization_processor) {
222 DCHECK(task_graph_runner_); 217 DCHECK(task_graph_runner_);
223 DCHECK(layer_tree_); 218 DCHECK(layer_tree_);
224 219
225 rendering_stats_instrumentation_->set_record_rendering_stats( 220 rendering_stats_instrumentation_->set_record_rendering_stats(
226 debug_state_.RecordRenderingStats()); 221 debug_state_.RecordRenderingStats());
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after
1027 1022
1028 debug_state_.FromProtobuf(proto.debug_state()); 1023 debug_state_.FromProtobuf(proto.debug_state());
1029 has_gpu_rasterization_trigger_ = proto.has_gpu_rasterization_trigger(); 1024 has_gpu_rasterization_trigger_ = proto.has_gpu_rasterization_trigger();
1030 content_is_suitable_for_gpu_rasterization_ = 1025 content_is_suitable_for_gpu_rasterization_ =
1031 proto.content_is_suitable_for_gpu_rasterization(); 1026 proto.content_is_suitable_for_gpu_rasterization();
1032 id_ = proto.id(); 1027 id_ = proto.id();
1033 next_commit_forces_redraw_ = proto.next_commit_forces_redraw(); 1028 next_commit_forces_redraw_ = proto.next_commit_forces_redraw();
1034 } 1029 }
1035 1030
1036 } // namespace cc 1031 } // namespace cc
OLDNEW
« cc/trees/layer_tree_host.cc ('K') | « cc/trees/layer_tree_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698