| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/layers/layer_impl.h" | 5 #include "cc/layers/layer_impl.h" |
| 6 | 6 |
| 7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
| 8 #include "base/debug/trace_event_argument.h" | 8 #include "base/debug/trace_event_argument.h" |
| 9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 544 | 544 |
| 545 // Save the difference but clear the sent delta so that we don't subtract | 545 // Save the difference but clear the sent delta so that we don't subtract |
| 546 // it again in SetScrollOffsetAndDelta's pending twin mirroring logic. | 546 // it again in SetScrollOffsetAndDelta's pending twin mirroring logic. |
| 547 gfx::Vector2dF remaining_delta = | 547 gfx::Vector2dF remaining_delta = |
| 548 layer_animation_controller_->scroll_offset_animation_was_interrupted() | 548 layer_animation_controller_->scroll_offset_animation_was_interrupted() |
| 549 ? gfx::Vector2dF() | 549 ? gfx::Vector2dF() |
| 550 : layer->ScrollDelta() - layer->sent_scroll_delta(); | 550 : layer->ScrollDelta() - layer->sent_scroll_delta(); |
| 551 | 551 |
| 552 layer->SetSentScrollDelta(gfx::Vector2dF()); | 552 layer->SetSentScrollDelta(gfx::Vector2dF()); |
| 553 layer->SetScrollOffsetAndDelta(scroll_offset_, remaining_delta); | 553 layer->SetScrollOffsetAndDelta(scroll_offset_, remaining_delta); |
| 554 layer->SetMainScrollOffsetFractionalPart(main_scroll_offset_fractional_part_); | 554 layer->SetScrollCompensationAdjustment(scroll_compensation_adjustment_); |
| 555 | 555 |
| 556 layer->Set3dSortingContextId(sorting_context_id_); | 556 layer->Set3dSortingContextId(sorting_context_id_); |
| 557 layer->SetNumDescendantsThatDrawContent(num_descendants_that_draw_content_); | 557 layer->SetNumDescendantsThatDrawContent(num_descendants_that_draw_content_); |
| 558 | 558 |
| 559 LayerImpl* scroll_parent = nullptr; | 559 LayerImpl* scroll_parent = nullptr; |
| 560 if (scroll_parent_) { | 560 if (scroll_parent_) { |
| 561 scroll_parent = layer->layer_tree_impl()->LayerById(scroll_parent_->id()); | 561 scroll_parent = layer->layer_tree_impl()->LayerById(scroll_parent_->id()); |
| 562 DCHECK(scroll_parent); | 562 DCHECK(scroll_parent); |
| 563 } | 563 } |
| 564 | 564 |
| (...skipping 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1609 SetNeedsPushProperties(); | 1609 SetNeedsPushProperties(); |
| 1610 layer_tree_impl()->set_needs_update_draw_properties(); | 1610 layer_tree_impl()->set_needs_update_draw_properties(); |
| 1611 if (should_have_render_surface) { | 1611 if (should_have_render_surface) { |
| 1612 render_surface_ = make_scoped_ptr(new RenderSurfaceImpl(this)); | 1612 render_surface_ = make_scoped_ptr(new RenderSurfaceImpl(this)); |
| 1613 return; | 1613 return; |
| 1614 } | 1614 } |
| 1615 render_surface_.reset(); | 1615 render_surface_.reset(); |
| 1616 } | 1616 } |
| 1617 | 1617 |
| 1618 } // namespace cc | 1618 } // namespace cc |
| OLD | NEW |