| 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/json/json_reader.h" | 7 #include "base/json/json_reader.h" |
| 8 #include "base/numerics/safe_conversions.h" | 8 #include "base/numerics/safe_conversions.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "base/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
| (...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 return InputHandler::SCROLL_ON_MAIN_THREAD; | 519 return InputHandler::SCROLL_ON_MAIN_THREAD; |
| 520 } | 520 } |
| 521 } | 521 } |
| 522 | 522 |
| 523 if (have_scroll_event_handlers() && | 523 if (have_scroll_event_handlers() && |
| 524 effective_block_mode & SCROLL_BLOCKS_ON_SCROLL_EVENT) { | 524 effective_block_mode & SCROLL_BLOCKS_ON_SCROLL_EVENT) { |
| 525 TRACE_EVENT0("cc", "LayerImpl::tryScroll: Failed ScrollEventHandlers"); | 525 TRACE_EVENT0("cc", "LayerImpl::tryScroll: Failed ScrollEventHandlers"); |
| 526 return InputHandler::SCROLL_ON_MAIN_THREAD; | 526 return InputHandler::SCROLL_ON_MAIN_THREAD; |
| 527 } | 527 } |
| 528 | 528 |
| 529 if (type == InputHandler::WHEEL && have_wheel_event_handlers() && | 529 if ((type == InputHandler::WHEEL || type == InputHandler::ANIMATED_WHEEL) && |
| 530 have_wheel_event_handlers() && |
| 530 effective_block_mode & SCROLL_BLOCKS_ON_WHEEL_EVENT) { | 531 effective_block_mode & SCROLL_BLOCKS_ON_WHEEL_EVENT) { |
| 531 TRACE_EVENT0("cc", "LayerImpl::tryScroll: Failed WheelEventHandlers"); | 532 TRACE_EVENT0("cc", "LayerImpl::tryScroll: Failed WheelEventHandlers"); |
| 532 return InputHandler::SCROLL_ON_MAIN_THREAD; | 533 return InputHandler::SCROLL_ON_MAIN_THREAD; |
| 533 } | 534 } |
| 534 | 535 |
| 535 if (!scrollable()) { | 536 if (!scrollable()) { |
| 536 TRACE_EVENT0("cc", "LayerImpl::tryScroll: Ignored not scrollable"); | 537 TRACE_EVENT0("cc", "LayerImpl::tryScroll: Ignored not scrollable"); |
| 537 return InputHandler::SCROLL_IGNORED; | 538 return InputHandler::SCROLL_IGNORED; |
| 538 } | 539 } |
| 539 | 540 |
| (...skipping 1257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1797 } | 1798 } |
| 1798 | 1799 |
| 1799 // TODO(enne): the transform needs to come from property trees instead of | 1800 // TODO(enne): the transform needs to come from property trees instead of |
| 1800 // draw properties. | 1801 // draw properties. |
| 1801 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents( | 1802 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents( |
| 1802 draw_properties().target_space_transform, default_scale); | 1803 draw_properties().target_space_transform, default_scale); |
| 1803 return std::max(transform_scales.x(), transform_scales.y()); | 1804 return std::max(transform_scales.x(), transform_scales.y()); |
| 1804 } | 1805 } |
| 1805 | 1806 |
| 1806 } // namespace cc | 1807 } // namespace cc |
| OLD | NEW |