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

Side by Side Diff: cc/rate_limiter.h

Issue 12224027: Revert "GTTF: Add missing virtual destructors." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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 | Annotate | Revision Log
« no previous file with comments | « cc/picture_layer_tiling.h ('k') | cc/video_frame_provider.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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_RATE_LIMITER_H_ 5 #ifndef CC_RATE_LIMITER_H_
6 #define CC_RATE_LIMITER_H_ 6 #define CC_RATE_LIMITER_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 9
10 namespace WebKit { 10 namespace WebKit {
11 class WebGraphicsContext3D; 11 class WebGraphicsContext3D;
12 } 12 }
13 13
14 namespace cc { 14 namespace cc {
15 15
16 class Thread; 16 class Thread;
17 17
18 class RateLimiterClient { 18 class RateLimiterClient {
19 public: 19 public:
20 virtual void rateLimit() = 0; 20 virtual void rateLimit() = 0;
21
22 protected:
23 virtual ~RateLimiterClient() { }
24 }; 21 };
25 22
26 // A RateLimiter can be used to make sure that a single context does not dominat e all execution time. 23 // A RateLimiter can be used to make sure that a single context does not dominat e all execution time.
27 // To use, construct a RateLimiter class around the context and call start() whe never calls are made on the 24 // To use, construct a RateLimiter class around the context and call start() whe never calls are made on the
28 // context outside of normal flow control. RateLimiter will block if the context is too far ahead of the 25 // context outside of normal flow control. RateLimiter will block if the context is too far ahead of the
29 // compositor. 26 // compositor.
30 class RateLimiter : public base::RefCounted<RateLimiter> { 27 class RateLimiter : public base::RefCounted<RateLimiter> {
31 public: 28 public:
32 static scoped_refptr<RateLimiter> create(WebKit::WebGraphicsContext3D*, Rate LimiterClient*, Thread*); 29 static scoped_refptr<RateLimiter> create(WebKit::WebGraphicsContext3D*, Rate LimiterClient*, Thread*);
33 30
(...skipping 12 matching lines...) Expand all
46 void rateLimitContext(); 43 void rateLimitContext();
47 44
48 WebKit::WebGraphicsContext3D* m_context; 45 WebKit::WebGraphicsContext3D* m_context;
49 bool m_active; 46 bool m_active;
50 RateLimiterClient *m_client; 47 RateLimiterClient *m_client;
51 Thread* m_thread; 48 Thread* m_thread;
52 }; 49 };
53 50
54 } 51 }
55 #endif // CC_RATE_LIMITER_H_ 52 #endif // CC_RATE_LIMITER_H_
OLDNEW
« no previous file with comments | « cc/picture_layer_tiling.h ('k') | cc/video_frame_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698