| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "platform/graphics/gpu/SharedContextRateLimiter.h" | 5 #include "platform/graphics/gpu/SharedContextRateLimiter.h" |
| 6 | 6 |
| 7 #include <memory> |
| 7 #include "gpu/GLES2/gl2extchromium.h" | 8 #include "gpu/GLES2/gl2extchromium.h" |
| 8 #include "platform/graphics/gpu/Extensions3DUtil.h" | 9 #include "platform/graphics/gpu/Extensions3DUtil.h" |
| 9 #include "public/platform/Platform.h" | 10 #include "public/platform/Platform.h" |
| 10 #include "public/platform/WebGraphicsContext3DProvider.h" | 11 #include "public/platform/WebGraphicsContext3DProvider.h" |
| 11 #include "third_party/khronos/GLES2/gl2.h" | 12 #include "third_party/khronos/GLES2/gl2.h" |
| 12 #include "wtf/PtrUtil.h" | 13 #include "wtf/PtrUtil.h" |
| 13 #include <memory> | |
| 14 | 14 |
| 15 namespace blink { | 15 namespace blink { |
| 16 | 16 |
| 17 std::unique_ptr<SharedContextRateLimiter> SharedContextRateLimiter::create( | 17 std::unique_ptr<SharedContextRateLimiter> SharedContextRateLimiter::create( |
| 18 unsigned maxPendingTicks) { | 18 unsigned maxPendingTicks) { |
| 19 return WTF::wrapUnique(new SharedContextRateLimiter(maxPendingTicks)); | 19 return WTF::wrapUnique(new SharedContextRateLimiter(maxPendingTicks)); |
| 20 } | 20 } |
| 21 | 21 |
| 22 SharedContextRateLimiter::SharedContextRateLimiter(unsigned maxPendingTicks) | 22 SharedContextRateLimiter::SharedContextRateLimiter(unsigned maxPendingTicks) |
| 23 : m_maxPendingTicks(maxPendingTicks), m_canUseSyncQueries(false) { | 23 : m_maxPendingTicks(maxPendingTicks), m_canUseSyncQueries(false) { |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 while (m_queries.size() > 0) { | 74 while (m_queries.size() > 0) { |
| 75 gl->DeleteQueriesEXT(1, &m_queries.first()); | 75 gl->DeleteQueriesEXT(1, &m_queries.first()); |
| 76 m_queries.removeFirst(); | 76 m_queries.removeFirst(); |
| 77 } | 77 } |
| 78 } else { | 78 } else { |
| 79 m_queries.clear(); | 79 m_queries.clear(); |
| 80 } | 80 } |
| 81 } | 81 } |
| 82 | 82 |
| 83 } // namespace blink | 83 } // namespace blink |
| OLD | NEW |