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

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

Issue 2508203004: Add hints for potential overlay promotion on android. (Closed)
Patch Set: rebased 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
« no previous file with comments | « cc/resources/video_resource_updater.cc ('k') | components/display_compositor/DEPS » ('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 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 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 int child_id = 0; 540 int child_id = 0;
541 // TODO(jbauman): hack for unit tests that don't set up rp 541 // TODO(jbauman): hack for unit tests that don't set up rp
542 if (provider_) { 542 if (provider_) {
543 child_id = ChildIdForSurface(surface); 543 child_id = ChildIdForSurface(surface);
544 if (surface->factory()) 544 if (surface->factory())
545 surface->factory()->RefResources(frame.resource_list); 545 surface->factory()->RefResources(frame.resource_list);
546 provider_->ReceiveFromChild(child_id, frame.resource_list); 546 provider_->ReceiveFromChild(child_id, frame.resource_list);
547 } 547 }
548 CHECK(debug_weak_this.get()); 548 CHECK(debug_weak_this.get());
549 549
550 ResourceProvider::ResourceIdSet referenced_resources; 550 ResourceIdSet referenced_resources;
551 size_t reserve_size = frame.resource_list.size(); 551 size_t reserve_size = frame.resource_list.size();
552 referenced_resources.reserve(reserve_size); 552 referenced_resources.reserve(reserve_size);
553 553
554 bool invalid_frame = false; 554 bool invalid_frame = false;
555 ResourceProvider::ResourceIdMap empty_map; 555 ResourceProvider::ResourceIdMap empty_map;
556 const ResourceProvider::ResourceIdMap& child_to_parent_map = 556 const ResourceProvider::ResourceIdMap& child_to_parent_map =
557 provider_ ? provider_->GetChildToParentMap(child_id) : empty_map; 557 provider_ ? provider_->GetChildToParentMap(child_id) : empty_map;
558 558
559 CHECK(debug_weak_this.get()); 559 CHECK(debug_weak_this.get());
560 if (!frame.render_pass_list.empty()) { 560 if (!frame.render_pass_list.empty()) {
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 818
819 void SurfaceAggregator::SetFullDamageForSurface(const SurfaceId& surface_id) { 819 void SurfaceAggregator::SetFullDamageForSurface(const SurfaceId& surface_id) {
820 auto it = previous_contained_surfaces_.find(surface_id); 820 auto it = previous_contained_surfaces_.find(surface_id);
821 if (it == previous_contained_surfaces_.end()) 821 if (it == previous_contained_surfaces_.end())
822 return; 822 return;
823 // Set the last drawn index as 0 to ensure full damage next time it's drawn. 823 // Set the last drawn index as 0 to ensure full damage next time it's drawn.
824 it->second = 0; 824 it->second = 0;
825 } 825 }
826 826
827 } // namespace cc 827 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/video_resource_updater.cc ('k') | components/display_compositor/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698