Index: cc/trees/thread_proxy.cc |
diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc |
index 3a6c29b6aea6c86dd10e9388246def8d56fca652..e30edd741dc01e63d9df92b786baa96b3e0f1578 100644 |
--- a/cc/trees/thread_proxy.cc |
+++ b/cc/trees/thread_proxy.cc |
@@ -94,7 +94,6 @@ ThreadProxy::MainThreadOnly::MainThreadOnly(ThreadProxy* proxy, |
commit_request_sent_to_impl_thread(false), |
created_offscreen_context_provider(false), |
started(false), |
- textures_acquired(true), |
in_composite_and_readback(false), |
manage_tiles_pending(false), |
can_cancel_commit(true), |
@@ -124,7 +123,6 @@ ThreadProxy::CompositorThreadOnly::CompositorThreadOnly(ThreadProxy* proxy, |
readback_request(NULL), |
commit_completion_event(NULL), |
completion_event_for_commit_held_on_tree_activation(NULL), |
- texture_acquisition_completion_event(NULL), |
next_frame_is_newly_committed_frame(false), |
inside_draw(false), |
input_throttled_until_commit(false), |
@@ -916,10 +914,6 @@ void ThreadProxy::BeginMainFrame( |
bool updated = layer_tree_host()->UpdateLayers(queue.get()); |
- // Once single buffered layers are committed, they cannot be modified until |
- // they are drawn by the impl thread. |
- main().textures_acquired = false; |
- |
layer_tree_host()->WillCommit(); |
// Before calling animate, we set main().animate_requested to false. If it is |
@@ -1300,47 +1294,6 @@ DrawSwapReadbackResult ThreadProxy::DrawSwapReadbackInternal( |
return result; |
} |
-void ThreadProxy::AcquireLayerTextures() { |
- // Called when the main thread needs to modify a layer texture that is used |
- // directly by the compositor. |
- // This method will block until the next compositor draw if there is a |
- // previously committed frame that is still undrawn. This is necessary to |
- // ensure that the main thread does not monopolize access to the textures. |
- DCHECK(IsMainThread()); |
- |
- if (main().textures_acquired) |
- return; |
- |
- TRACE_EVENT0("cc", "ThreadProxy::AcquireLayerTextures"); |
- DebugScopedSetMainThreadBlocked main_thread_blocked(this); |
- CompletionEvent completion; |
- Proxy::ImplThreadTaskRunner()->PostTask( |
- FROM_HERE, |
- base::Bind(&ThreadProxy::AcquireLayerTexturesForMainThreadOnImplThread, |
- impl_thread_weak_ptr_, |
- &completion)); |
- // Block until it is safe to write to layer textures from the main thread. |
- completion.Wait(); |
- |
- main().textures_acquired = true; |
- main().can_cancel_commit = false; |
-} |
- |
-void ThreadProxy::AcquireLayerTexturesForMainThreadOnImplThread( |
- CompletionEvent* completion) { |
- DCHECK(IsImplThread()); |
- DCHECK(!impl().texture_acquisition_completion_event); |
- |
- impl().texture_acquisition_completion_event = completion; |
- impl().scheduler->SetMainThreadNeedsLayerTextures(); |
-} |
- |
-void ThreadProxy::ScheduledActionAcquireLayerTexturesForMainThread() { |
- DCHECK(impl().texture_acquisition_completion_event); |
- impl().texture_acquisition_completion_event->Signal(); |
- impl().texture_acquisition_completion_event = NULL; |
-} |
- |
void ThreadProxy::ScheduledActionManageTiles() { |
TRACE_EVENT0("cc", "ThreadProxy::ScheduledActionManageTiles"); |
DCHECK(impl().layer_tree_host_impl->settings().impl_side_painting); |