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

Side by Side Diff: cc/output/output_surface_client.h

Issue 221833009: cc: Move scheduling logic out of OutputSurface (Closed) Base URL: http://git.chromium.org/chromium/src.git@swapAck2Sched11
Patch Set: rebase; add comment about race Created 6 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/output/output_surface.cc ('k') | cc/output/output_surface_unittest.cc » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_OUTPUT_OUTPUT_SURFACE_CLIENT_H_ 5 #ifndef CC_OUTPUT_OUTPUT_SURFACE_CLIENT_H_
6 #define CC_OUTPUT_OUTPUT_SURFACE_CLIENT_H_ 6 #define CC_OUTPUT_OUTPUT_SURFACE_CLIENT_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 11 matching lines...) Expand all
22 class CompositorFrameAck; 22 class CompositorFrameAck;
23 struct ManagedMemoryPolicy; 23 struct ManagedMemoryPolicy;
24 24
25 class CC_EXPORT OutputSurfaceClient { 25 class CC_EXPORT OutputSurfaceClient {
26 public: 26 public:
27 // Called to synchronously re-initialize using the Context3D. Upon returning 27 // Called to synchronously re-initialize using the Context3D. Upon returning
28 // the compositor should be able to draw using GL what was previously 28 // the compositor should be able to draw using GL what was previously
29 // committed. 29 // committed.
30 virtual void DeferredInitialize() = 0; 30 virtual void DeferredInitialize() = 0;
31 virtual void ReleaseGL() = 0; 31 virtual void ReleaseGL() = 0;
32 virtual void CommitVSyncParameters(base::TimeTicks timebase,
33 base::TimeDelta interval) = 0;
32 virtual void SetNeedsRedrawRect(const gfx::Rect& damage_rect) = 0; 34 virtual void SetNeedsRedrawRect(const gfx::Rect& damage_rect) = 0;
33 virtual void BeginFrame(const BeginFrameArgs& args) = 0; 35 virtual void BeginFrame(const BeginFrameArgs& args) = 0;
34 virtual void DidSwapBuffers() = 0; 36 virtual void DidSwapBuffers() = 0;
35 virtual void DidSwapBuffersComplete() = 0; 37 virtual void DidSwapBuffersComplete() = 0;
36 virtual void ReclaimResources(const CompositorFrameAck* ack) = 0; 38 virtual void ReclaimResources(const CompositorFrameAck* ack) = 0;
37 virtual void DidLoseOutputSurface() = 0; 39 virtual void DidLoseOutputSurface() = 0;
38 virtual void SetExternalDrawConstraints(const gfx::Transform& transform, 40 virtual void SetExternalDrawConstraints(const gfx::Transform& transform,
39 const gfx::Rect& viewport, 41 const gfx::Rect& viewport,
40 const gfx::Rect& clip, 42 const gfx::Rect& clip,
41 bool valid_for_tile_management) = 0; 43 bool valid_for_tile_management) = 0;
42 virtual void SetMemoryPolicy(const ManagedMemoryPolicy& policy) = 0; 44 virtual void SetMemoryPolicy(const ManagedMemoryPolicy& policy) = 0;
43 // If set, |callback| will be called subsequent to each new tree activation, 45 // If set, |callback| will be called subsequent to each new tree activation,
44 // regardless of the compositor visibility or damage. |callback| must remain 46 // regardless of the compositor visibility or damage. |callback| must remain
45 // valid for the lifetime of the OutputSurfaceClient or until unregisted -- 47 // valid for the lifetime of the OutputSurfaceClient or until unregisted --
46 // use SetTreeActivationCallback(base::Closure()) to unregister it. 48 // use SetTreeActivationCallback(base::Closure()) to unregister it.
47 virtual void SetTreeActivationCallback(const base::Closure& callback) = 0; 49 virtual void SetTreeActivationCallback(const base::Closure& callback) = 0;
48 50
49 protected: 51 protected:
50 virtual ~OutputSurfaceClient() {} 52 virtual ~OutputSurfaceClient() {}
51 }; 53 };
52 54
53 } // namespace cc 55 } // namespace cc
54 56
55 #endif // CC_OUTPUT_OUTPUT_SURFACE_CLIENT_H_ 57 #endif // CC_OUTPUT_OUTPUT_SURFACE_CLIENT_H_
OLDNEW
« no previous file with comments | « cc/output/output_surface.cc ('k') | cc/output/output_surface_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698