| 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 "cc/single_thread_proxy.h" | 5 #include "cc/single_thread_proxy.h" |
| 6 | 6 |
| 7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
| 8 #include "cc/draw_quad.h" | 8 #include "cc/draw_quad.h" |
| 9 #include "cc/layer_tree_host.h" | 9 #include "cc/layer_tree_host.h" |
| 10 #include "cc/output_surface.h" | 10 #include "cc/output_surface.h" |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 if (m_rendererInitialized) | 326 if (m_rendererInitialized) |
| 327 m_layerTreeHostImpl->renderer()->doNoOp(); | 327 m_layerTreeHostImpl->renderer()->doNoOp(); |
| 328 } | 328 } |
| 329 } | 329 } |
| 330 | 330 |
| 331 void SingleThreadProxy::onSwapBuffersCompleteOnImplThread() | 331 void SingleThreadProxy::onSwapBuffersCompleteOnImplThread() |
| 332 { | 332 { |
| 333 NOTREACHED(); | 333 NOTREACHED(); |
| 334 } | 334 } |
| 335 | 335 |
| 336 void SingleThreadProxy::onReceivedLatencyInfo(const WebKit::WebLatencyInfoImpl&
latencyInfo) |
| 337 { |
| 338 m_layerTreeHost->onReceivedLatencyInfo(latencyInfo); |
| 339 } |
| 340 |
| 336 bool SingleThreadProxy::commitAndComposite() | 341 bool SingleThreadProxy::commitAndComposite() |
| 337 { | 342 { |
| 338 DCHECK(Proxy::isMainThread()); | 343 DCHECK(Proxy::isMainThread()); |
| 339 | 344 |
| 340 if (!m_layerTreeHost->initializeRendererIfNeeded()) | 345 if (!m_layerTreeHost->initializeRendererIfNeeded()) |
| 341 return false; | 346 return false; |
| 342 | 347 |
| 343 m_layerTreeHost->contentsTextureManager()->unlinkAndClearEvictedBackings(); | 348 m_layerTreeHost->contentsTextureManager()->unlinkAndClearEvictedBackings(); |
| 344 | 349 |
| 345 scoped_ptr<ResourceUpdateQueue> queue = make_scoped_ptr(new ResourceUpdateQu
eue); | 350 scoped_ptr<ResourceUpdateQueue> queue = make_scoped_ptr(new ResourceUpdateQu
eue); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 | 397 |
| 393 void SingleThreadProxy::didSwapFrame() | 398 void SingleThreadProxy::didSwapFrame() |
| 394 { | 399 { |
| 395 if (m_nextFrameIsNewlyCommittedFrame) { | 400 if (m_nextFrameIsNewlyCommittedFrame) { |
| 396 m_nextFrameIsNewlyCommittedFrame = false; | 401 m_nextFrameIsNewlyCommittedFrame = false; |
| 397 m_layerTreeHost->didCommitAndDrawFrame(); | 402 m_layerTreeHost->didCommitAndDrawFrame(); |
| 398 } | 403 } |
| 399 } | 404 } |
| 400 | 405 |
| 401 } // namespace cc | 406 } // namespace cc |
| OLD | NEW |