| 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/trees/thread_proxy.h" | 5 #include "cc/trees/thread_proxy.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1033 DrawResult ThreadProxy::DrawSwapInternal(bool forced_draw) { | 1033 DrawResult ThreadProxy::DrawSwapInternal(bool forced_draw) { |
| 1034 TRACE_EVENT_SYNTHETIC_DELAY("cc.DrawAndSwap"); | 1034 TRACE_EVENT_SYNTHETIC_DELAY("cc.DrawAndSwap"); |
| 1035 DrawResult result; | 1035 DrawResult result; |
| 1036 | 1036 |
| 1037 DCHECK(IsImplThread()); | 1037 DCHECK(IsImplThread()); |
| 1038 DCHECK(impl().layer_tree_host_impl.get()); | 1038 DCHECK(impl().layer_tree_host_impl.get()); |
| 1039 | 1039 |
| 1040 impl().timing_history.DidStartDrawing(); | 1040 impl().timing_history.DidStartDrawing(); |
| 1041 base::AutoReset<bool> mark_inside(&impl().inside_draw, true); | 1041 base::AutoReset<bool> mark_inside(&impl().inside_draw, true); |
| 1042 | 1042 |
| 1043 if (impl().did_commit_after_animating) { | 1043 // if (impl().did_commit_after_animating) { |
| 1044 impl().layer_tree_host_impl->Animate(impl().animation_time); | 1044 // impl().layer_tree_host_impl->Animate(impl().animation_time); |
| 1045 impl().did_commit_after_animating = false; | 1045 // impl().did_commit_after_animating = false; |
| 1046 } | 1046 // } |
| 1047 | 1047 |
| 1048 if (impl().layer_tree_host_impl->pending_tree()) | 1048 if (impl().layer_tree_host_impl->pending_tree()) |
| 1049 impl().layer_tree_host_impl->pending_tree()->UpdateDrawProperties(); | 1049 impl().layer_tree_host_impl->pending_tree()->UpdateDrawProperties(); |
| 1050 | 1050 |
| 1051 // This method is called on a forced draw, regardless of whether we are able | 1051 // This method is called on a forced draw, regardless of whether we are able |
| 1052 // to produce a frame, as the calling site on main thread is blocked until its | 1052 // to produce a frame, as the calling site on main thread is blocked until its |
| 1053 // request completes, and we signal completion here. If CanDraw() is false, we | 1053 // request completes, and we signal completion here. If CanDraw() is false, we |
| 1054 // will indicate success=false to the caller, but we must still signal | 1054 // will indicate success=false to the caller, but we must still signal |
| 1055 // completion to avoid deadlock. | 1055 // completion to avoid deadlock. |
| 1056 | 1056 |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1403 | 1403 |
| 1404 impl().timing_history.DidActivateSyncTree(); | 1404 impl().timing_history.DidActivateSyncTree(); |
| 1405 } | 1405 } |
| 1406 | 1406 |
| 1407 void ThreadProxy::DidManageTiles() { | 1407 void ThreadProxy::DidManageTiles() { |
| 1408 DCHECK(IsImplThread()); | 1408 DCHECK(IsImplThread()); |
| 1409 impl().scheduler->DidManageTiles(); | 1409 impl().scheduler->DidManageTiles(); |
| 1410 } | 1410 } |
| 1411 | 1411 |
| 1412 } // namespace cc | 1412 } // namespace cc |
| OLD | NEW |