 Chromium Code Reviews
 Chromium Code Reviews Issue 11565022:
  Add API to route end of fling messages from WebLayerTreeView to InputHandler  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src
    
  
    Issue 11565022:
  Add API to route end of fling messages from WebLayerTreeView to InputHandler  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src| 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/thread_proxy.h" | 5 #include "cc/thread_proxy.h" | 
| 6 | 6 | 
| 7 #include "base/bind.h" | 7 #include "base/bind.h" | 
| 8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" | 
| 9 #include "cc/delay_based_time_source.h" | 9 #include "cc/delay_based_time_source.h" | 
| 10 #include "cc/draw_quad.h" | 10 #include "cc/draw_quad.h" | 
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 424 return m_commitRequested; | 424 return m_commitRequested; | 
| 425 } | 425 } | 
| 426 | 426 | 
| 427 void ThreadProxy::setNeedsRedrawOnImplThread() | 427 void ThreadProxy::setNeedsRedrawOnImplThread() | 
| 428 { | 428 { | 
| 429 DCHECK(isImplThread()); | 429 DCHECK(isImplThread()); | 
| 430 TRACE_EVENT0("cc", "ThreadProxy::setNeedsRedrawOnImplThread"); | 430 TRACE_EVENT0("cc", "ThreadProxy::setNeedsRedrawOnImplThread"); | 
| 431 m_schedulerOnImplThread->setNeedsRedraw(); | 431 m_schedulerOnImplThread->setNeedsRedraw(); | 
| 432 } | 432 } | 
| 433 | 433 | 
| 434 void ThreadProxy::mainThreadHasStoppedFlinging() | |
| 435 { | |
| 436 if (m_inputHandlerOnImplThread.get()) | |
| 
jamesr
2012/12/13 21:39:05
nits:
- just "if (m_inputHandlerOnImplThread)" wi
 | |
| 437 m_inputHandlerOnImplThread->mainThreadHasStoppedFlinging(); | |
| 438 } | |
| 439 | |
| 434 void ThreadProxy::start() | 440 void ThreadProxy::start() | 
| 435 { | 441 { | 
| 436 DCHECK(isMainThread()); | 442 DCHECK(isMainThread()); | 
| 437 DCHECK(Proxy::implThread()); | 443 DCHECK(Proxy::implThread()); | 
| 438 // Create LayerTreeHostImpl. | 444 // Create LayerTreeHostImpl. | 
| 439 DebugScopedSetMainThreadBlocked mainThreadBlocked(this); | 445 DebugScopedSetMainThreadBlocked mainThreadBlocked(this); | 
| 440 CompletionEvent completion; | 446 CompletionEvent completion; | 
| 441 scoped_ptr<InputHandler> handler = m_layerTreeHost->createInputHandler(); | 447 scoped_ptr<InputHandler> handler = m_layerTreeHost->createInputHandler(); | 
| 442 Proxy::implThread()->postTask(base::Bind(&ThreadProxy::initializeImplOnImplT hread, base::Unretained(this), &completion, handler.release())); | 448 Proxy::implThread()->postTask(base::Bind(&ThreadProxy::initializeImplOnImplT hread, base::Unretained(this), &completion, handler.release())); | 
| 443 completion.wait(); | 449 completion.wait(); | 
| (...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 971 ThreadProxy::BeginFrameAndCommitState::BeginFrameAndCommitState() | 977 ThreadProxy::BeginFrameAndCommitState::BeginFrameAndCommitState() | 
| 972 : memoryAllocationLimitBytes(0) | 978 : memoryAllocationLimitBytes(0) | 
| 973 { | 979 { | 
| 974 } | 980 } | 
| 975 | 981 | 
| 976 ThreadProxy::BeginFrameAndCommitState::~BeginFrameAndCommitState() | 982 ThreadProxy::BeginFrameAndCommitState::~BeginFrameAndCommitState() | 
| 977 { | 983 { | 
| 978 } | 984 } | 
| 979 | 985 | 
| 980 } // namespace cc | 986 } // namespace cc | 
| OLD | NEW |