| OLD | NEW |
| 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 #include "cc/scheduler/rate_limiter.h" | 5 #include "cc/scheduler/rate_limiter.h" |
| 6 | 6 |
| 7 #include "base/bind.h" |
| 7 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
| 8 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "base/logging.h" |
| 9 #include "base/single_thread_task_runner.h" | 11 #include "base/single_thread_task_runner.h" |
| 10 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" | 12 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" |
| 11 | 13 |
| 12 namespace cc { | 14 namespace cc { |
| 13 | 15 |
| 14 scoped_refptr<RateLimiter> RateLimiter::Create( | 16 scoped_refptr<RateLimiter> RateLimiter::Create( |
| 15 WebKit::WebGraphicsContext3D* context, | 17 WebKit::WebGraphicsContext3D* context, |
| 16 RateLimiterClient* client, | 18 RateLimiterClient* client, |
| 17 base::SingleThreadTaskRunner* task_runner) { | 19 base::SingleThreadTaskRunner* task_runner) { |
| 18 return make_scoped_refptr(new RateLimiter(context, client, task_runner)); | 20 return make_scoped_refptr(new RateLimiter(context, client, task_runner)); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 return; | 52 return; |
| 51 | 53 |
| 52 TRACE_EVENT0("cc", "RateLimiter::RateLimitContext"); | 54 TRACE_EVENT0("cc", "RateLimiter::RateLimitContext"); |
| 53 | 55 |
| 54 active_ = false; | 56 active_ = false; |
| 55 client_->RateLimit(); | 57 client_->RateLimit(); |
| 56 context_->rateLimitOffscreenContextCHROMIUM(); | 58 context_->rateLimitOffscreenContextCHROMIUM(); |
| 57 } | 59 } |
| 58 | 60 |
| 59 } // namespace cc | 61 } // namespace cc |
| OLD | NEW |