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

Unified Diff: cc/trees/layer_tree_host.cc

Issue 1547893003: WIP - compositor worker mega patch. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 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.h ('k') | cc/trees/layer_tree_host_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host.cc
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index cb9619b1ebaedd6312310b2a156ae1ffb664ed85..aa5daffb2346c29a581f3825139f0ad08bdfff3e 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -568,7 +568,6 @@ bool LayerTreeHost::BeginMainFrameRequested() const {
return proxy_->BeginMainFrameRequested();
}
-
void LayerTreeHost::SetNextCommitWaitsForActivation() {
proxy_->SetNextCommitWaitsForActivation();
}
@@ -629,10 +628,8 @@ void LayerTreeHost::SetHasGpuRasterizationTrigger(bool has_trigger) {
return;
has_gpu_rasterization_trigger_ = has_trigger;
- TRACE_EVENT_INSTANT1("cc",
- "LayerTreeHost::SetHasGpuRasterizationTrigger",
- TRACE_EVENT_SCOPE_THREAD,
- "has_trigger",
+ TRACE_EVENT_INSTANT1("cc", "LayerTreeHost::SetHasGpuRasterizationTrigger",
+ TRACE_EVENT_SCOPE_THREAD, "has_trigger",
has_gpu_rasterization_trigger_);
}
@@ -702,12 +699,8 @@ void LayerTreeHost::StartPageScaleAnimation(const gfx::Vector2d& target_offset,
bool use_anchor,
float scale,
base::TimeDelta duration) {
- pending_page_scale_animation_.reset(
- new PendingPageScaleAnimation(
- target_offset,
- use_anchor,
- scale,
- duration));
+ pending_page_scale_animation_.reset(new PendingPageScaleAnimation(
+ target_offset, use_anchor, scale, duration));
SetNeedsCommit();
}
@@ -876,9 +869,8 @@ void LayerTreeHost::ApplyScrollAndScale(ScrollAndScaleSet* info) {
} else if (layer == inner_viewport_scroll_layer_.get()) {
inner_viewport_scroll_delta += info->scrolls[i].scroll_delta;
} else {
- layer->SetScrollOffsetFromImplSide(
- gfx::ScrollOffsetWithDelta(layer->scroll_offset(),
- info->scrolls[i].scroll_delta));
+ layer->SetScrollOffsetFromImplSide(gfx::ScrollOffsetWithDelta(
+ layer->scroll_offset(), info->scrolls[i].scroll_delta));
}
SetNeedsUpdateLayers();
}
@@ -916,6 +908,13 @@ void LayerTreeHost::ApplyScrollAndScale(ScrollAndScaleSet* info) {
}
}
+void LayerTreeHost::ApplyMutations(LayerTreeMutations* mutations) {
+ if (mutations) {
+ TRACE_EVENT0("compositor-worker", "LayerTreeHost::ApplyMutations");
+ client_->ApplyMutations(*mutations);
+ }
+}
+
void LayerTreeHost::SetDeviceScaleFactor(float device_scale_factor) {
if (device_scale_factor == device_scale_factor_)
return;
@@ -994,8 +993,7 @@ void LayerTreeHost::DeleteUIResource(UIResourceId uid) {
void LayerTreeHost::RecreateUIResources() {
for (UIResourceClientMap::iterator iter = ui_resource_client_map_.begin();
- iter != ui_resource_client_map_.end();
- ++iter) {
+ iter != ui_resource_client_map_.end(); ++iter) {
UIResourceId uid = iter->first;
const UIResourceClientData& data = iter->second;
bool resource_lost = true;
@@ -1109,6 +1107,11 @@ void LayerTreeHost::RecordFrameTimingEvents(
std::move(main_frame_events));
}
+void LayerTreeHost::SetLayerTreeMutator(LayerTreeMutator* mutator) {
+ TRACE_EVENT0("compositor-worker", "LayerTreeHost::SetLayerTreeMutator");
+ proxy_->SetMutator(mutator);
+}
+
Layer* LayerTreeHost::LayerById(int id) const {
LayerIdMap::const_iterator iter = layer_id_map_.find(id);
return iter != layer_id_map_.end() ? iter->second : NULL;
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698