| 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 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 738 void RenderWidgetCompositor::registerSelection( | 738 void RenderWidgetCompositor::registerSelection( |
| 739 const blink::WebSelection& selection) { | 739 const blink::WebSelection& selection) { |
| 740 layer_tree_host_->RegisterSelection(ConvertWebSelection(selection)); | 740 layer_tree_host_->RegisterSelection(ConvertWebSelection(selection)); |
| 741 } | 741 } |
| 742 | 742 |
| 743 void RenderWidgetCompositor::clearSelection() { | 743 void RenderWidgetCompositor::clearSelection() { |
| 744 cc::LayerSelection empty_selection; | 744 cc::LayerSelection empty_selection; |
| 745 layer_tree_host_->RegisterSelection(empty_selection); | 745 layer_tree_host_->RegisterSelection(empty_selection); |
| 746 } | 746 } |
| 747 | 747 |
| 748 void RenderWidgetCompositor::setHaveWheelEventHandlers(bool value) { |
| 749 layer_tree_host_->SetHaveWheelEventHandlers(value); |
| 750 } |
| 751 |
| 752 bool RenderWidgetCompositor::haveWheelEventHandlers() const { |
| 753 return layer_tree_host_->have_wheel_event_handlers(); |
| 754 } |
| 755 |
| 748 void CompositeAndReadbackAsyncCallback( | 756 void CompositeAndReadbackAsyncCallback( |
| 749 blink::WebCompositeAndReadbackAsyncCallback* callback, | 757 blink::WebCompositeAndReadbackAsyncCallback* callback, |
| 750 scoped_ptr<cc::CopyOutputResult> result) { | 758 scoped_ptr<cc::CopyOutputResult> result) { |
| 751 if (result->HasBitmap()) { | 759 if (result->HasBitmap()) { |
| 752 scoped_ptr<SkBitmap> result_bitmap = result->TakeBitmap(); | 760 scoped_ptr<SkBitmap> result_bitmap = result->TakeBitmap(); |
| 753 callback->didCompositeAndReadback(*result_bitmap); | 761 callback->didCompositeAndReadback(*result_bitmap); |
| 754 } else { | 762 } else { |
| 755 callback->didCompositeAndReadback(SkBitmap()); | 763 callback->didCompositeAndReadback(SkBitmap()); |
| 756 } | 764 } |
| 757 } | 765 } |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1100 #endif | 1108 #endif |
| 1101 return actual; | 1109 return actual; |
| 1102 } | 1110 } |
| 1103 | 1111 |
| 1104 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor( | 1112 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor( |
| 1105 float device_scale) { | 1113 float device_scale) { |
| 1106 layer_tree_host_->SetPaintedDeviceScaleFactor(device_scale); | 1114 layer_tree_host_->SetPaintedDeviceScaleFactor(device_scale); |
| 1107 } | 1115 } |
| 1108 | 1116 |
| 1109 } // namespace content | 1117 } // namespace content |
| OLD | NEW |