| 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 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1063 bool draw_frame = false; | 1063 bool draw_frame = false; |
| 1064 | 1064 |
| 1065 if (impl().layer_tree_host_impl->CanDraw()) { | 1065 if (impl().layer_tree_host_impl->CanDraw()) { |
| 1066 result = impl().layer_tree_host_impl->PrepareToDraw(&frame); | 1066 result = impl().layer_tree_host_impl->PrepareToDraw(&frame); |
| 1067 draw_frame = forced_draw || result == DRAW_SUCCESS; | 1067 draw_frame = forced_draw || result == DRAW_SUCCESS; |
| 1068 } else { | 1068 } else { |
| 1069 result = DRAW_ABORTED_CANT_DRAW; | 1069 result = DRAW_ABORTED_CANT_DRAW; |
| 1070 } | 1070 } |
| 1071 | 1071 |
| 1072 if (draw_frame) { | 1072 if (draw_frame) { |
| 1073 impl().layer_tree_host_impl->DrawLayers( | 1073 impl().layer_tree_host_impl->DrawLayers(&frame); |
| 1074 &frame, impl().scheduler->LastBeginImplFrameTime()); | |
| 1075 result = DRAW_SUCCESS; | 1074 result = DRAW_SUCCESS; |
| 1076 impl().animations_frozen_until_next_draw = false; | 1075 impl().animations_frozen_until_next_draw = false; |
| 1077 } else if (result == DRAW_ABORTED_CHECKERBOARD_ANIMATIONS && | 1076 } else if (result == DRAW_ABORTED_CHECKERBOARD_ANIMATIONS && |
| 1078 !impl().layer_tree_host_impl->settings().impl_side_painting) { | 1077 !impl().layer_tree_host_impl->settings().impl_side_painting) { |
| 1079 // Without impl-side painting, the animated layer that is checkerboarding | 1078 // Without impl-side painting, the animated layer that is checkerboarding |
| 1080 // will continue to checkerboard until the next commit. If this layer | 1079 // will continue to checkerboard until the next commit. If this layer |
| 1081 // continues to move during the commit, it may continue to checkerboard | 1080 // continues to move during the commit, it may continue to checkerboard |
| 1082 // after the commit since the region rasterized during the commit will not | 1081 // after the commit since the region rasterized during the commit will not |
| 1083 // match the region that is currently visible; eventually this | 1082 // match the region that is currently visible; eventually this |
| 1084 // checkerboarding will be displayed when we force a draw. To avoid this, | 1083 // checkerboarding will be displayed when we force a draw. To avoid this, |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1435 | 1434 |
| 1436 impl().timing_history.DidActivatePendingTree(); | 1435 impl().timing_history.DidActivatePendingTree(); |
| 1437 } | 1436 } |
| 1438 | 1437 |
| 1439 void ThreadProxy::DidManageTiles() { | 1438 void ThreadProxy::DidManageTiles() { |
| 1440 DCHECK(IsImplThread()); | 1439 DCHECK(IsImplThread()); |
| 1441 impl().scheduler->DidManageTiles(); | 1440 impl().scheduler->DidManageTiles(); |
| 1442 } | 1441 } |
| 1443 | 1442 |
| 1444 } // namespace cc | 1443 } // namespace cc |
| OLD | NEW |