| 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 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1079 bool draw_frame = false; | 1079 bool draw_frame = false; |
| 1080 | 1080 |
| 1081 if (impl().layer_tree_host_impl->CanDraw()) { | 1081 if (impl().layer_tree_host_impl->CanDraw()) { |
| 1082 result = impl().layer_tree_host_impl->PrepareToDraw(&frame); | 1082 result = impl().layer_tree_host_impl->PrepareToDraw(&frame); |
| 1083 draw_frame = forced_draw || result == DRAW_SUCCESS; | 1083 draw_frame = forced_draw || result == DRAW_SUCCESS; |
| 1084 } else { | 1084 } else { |
| 1085 result = DRAW_ABORTED_CANT_DRAW; | 1085 result = DRAW_ABORTED_CANT_DRAW; |
| 1086 } | 1086 } |
| 1087 | 1087 |
| 1088 if (draw_frame) { | 1088 if (draw_frame) { |
| 1089 impl().layer_tree_host_impl->DrawLayers(&frame); | 1089 impl().layer_tree_host_impl->DrawLayers( |
| 1090 &frame, impl().scheduler->LastBeginImplFrameTime()); |
| 1090 result = DRAW_SUCCESS; | 1091 result = DRAW_SUCCESS; |
| 1091 impl().animations_frozen_until_next_draw = false; | 1092 impl().animations_frozen_until_next_draw = false; |
| 1092 } else if (result == DRAW_ABORTED_CHECKERBOARD_ANIMATIONS && | 1093 } else if (result == DRAW_ABORTED_CHECKERBOARD_ANIMATIONS && |
| 1093 !impl().layer_tree_host_impl->settings().impl_side_painting) { | 1094 !impl().layer_tree_host_impl->settings().impl_side_painting) { |
| 1094 // Without impl-side painting, the animated layer that is checkerboarding | 1095 // Without impl-side painting, the animated layer that is checkerboarding |
| 1095 // will continue to checkerboard until the next commit. If this layer | 1096 // will continue to checkerboard until the next commit. If this layer |
| 1096 // continues to move during the commit, it may continue to checkerboard | 1097 // continues to move during the commit, it may continue to checkerboard |
| 1097 // after the commit since the region rasterized during the commit will not | 1098 // after the commit since the region rasterized during the commit will not |
| 1098 // match the region that is currently visible; eventually this | 1099 // match the region that is currently visible; eventually this |
| 1099 // checkerboarding will be displayed when we force a draw. To avoid this, | 1100 // checkerboarding will be displayed when we force a draw. To avoid this, |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1454 | 1455 |
| 1455 impl().timing_history.DidActivateSyncTree(); | 1456 impl().timing_history.DidActivateSyncTree(); |
| 1456 } | 1457 } |
| 1457 | 1458 |
| 1458 void ThreadProxy::DidManageTiles() { | 1459 void ThreadProxy::DidManageTiles() { |
| 1459 DCHECK(IsImplThread()); | 1460 DCHECK(IsImplThread()); |
| 1460 impl().scheduler->DidManageTiles(); | 1461 impl().scheduler->DidManageTiles(); |
| 1461 } | 1462 } |
| 1462 | 1463 |
| 1463 } // namespace cc | 1464 } // namespace cc |
| OLD | NEW |