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

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

Issue 885443002: Roll Chrome into Mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase to ToT mojo Created 5 years, 10 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_manager.h ('k') | cc/test/data/scaled_render_surface_layer_gl.png » ('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_manager.h" 5 #include "cc/surfaces/surface_manager.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "cc/surfaces/surface.h" 8 #include "cc/surfaces/surface.h"
9 #include "cc/surfaces/surface_id_allocator.h" 9 #include "cc/surfaces/surface_id_allocator.h"
10 10
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 } 71 }
72 72
73 Surface* SurfaceManager::GetSurfaceForId(SurfaceId surface_id) { 73 Surface* SurfaceManager::GetSurfaceForId(SurfaceId surface_id) {
74 DCHECK(thread_checker_.CalledOnValidThread()); 74 DCHECK(thread_checker_.CalledOnValidThread());
75 SurfaceMap::iterator it = surface_map_.find(surface_id); 75 SurfaceMap::iterator it = surface_map_.find(surface_id);
76 if (it == surface_map_.end()) 76 if (it == surface_map_.end())
77 return NULL; 77 return NULL;
78 return it->second; 78 return it->second;
79 } 79 }
80 80
81 void SurfaceManager::SurfaceModified(SurfaceId surface_id) { 81 bool SurfaceManager::SurfaceModified(SurfaceId surface_id) {
82 DCHECK(thread_checker_.CalledOnValidThread()); 82 DCHECK(thread_checker_.CalledOnValidThread());
83 FOR_EACH_OBSERVER( 83 bool changed = false;
84 SurfaceDamageObserver, observer_list_, OnSurfaceDamaged(surface_id)); 84 FOR_EACH_OBSERVER(SurfaceDamageObserver, observer_list_,
85 OnSurfaceDamaged(surface_id, &changed));
86 return changed;
85 } 87 }
86 88
87 } // namespace cc 89 } // namespace cc
OLDNEW
« no previous file with comments | « cc/surfaces/surface_manager.h ('k') | cc/test/data/scaled_render_surface_layer_gl.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698