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

Unified Diff: cc/surfaces/surface_aggregator.cc

Issue 1156303013: Don't make unnecessary copy of ChildToParentMap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface_aggregator.cc
diff --git a/cc/surfaces/surface_aggregator.cc b/cc/surfaces/surface_aggregator.cc
index 16f91da48b7ff37a7f23f3a2e932ec67311123de..a6af98eae0102a015b0cd25c825d751f5751199d 100644
--- a/cc/surfaces/surface_aggregator.cc
+++ b/cc/surfaces/surface_aggregator.cc
@@ -228,9 +228,10 @@ void SurfaceAggregator::HandleSurfaceQuad(
SurfaceSet::iterator it = referenced_surfaces_.insert(surface_id).first;
// TODO(vmpstr): provider check is a hack for unittests that don't set up a
// resource provider.
+ ResourceProvider::ResourceIdMap empty_map;
const ResourceProvider::ResourceIdMap& child_to_parent_map =
provider_ ? provider_->GetChildToParentMap(ChildIdForSurface(surface))
- : ResourceProvider::ResourceIdMap();
+ : empty_map;
bool merge_pass =
surface_quad->shared_quad_state->opacity == 1.f && copy_requests.empty();
@@ -439,9 +440,10 @@ void SurfaceAggregator::CopyPasses(const DelegatedFrameData* frame_data,
// TODO(vmpstr): provider check is a hack for unittests that don't set up a
// resource provider.
+ ResourceProvider::ResourceIdMap empty_map;
const ResourceProvider::ResourceIdMap& child_to_parent_map =
provider_ ? provider_->GetChildToParentMap(ChildIdForSurface(surface))
- : ResourceProvider::ResourceIdMap();
+ : empty_map;
for (size_t i = 0; i < source_pass_list.size(); ++i) {
const RenderPass& source = *source_pass_list[i];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698