| 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/layer_tree_host_impl.h" | 5 #include "cc/trees/layer_tree_host_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 1570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1581 metadata.root_scroll_offset = | 1581 metadata.root_scroll_offset = |
| 1582 gfx::ScrollOffsetToVector2dF(active_tree_->TotalScrollOffset()); | 1582 gfx::ScrollOffsetToVector2dF(active_tree_->TotalScrollOffset()); |
| 1583 | 1583 |
| 1584 return metadata; | 1584 return metadata; |
| 1585 } | 1585 } |
| 1586 | 1586 |
| 1587 bool LayerTreeHostImpl::DrawLayers(FrameData* frame) { | 1587 bool LayerTreeHostImpl::DrawLayers(FrameData* frame) { |
| 1588 DCHECK(CanDraw()); | 1588 DCHECK(CanDraw()); |
| 1589 DCHECK_EQ(frame->has_no_damage, frame->render_passes.empty()); | 1589 DCHECK_EQ(frame->has_no_damage, frame->render_passes.empty()); |
| 1590 | 1590 |
| 1591 TRACE_EVENT0("cc", "LayerTreeHostImpl::DrawLayers"); | 1591 TRACE_EVENT0("cc,benchmark", "LayerTreeHostImpl::DrawLayers"); |
| 1592 | 1592 |
| 1593 ResetRequiresHighResToDraw(); | 1593 ResetRequiresHighResToDraw(); |
| 1594 | 1594 |
| 1595 if (frame->has_no_damage) { | 1595 if (frame->has_no_damage) { |
| 1596 DCHECK(!resourceless_software_draw_); | 1596 DCHECK(!resourceless_software_draw_); |
| 1597 | 1597 |
| 1598 TRACE_EVENT_INSTANT0("cc", "EarlyOut_NoDamage", TRACE_EVENT_SCOPE_THREAD); | 1598 TRACE_EVENT_INSTANT0("cc", "EarlyOut_NoDamage", TRACE_EVENT_SCOPE_THREAD); |
| 1599 active_tree()->BreakSwapPromises(SwapPromise::SWAP_FAILS); | 1599 active_tree()->BreakSwapPromises(SwapPromise::SWAP_FAILS); |
| 1600 return false; | 1600 return false; |
| 1601 } | 1601 } |
| (...skipping 2500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4102 if (is_visible) { | 4102 if (is_visible) { |
| 4103 worker_context_visibility_ = | 4103 worker_context_visibility_ = |
| 4104 worker_context->CacheController()->ClientBecameVisible(); | 4104 worker_context->CacheController()->ClientBecameVisible(); |
| 4105 } else { | 4105 } else { |
| 4106 worker_context->CacheController()->ClientBecameNotVisible( | 4106 worker_context->CacheController()->ClientBecameNotVisible( |
| 4107 std::move(worker_context_visibility_)); | 4107 std::move(worker_context_visibility_)); |
| 4108 } | 4108 } |
| 4109 } | 4109 } |
| 4110 | 4110 |
| 4111 } // namespace cc | 4111 } // namespace cc |
| OLD | NEW |