OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "content/renderer/gpu/render_widget_compositor.h" | 5 #include "content/renderer/gpu/render_widget_compositor.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <limits> | 8 #include <limits> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
746 } | 746 } |
747 | 747 |
748 void RenderWidgetCompositor::setHaveWheelEventHandlers(bool value) { | 748 void RenderWidgetCompositor::setHaveWheelEventHandlers(bool value) { |
749 layer_tree_host_->SetHaveWheelEventHandlers(value); | 749 layer_tree_host_->SetHaveWheelEventHandlers(value); |
750 } | 750 } |
751 | 751 |
752 bool RenderWidgetCompositor::haveWheelEventHandlers() const { | 752 bool RenderWidgetCompositor::haveWheelEventHandlers() const { |
753 return layer_tree_host_->have_wheel_event_handlers(); | 753 return layer_tree_host_->have_wheel_event_handlers(); |
754 } | 754 } |
755 | 755 |
| 756 void RenderWidgetCompositor::setHaveScrollEventHandlers(bool has_handlers) { |
| 757 layer_tree_host_->SetHaveScrollEventHandlers(has_handlers); |
| 758 } |
| 759 |
| 760 bool RenderWidgetCompositor::haveScrollEventHandlers() const { |
| 761 return layer_tree_host_->have_scroll_event_handlers(); |
| 762 } |
| 763 |
756 void CompositeAndReadbackAsyncCallback( | 764 void CompositeAndReadbackAsyncCallback( |
757 blink::WebCompositeAndReadbackAsyncCallback* callback, | 765 blink::WebCompositeAndReadbackAsyncCallback* callback, |
758 scoped_ptr<cc::CopyOutputResult> result) { | 766 scoped_ptr<cc::CopyOutputResult> result) { |
759 if (result->HasBitmap()) { | 767 if (result->HasBitmap()) { |
760 scoped_ptr<SkBitmap> result_bitmap = result->TakeBitmap(); | 768 scoped_ptr<SkBitmap> result_bitmap = result->TakeBitmap(); |
761 callback->didCompositeAndReadback(*result_bitmap); | 769 callback->didCompositeAndReadback(*result_bitmap); |
762 } else { | 770 } else { |
763 callback->didCompositeAndReadback(SkBitmap()); | 771 callback->didCompositeAndReadback(SkBitmap()); |
764 } | 772 } |
765 } | 773 } |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1108 #endif | 1116 #endif |
1109 return actual; | 1117 return actual; |
1110 } | 1118 } |
1111 | 1119 |
1112 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor( | 1120 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor( |
1113 float device_scale) { | 1121 float device_scale) { |
1114 layer_tree_host_->SetPaintedDeviceScaleFactor(device_scale); | 1122 layer_tree_host_->SetPaintedDeviceScaleFactor(device_scale); |
1115 } | 1123 } |
1116 | 1124 |
1117 } // namespace content | 1125 } // namespace content |
OLD | NEW |