| 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 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1080 bool draw_frame = false; | 1080 bool draw_frame = false; |
| 1081 | 1081 |
| 1082 if (impl().layer_tree_host_impl->CanDraw()) { | 1082 if (impl().layer_tree_host_impl->CanDraw()) { |
| 1083 result = impl().layer_tree_host_impl->PrepareToDraw(&frame); | 1083 result = impl().layer_tree_host_impl->PrepareToDraw(&frame); |
| 1084 draw_frame = forced_draw || result == DRAW_SUCCESS; | 1084 draw_frame = forced_draw || result == DRAW_SUCCESS; |
| 1085 } else { | 1085 } else { |
| 1086 result = DRAW_ABORTED_CANT_DRAW; | 1086 result = DRAW_ABORTED_CANT_DRAW; |
| 1087 } | 1087 } |
| 1088 | 1088 |
| 1089 if (draw_frame) { | 1089 if (draw_frame) { |
| 1090 impl().layer_tree_host_impl->DrawLayers( | 1090 impl().layer_tree_host_impl->DrawLayers(&frame); |
| 1091 &frame, impl().scheduler->LastBeginImplFrameTime()); | |
| 1092 result = DRAW_SUCCESS; | 1091 result = DRAW_SUCCESS; |
| 1093 } else { | 1092 } else { |
| 1094 DCHECK_NE(DRAW_SUCCESS, result); | 1093 DCHECK_NE(DRAW_SUCCESS, result); |
| 1095 } | 1094 } |
| 1096 impl().layer_tree_host_impl->DidDrawAllLayers(frame); | 1095 impl().layer_tree_host_impl->DidDrawAllLayers(frame); |
| 1097 | 1096 |
| 1098 bool start_ready_animations = draw_frame; | 1097 bool start_ready_animations = draw_frame; |
| 1099 impl().layer_tree_host_impl->UpdateAnimationState(start_ready_animations); | 1098 impl().layer_tree_host_impl->UpdateAnimationState(start_ready_animations); |
| 1100 | 1099 |
| 1101 if (draw_frame) | 1100 if (draw_frame) |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1408 FROM_HERE, base::Bind(&ThreadProxy::DidCompletePageScaleAnimation, | 1407 FROM_HERE, base::Bind(&ThreadProxy::DidCompletePageScaleAnimation, |
| 1409 main_thread_weak_ptr_)); | 1408 main_thread_weak_ptr_)); |
| 1410 } | 1409 } |
| 1411 | 1410 |
| 1412 void ThreadProxy::OnDrawForOutputSurface() { | 1411 void ThreadProxy::OnDrawForOutputSurface() { |
| 1413 DCHECK(IsImplThread()); | 1412 DCHECK(IsImplThread()); |
| 1414 impl().scheduler->OnDrawForOutputSurface(); | 1413 impl().scheduler->OnDrawForOutputSurface(); |
| 1415 } | 1414 } |
| 1416 | 1415 |
| 1417 } // namespace cc | 1416 } // namespace cc |
| OLD | NEW |