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 TRACE_EVENT0("cc", "CCSingleThreadProxy::setShowFPSCounter"); |
| 311 ASSERT(CCProxy::isMainThread()); |
| 312 DebugScopedSetImplThread impl; |
| 313 m_layerTreeHostImpl->setShowFPSCounter(show); |
| 314 } |
| 315 |
308 void CCSingleThreadProxy::onSwapBuffersCompleteOnImplThread() | 316 void CCSingleThreadProxy::onSwapBuffersCompleteOnImplThread() |
309 { | 317 { |
310 ASSERT_NOT_REACHED(); | 318 ASSERT_NOT_REACHED(); |
311 } | 319 } |
312 | 320 |
313 bool CCSingleThreadProxy::commitAndComposite() | 321 bool CCSingleThreadProxy::commitAndComposite() |
314 { | 322 { |
315 ASSERT(CCProxy::isMainThread()); | 323 ASSERT(CCProxy::isMainThread()); |
316 | 324 |
317 if (!m_layerTreeHost->initializeRendererIfNeeded()) | 325 if (!m_layerTreeHost->initializeRendererIfNeeded()) |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 | 382 |
375 void CCSingleThreadProxy::didSwapFrame() | 383 void CCSingleThreadProxy::didSwapFrame() |
376 { | 384 { |
377 if (m_nextFrameIsNewlyCommittedFrame) { | 385 if (m_nextFrameIsNewlyCommittedFrame) { |
378 m_nextFrameIsNewlyCommittedFrame = false; | 386 m_nextFrameIsNewlyCommittedFrame = false; |
379 m_layerTreeHost->didCommitAndDrawFrame(); | 387 m_layerTreeHost->didCommitAndDrawFrame(); |
380 } | 388 } |
381 } | 389 } |
382 | 390 |
383 } | 391 } |
OLD | NEW |