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 "config.h" | 5 #include "config.h" |
6 | 6 |
7 #include "CCSingleThreadProxy.h" | 7 #include "CCSingleThreadProxy.h" |
8 | 8 |
9 #include "CCDrawQuad.h" | 9 #include "CCDrawQuad.h" |
10 #include "CCGraphicsContext.h" | 10 #include "CCGraphicsContext.h" |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
298 | 298 |
299 void CCSingleThreadProxy::forceSerializeOnSwapBuffers() | 299 void CCSingleThreadProxy::forceSerializeOnSwapBuffers() |
300 { | 300 { |
301 { | 301 { |
302 DebugScopedSetImplThread impl; | 302 DebugScopedSetImplThread impl; |
303 if (m_rendererInitialized) | 303 if (m_rendererInitialized) |
304 m_layerTreeHostImpl->renderer()->doNoOp(); | 304 m_layerTreeHostImpl->renderer()->doNoOp(); |
305 } | 305 } |
306 } | 306 } |
307 | 307 |
308 void CCSingleThreadProxy::setShowFPSCounter(bool show) | |
309 { | |
310 ASSERT(CCProxy::isMainThread()); | |
311 { | |
brianderson
2012/10/18 00:13:21
I don't think this anonymous scope is necessary.
egraether
2012/10/18 15:56:30
I saw that other similar code parts also don't use
| |
312 DebugScopedSetImplThread impl; | |
313 ASSERT(CCProxy::isImplThread()); | |
brianderson
2012/10/18 00:13:21
You should move this ASSERT into CCLayerTreeHostIm
egraether
2012/10/18 15:56:30
You are right.
On 2012/10/18 00:13:21, Brian Ande
| |
314 if (m_rendererInitialized) | |
315 m_layerTreeHostImpl->setShowFPSCounter(show); | |
316 } | |
317 } | |
318 | |
308 void CCSingleThreadProxy::onSwapBuffersCompleteOnImplThread() | 319 void CCSingleThreadProxy::onSwapBuffersCompleteOnImplThread() |
309 { | 320 { |
310 ASSERT_NOT_REACHED(); | 321 ASSERT_NOT_REACHED(); |
311 } | 322 } |
312 | 323 |
313 bool CCSingleThreadProxy::commitAndComposite() | 324 bool CCSingleThreadProxy::commitAndComposite() |
314 { | 325 { |
315 ASSERT(CCProxy::isMainThread()); | 326 ASSERT(CCProxy::isMainThread()); |
316 | 327 |
317 if (!m_layerTreeHost->initializeRendererIfNeeded()) | 328 if (!m_layerTreeHost->initializeRendererIfNeeded()) |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
374 | 385 |
375 void CCSingleThreadProxy::didSwapFrame() | 386 void CCSingleThreadProxy::didSwapFrame() |
376 { | 387 { |
377 if (m_nextFrameIsNewlyCommittedFrame) { | 388 if (m_nextFrameIsNewlyCommittedFrame) { |
378 m_nextFrameIsNewlyCommittedFrame = false; | 389 m_nextFrameIsNewlyCommittedFrame = false; |
379 m_layerTreeHost->didCommitAndDrawFrame(); | 390 m_layerTreeHost->didCommitAndDrawFrame(); |
380 } | 391 } |
381 } | 392 } |
382 | 393 |
383 } | 394 } |
OLD | NEW |