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

Side by Side Diff: cc/surfaces/surface_observer.h

Issue 2938833002: Add SurfaceWillDraw notification (Closed)
Patch Set: add unit test to verify that OnSurfaceWillDraw is called only for surfaces added to the CompositorF… Created 3 years, 6 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.cc ('k') | cc/test/fake_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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef CC_SURFACES_SURFACE_OBSERVER_H_ 5 #ifndef CC_SURFACES_SURFACE_OBSERVER_H_
6 #define CC_SURFACES_SURFACE_OBSERVER_H_ 6 #define CC_SURFACES_SURFACE_OBSERVER_H_
7 7
8 namespace cc { 8 namespace cc {
9 9
10 struct BeginFrameAck; 10 struct BeginFrameAck;
(...skipping 19 matching lines...) Expand all
30 virtual bool OnSurfaceDamaged(const SurfaceId& surface_id, 30 virtual bool OnSurfaceDamaged(const SurfaceId& surface_id,
31 const BeginFrameAck& ack) = 0; 31 const BeginFrameAck& ack) = 0;
32 32
33 // Called when a surface is garbage-collected. 33 // Called when a surface is garbage-collected.
34 virtual void OnSurfaceDiscarded(const SurfaceId& surface_id) = 0; 34 virtual void OnSurfaceDiscarded(const SurfaceId& surface_id) = 0;
35 35
36 // Runs when a Surface's CompositorFrame producer has received a BeginFrame 36 // Runs when a Surface's CompositorFrame producer has received a BeginFrame
37 // and, thus, is expected to produce damage soon. 37 // and, thus, is expected to produce damage soon.
38 virtual void OnSurfaceDamageExpected(const SurfaceId& surface_id, 38 virtual void OnSurfaceDamageExpected(const SurfaceId& surface_id,
39 const BeginFrameArgs& args) = 0; 39 const BeginFrameArgs& args) = 0;
40
41 // Runs when a surface has been added to the aggregated CompositorFrame.
42 virtual void OnSurfaceWillDraw(const SurfaceId& surface_id) = 0;
40 }; 43 };
41 44
42 } // namespace cc 45 } // namespace cc
43 46
44 #endif // CC_SURFACES_SURFACE_OBSERVER_H_ 47 #endif // CC_SURFACES_SURFACE_OBSERVER_H_
OLDNEW
« no previous file with comments | « cc/surfaces/surface_manager.cc ('k') | cc/test/fake_surface_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698