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

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

Issue 2391943002: Rewrap comments to 80 columns in platform/graphics/{compositing,cpu,gpu,skia}/. (Closed)
Patch Set: One space Created 4 years, 2 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 #include "platform/graphics/gpu/SharedContextRateLimiter.h" 5 #include "platform/graphics/gpu/SharedContextRateLimiter.h"
6 6
7 #include "gpu/GLES2/gl2extchromium.h" 7 #include "gpu/GLES2/gl2extchromium.h"
8 #include "platform/graphics/gpu/Extensions3DUtil.h" 8 #include "platform/graphics/gpu/Extensions3DUtil.h"
9 #include "public/platform/Platform.h" 9 #include "public/platform/Platform.h"
10 #include "public/platform/WebGraphicsContext3DProvider.h" 10 #include "public/platform/WebGraphicsContext3DProvider.h"
(...skipping 12 matching lines...) Expand all
23 : m_maxPendingTicks(maxPendingTicks), m_canUseSyncQueries(false) { 23 : m_maxPendingTicks(maxPendingTicks), m_canUseSyncQueries(false) {
24 m_contextProvider = wrapUnique( 24 m_contextProvider = wrapUnique(
25 Platform::current()->createSharedOffscreenGraphicsContext3DProvider()); 25 Platform::current()->createSharedOffscreenGraphicsContext3DProvider());
26 if (!m_contextProvider) 26 if (!m_contextProvider)
27 return; 27 return;
28 28
29 gpu::gles2::GLES2Interface* gl = m_contextProvider->contextGL(); 29 gpu::gles2::GLES2Interface* gl = m_contextProvider->contextGL();
30 if (gl && gl->GetGraphicsResetStatusKHR() == GL_NO_ERROR) { 30 if (gl && gl->GetGraphicsResetStatusKHR() == GL_NO_ERROR) {
31 std::unique_ptr<Extensions3DUtil> extensionsUtil = 31 std::unique_ptr<Extensions3DUtil> extensionsUtil =
32 Extensions3DUtil::create(gl); 32 Extensions3DUtil::create(gl);
33 // TODO(junov): when the GLES 3.0 command buffer is ready, we could use fenc eSync instead 33 // TODO(junov): when the GLES 3.0 command buffer is ready, we could use
34 // fenceSync instead.
34 m_canUseSyncQueries = 35 m_canUseSyncQueries =
35 extensionsUtil->supportsExtension("GL_CHROMIUM_sync_query"); 36 extensionsUtil->supportsExtension("GL_CHROMIUM_sync_query");
36 } 37 }
37 } 38 }
38 39
39 void SharedContextRateLimiter::tick() { 40 void SharedContextRateLimiter::tick() {
40 if (!m_contextProvider) 41 if (!m_contextProvider)
41 return; 42 return;
42 43
43 gpu::gles2::GLES2Interface* gl = m_contextProvider->contextGL(); 44 gpu::gles2::GLES2Interface* gl = m_contextProvider->contextGL();
(...skipping 29 matching lines...) Expand all
73 while (m_queries.size() > 0) { 74 while (m_queries.size() > 0) {
74 gl->DeleteQueriesEXT(1, &m_queries.first()); 75 gl->DeleteQueriesEXT(1, &m_queries.first());
75 m_queries.removeFirst(); 76 m_queries.removeFirst();
76 } 77 }
77 } else { 78 } else {
78 m_queries.clear(); 79 m_queries.clear();
79 } 80 }
80 } 81 }
81 82
82 } // namespace blink 83 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698