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

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

Issue 2824053003: Split SurfaceFactoryClient Into Four Interfaces (Closed)
Patch Set: Address Nits Created 3 years, 8 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
« no previous file with comments | « cc/surfaces/surface_resource_holder.h ('k') | cc/surfaces/surface_resource_holder_client.h » ('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_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_resource_holder_client.h"
8
9 namespace cc { 8 namespace cc {
10 9
11 SurfaceResourceHolder::SurfaceResourceHolder(SurfaceFactoryClient* client) 10 SurfaceResourceHolder::SurfaceResourceHolder(
12 : client_(client) { 11 SurfaceResourceHolderClient* client)
13 } 12 : client_(client) {}
14 13
15 SurfaceResourceHolder::~SurfaceResourceHolder() { 14 SurfaceResourceHolder::~SurfaceResourceHolder() {
16 } 15 }
17 16
18 SurfaceResourceHolder::ResourceRefs::ResourceRefs() 17 SurfaceResourceHolder::ResourceRefs::ResourceRefs()
19 : refs_received_from_child(0), refs_holding_resource_alive(0) { 18 : refs_received_from_child(0), refs_holding_resource_alive(0) {
20 } 19 }
21 20
22 void SurfaceResourceHolder::Reset() { 21 void SurfaceResourceHolder::Reset() {
23 resource_id_info_map_.clear(); 22 resource_id_info_map_.clear();
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 returned.count = ref.refs_received_from_child; 67 returned.count = ref.refs_received_from_child;
69 resources_available_to_return.push_back(returned); 68 resources_available_to_return.push_back(returned);
70 resource_id_info_map_.erase(count_it); 69 resource_id_info_map_.erase(count_it);
71 } 70 }
72 } 71 }
73 72
74 client_->ReturnResources(resources_available_to_return); 73 client_->ReturnResources(resources_available_to_return);
75 } 74 }
76 75
77 } // namespace cc 76 } // namespace cc
OLDNEW
« no previous file with comments | « cc/surfaces/surface_resource_holder.h ('k') | cc/surfaces/surface_resource_holder_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698