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

Unified Diff: cc/surfaces/surface_manager.cc

Issue 2150633002: cc: Pass SurfaceId by const ref in more places (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | « cc/surfaces/surface_manager.h ('k') | content/browser/renderer_host/delegated_frame_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface_manager.cc
diff --git a/cc/surfaces/surface_manager.cc b/cc/surfaces/surface_manager.cc
index d2953c4eb716a75acb59041583b592f96165fbba..e34bb63a40970e6632440d6c40eede3b1f5e61b1 100644
--- a/cc/surfaces/surface_manager.cc
+++ b/cc/surfaces/surface_manager.cc
@@ -51,7 +51,7 @@ void SurfaceManager::RegisterSurface(Surface* surface) {
surface_map_[surface->surface_id()] = surface;
}
-void SurfaceManager::DeregisterSurface(SurfaceId surface_id) {
+void SurfaceManager::DeregisterSurface(const SurfaceId& surface_id) {
DCHECK(thread_checker_.CalledOnValidThread());
SurfaceMap::iterator it = surface_map_.find(surface_id);
DCHECK(it != surface_map_.end());
@@ -112,7 +112,7 @@ void SurfaceManager::GarbageCollectSurfaces() {
Surface* surf = surface_map_[live_surfaces[i]];
DCHECK(surf);
- for (SurfaceId id : surf->referenced_surfaces()) {
+ for (const SurfaceId& id : surf->referenced_surfaces()) {
if (live_surfaces_set.count(id))
continue;
@@ -331,7 +331,7 @@ void SurfaceManager::UnregisterSurfaceNamespaceHierarchy(
RecursivelyAttachBeginFrameSource(source_iter.second, source_iter.first);
}
-Surface* SurfaceManager::GetSurfaceForId(SurfaceId surface_id) {
+Surface* SurfaceManager::GetSurfaceForId(const SurfaceId& surface_id) {
DCHECK(thread_checker_.CalledOnValidThread());
SurfaceMap::iterator it = surface_map_.find(surface_id);
if (it == surface_map_.end())
@@ -339,7 +339,7 @@ Surface* SurfaceManager::GetSurfaceForId(SurfaceId surface_id) {
return it->second;
}
-bool SurfaceManager::SurfaceModified(SurfaceId surface_id) {
+bool SurfaceManager::SurfaceModified(const SurfaceId& surface_id) {
CHECK(thread_checker_.CalledOnValidThread());
bool changed = false;
FOR_EACH_OBSERVER(SurfaceDamageObserver, observer_list_,
« no previous file with comments | « cc/surfaces/surface_manager.h ('k') | content/browser/renderer_host/delegated_frame_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698