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

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

Issue 2403573002: cc: Introduce mechanism to observe CompositorFrames submitted to new surfaceIDs (Closed)
Patch Set: Updated changes missed Created 4 years, 2 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/surfaces/surface_observer.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_manager.h" 5 #include "cc/surfaces/surface_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 DCHECK(thread_checker_.CalledOnValidThread()); 338 DCHECK(thread_checker_.CalledOnValidThread());
339 SurfaceMap::iterator it = surface_map_.find(surface_id); 339 SurfaceMap::iterator it = surface_map_.find(surface_id);
340 if (it == surface_map_.end()) 340 if (it == surface_map_.end())
341 return NULL; 341 return NULL;
342 return it->second; 342 return it->second;
343 } 343 }
344 344
345 bool SurfaceManager::SurfaceModified(const SurfaceId& surface_id) { 345 bool SurfaceManager::SurfaceModified(const SurfaceId& surface_id) {
346 CHECK(thread_checker_.CalledOnValidThread()); 346 CHECK(thread_checker_.CalledOnValidThread());
347 bool changed = false; 347 bool changed = false;
348 FOR_EACH_OBSERVER(SurfaceDamageObserver, observer_list_, 348 FOR_EACH_OBSERVER(SurfaceObserver, observer_list_,
349 OnSurfaceDamaged(surface_id, &changed)); 349 OnSurfaceDamaged(surface_id, &changed));
350 return changed; 350 return changed;
351 } 351 }
352 352
353 void SurfaceManager::SurfaceCreated(const SurfaceId& surface_id,
354 const gfx::Size& frame_size,
355 float device_scale_factor) {
356 CHECK(thread_checker_.CalledOnValidThread());
357 FOR_EACH_OBSERVER(
358 SurfaceObserver, observer_list_,
359 OnSurfaceCreated(surface_id, frame_size, device_scale_factor));
360 }
361
353 } // namespace cc 362 } // namespace cc
OLDNEW
« no previous file with comments | « cc/surfaces/surface_manager.h ('k') | cc/surfaces/surface_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698