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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/gpu/SharedContextRateLimiter.h

Issue 1832263002: Remove WGC3D typedefs and move WebGraphicsInfo to Platform. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: webgraphicsinfo: rebase Created 4 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
OLDNEW
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 #ifndef SharedContextRateLimiter_h 5 #ifndef SharedContextRateLimiter_h
6 #define SharedContextRateLimiter_h 6 #define SharedContextRateLimiter_h
7 7
8 #include "public/platform/WebGraphicsContext3D.h" 8 #include "gpu/command_buffer/client/gles2_interface.h"
9 #include "wtf/Allocator.h" 9 #include "wtf/Allocator.h"
10 #include "wtf/Deque.h" 10 #include "wtf/Deque.h"
11 #include "wtf/Noncopyable.h" 11 #include "wtf/Noncopyable.h"
12 #include "wtf/OwnPtr.h" 12 #include "wtf/OwnPtr.h"
13 #include "wtf/PassOwnPtr.h"
13 14
14 namespace blink { 15 namespace blink {
15 16
16 class WebGraphicsContext3DProvider; 17 class WebGraphicsContext3DProvider;
17 18
18 // Purpose: to limit the amount of worked queued for execution 19 // Purpose: to limit the amount of worked queued for execution
19 // (backlog) on the GPU by blocking the main thread to allow the GPU 20 // (backlog) on the GPU by blocking the main thread to allow the GPU
20 // to catch up. The Prevents unsynchronized tight animation loops 21 // to catch up. The Prevents unsynchronized tight animation loops
21 // from cause a GPU denial of service. 22 // from cause a GPU denial of service.
22 // 23 //
(...skipping 16 matching lines...) Expand all
39 USING_FAST_MALLOC(SharedContextRateLimiter); 40 USING_FAST_MALLOC(SharedContextRateLimiter);
40 WTF_MAKE_NONCOPYABLE(SharedContextRateLimiter); 41 WTF_MAKE_NONCOPYABLE(SharedContextRateLimiter);
41 public: 42 public:
42 static PassOwnPtr<SharedContextRateLimiter> create(unsigned maxPendingTicks) ; 43 static PassOwnPtr<SharedContextRateLimiter> create(unsigned maxPendingTicks) ;
43 void tick(); 44 void tick();
44 void reset(); 45 void reset();
45 private: 46 private:
46 SharedContextRateLimiter(unsigned maxPendingTicks); 47 SharedContextRateLimiter(unsigned maxPendingTicks);
47 48
48 OwnPtr<WebGraphicsContext3DProvider> m_contextProvider; 49 OwnPtr<WebGraphicsContext3DProvider> m_contextProvider;
49 Deque<WebGLId> m_queries; 50 Deque<GLuint> m_queries;
50 unsigned m_maxPendingTicks; 51 unsigned m_maxPendingTicks;
51 bool m_canUseSyncQueries; 52 bool m_canUseSyncQueries;
52 }; 53 };
53 54
54 } // namespace blink 55 } // namespace blink
55 56
56 #endif 57 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698