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

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

Issue 2485473003: Remove SurfaceFactory::Create and SurfaceFactory::Destroy (Closed)
Patch Set: rebase Created 4 years, 1 month 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_resource_holder.h" 5 #include "cc/surfaces/surface_resource_holder.h"
6 6
7 #include "cc/surfaces/surface_factory_client.h" 7 #include "cc/surfaces/surface_factory_client.h"
8 8
9 namespace cc { 9 namespace cc {
10 10
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 ref.sync_token = it->sync_token; 64 ref.sync_token = it->sync_token;
65 if (ref.refs_holding_resource_alive == 0) { 65 if (ref.refs_holding_resource_alive == 0) {
66 ReturnedResource returned = *it; 66 ReturnedResource returned = *it;
67 returned.sync_token = ref.sync_token; 67 returned.sync_token = ref.sync_token;
68 returned.count = ref.refs_received_from_child; 68 returned.count = ref.refs_received_from_child;
69 resources_available_to_return.push_back(returned); 69 resources_available_to_return.push_back(returned);
70 resource_id_info_map_.erase(count_it); 70 resource_id_info_map_.erase(count_it);
71 } 71 }
72 } 72 }
73 73
74 client_->ReturnResources(resources_available_to_return); 74 if (client_)
Fady Samuel 2016/11/10 23:33:36 Why add if (client_)?
Saman Sami 2016/11/11 17:49:58 Removed
75 client_->ReturnResources(resources_available_to_return);
75 } 76 }
76 77
77 } // namespace cc 78 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698