[chromium] Use WebGraphicsContext3D in rate limiting logic inside compositor
[WebKit.git] / Source / WebCore / platform / graphics / chromium / RateLimiter.h
index 68e04455e694d9ba76fe0309519807adc4f13d7b..b786b90d4900797eef9aeee04e0aa7e35cc22fdf 100644 (file)
 #include <wtf/RefCounted.h>
 #include <wtf/RefPtr.h>
 
 #include <wtf/RefCounted.h>
 #include <wtf/RefPtr.h>
 
-namespace WebCore {
+namespace WebKit {
+class WebGraphicsContext3D;
+}
 
 
-class GraphicsContext3D;
+namespace WebCore {
 
 class RateLimiterClient {
 public:
 
 class RateLimiterClient {
 public:
@@ -44,16 +46,16 @@ public:
 // A class containing a timer, which calls rateLimitCHROMIUM on expiry
 class RateLimiter : public RefCounted<RateLimiter> {
 public:
 // A class containing a timer, which calls rateLimitCHROMIUM on expiry
 class RateLimiter : public RefCounted<RateLimiter> {
 public:
-    static PassRefPtr<RateLimiter> create(GraphicsContext3D*, RateLimiterClient*);
+    static PassRefPtr<RateLimiter> create(WebKit::WebGraphicsContext3D*, RateLimiterClient*);
     ~RateLimiter();
 
     void start();
     void stop();
 
 private:
     ~RateLimiter();
 
     void start();
     void stop();
 
 private:
-    RateLimiter(GraphicsContext3D*, RateLimiterClient*);
-    RefPtr<GraphicsContext3D> m_context;
-    bool m_contextSupportsRateLimitingExtension;
+    RateLimiter(WebKit::WebGraphicsContext3D*, RateLimiterClient*);
+
+    WebKit::WebGraphicsContext3D* m_context;
     Timer<RateLimiter> m_timer;
     void rateLimitContext(Timer<RateLimiter>*);
     RateLimiterClient *m_client;
     Timer<RateLimiter> m_timer;
     void rateLimitContext(Timer<RateLimiter>*);
     RateLimiterClient *m_client;