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

Side by Side Diff: cc/surfaces/surface_aggregator.cc

Issue 2508203004: Add hints for potential overlay promotion on android. (Closed)
Patch Set: cleanup Created 4 years 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/surfaces/surface_aggregator.h" 5 #include "cc/surfaces/surface_aggregator.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <map> 9 #include <map>
10 10
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 int child_id = 0; 559 int child_id = 0;
560 // TODO(jbauman): hack for unit tests that don't set up rp 560 // TODO(jbauman): hack for unit tests that don't set up rp
561 if (provider_) { 561 if (provider_) {
562 child_id = ChildIdForSurface(surface); 562 child_id = ChildIdForSurface(surface);
563 if (surface->factory()) 563 if (surface->factory())
564 surface->factory()->RefResources(frame.resource_list); 564 surface->factory()->RefResources(frame.resource_list);
565 provider_->ReceiveFromChild(child_id, frame.resource_list); 565 provider_->ReceiveFromChild(child_id, frame.resource_list);
566 } 566 }
567 CHECK(debug_weak_this.get()); 567 CHECK(debug_weak_this.get());
568 568
569 ResourceProvider::ResourceIdSet referenced_resources; 569 ResourceIdSet referenced_resources;
570 size_t reserve_size = frame.resource_list.size(); 570 size_t reserve_size = frame.resource_list.size();
571 referenced_resources.reserve(reserve_size); 571 referenced_resources.reserve(reserve_size);
572 572
573 bool invalid_frame = false; 573 bool invalid_frame = false;
574 ResourceProvider::ResourceIdMap empty_map; 574 ResourceProvider::ResourceIdMap empty_map;
575 const ResourceProvider::ResourceIdMap& child_to_parent_map = 575 const ResourceProvider::ResourceIdMap& child_to_parent_map =
576 provider_ ? provider_->GetChildToParentMap(child_id) : empty_map; 576 provider_ ? provider_->GetChildToParentMap(child_id) : empty_map;
577 577
578 CHECK(debug_weak_this.get()); 578 CHECK(debug_weak_this.get());
579 if (!frame.render_pass_list.empty()) { 579 if (!frame.render_pass_list.empty()) {
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 827
828 void SurfaceAggregator::SetFullDamageForSurface(const SurfaceId& surface_id) { 828 void SurfaceAggregator::SetFullDamageForSurface(const SurfaceId& surface_id) {
829 auto it = previous_contained_surfaces_.find(surface_id); 829 auto it = previous_contained_surfaces_.find(surface_id);
830 if (it == previous_contained_surfaces_.end()) 830 if (it == previous_contained_surfaces_.end())
831 return; 831 return;
832 // Set the last drawn index as 0 to ensure full damage next time it's drawn. 832 // Set the last drawn index as 0 to ensure full damage next time it's drawn.
833 it->second = 0; 833 it->second = 0;
834 } 834 }
835 835
836 } // namespace cc 836 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698