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.cc

Issue 1602343002: compositor-worker: cc->blink mutation plumbing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@compositor-worker-ian-patch
Patch Set: Fix blimp issue 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 unified diff | Download patch
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.h" 5 #include "cc/trees/layer_tree_host.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 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 } 561 }
562 562
563 bool LayerTreeHost::CommitRequested() const { 563 bool LayerTreeHost::CommitRequested() const {
564 return proxy_->CommitRequested(); 564 return proxy_->CommitRequested();
565 } 565 }
566 566
567 bool LayerTreeHost::BeginMainFrameRequested() const { 567 bool LayerTreeHost::BeginMainFrameRequested() const {
568 return proxy_->BeginMainFrameRequested(); 568 return proxy_->BeginMainFrameRequested();
569 } 569 }
570 570
571
572 void LayerTreeHost::SetNextCommitWaitsForActivation() { 571 void LayerTreeHost::SetNextCommitWaitsForActivation() {
573 proxy_->SetNextCommitWaitsForActivation(); 572 proxy_->SetNextCommitWaitsForActivation();
574 } 573 }
575 574
576 void LayerTreeHost::SetNextCommitForcesRedraw() { 575 void LayerTreeHost::SetNextCommitForcesRedraw() {
577 next_commit_forces_redraw_ = true; 576 next_commit_forces_redraw_ = true;
578 proxy_->SetNeedsUpdateLayers(); 577 proxy_->SetNeedsUpdateLayers();
579 } 578 }
580 579
581 void LayerTreeHost::SetAnimationEvents(scoped_ptr<AnimationEvents> events) { 580 void LayerTreeHost::SetAnimationEvents(scoped_ptr<AnimationEvents> events) {
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
909 // TODO(ccameron): pass the elastic overscroll here so that input events 908 // TODO(ccameron): pass the elastic overscroll here so that input events
910 // may be translated appropriately. 909 // may be translated appropriately.
911 client_->ApplyViewportDeltas( 910 client_->ApplyViewportDeltas(
912 inner_viewport_scroll_delta, outer_viewport_scroll_delta, 911 inner_viewport_scroll_delta, outer_viewport_scroll_delta,
913 info->elastic_overscroll_delta, info->page_scale_delta, 912 info->elastic_overscroll_delta, info->page_scale_delta,
914 info->top_controls_delta); 913 info->top_controls_delta);
915 SetNeedsUpdateLayers(); 914 SetNeedsUpdateLayers();
916 } 915 }
917 } 916 }
918 917
918 void LayerTreeHost::ApplyMutations(LayerTreeMutations* mutations) {
919 if (mutations) {
920 TRACE_EVENT0("compositor-worker", "LayerTreeHost::ApplyMutations");
921 client_->ApplyMutations(*mutations);
922 }
923 }
924
919 void LayerTreeHost::SetDeviceScaleFactor(float device_scale_factor) { 925 void LayerTreeHost::SetDeviceScaleFactor(float device_scale_factor) {
920 if (device_scale_factor == device_scale_factor_) 926 if (device_scale_factor == device_scale_factor_)
921 return; 927 return;
922 device_scale_factor_ = device_scale_factor; 928 device_scale_factor_ = device_scale_factor;
923 929
924 property_trees_.needs_rebuild = true; 930 property_trees_.needs_rebuild = true;
925 SetNeedsCommit(); 931 SetNeedsCommit();
926 } 932 }
927 933
928 void LayerTreeHost::SetPaintedDeviceScaleFactor( 934 void LayerTreeHost::SetPaintedDeviceScaleFactor(
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
1436 1442
1437 // It is required to create new PropertyTrees before deserializing it. 1443 // It is required to create new PropertyTrees before deserializing it.
1438 property_trees_ = PropertyTrees(); 1444 property_trees_ = PropertyTrees();
1439 property_trees_.FromProtobuf(proto.property_trees()); 1445 property_trees_.FromProtobuf(proto.property_trees());
1440 1446
1441 surface_id_namespace_ = proto.surface_id_namespace(); 1447 surface_id_namespace_ = proto.surface_id_namespace();
1442 next_surface_sequence_ = proto.next_surface_sequence(); 1448 next_surface_sequence_ = proto.next_surface_sequence();
1443 } 1449 }
1444 1450
1445 } // namespace cc 1451 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698