| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/blink/web_compositor_support_impl.h" | 5 #include "cc/blink/web_compositor_support_impl.h" |
| 6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "cc/animation/transform_operations.h" | |
| 9 #include "cc/blink/web_animation_impl.h" | |
| 10 #include "cc/blink/web_compositor_animation_player_impl.h" | |
| 11 #include "cc/blink/web_compositor_animation_timeline_impl.h" | |
| 12 #include "cc/blink/web_content_layer_impl.h" | 8 #include "cc/blink/web_content_layer_impl.h" |
| 13 #include "cc/blink/web_display_item_list_impl.h" | 9 #include "cc/blink/web_display_item_list_impl.h" |
| 14 #include "cc/blink/web_external_texture_layer_impl.h" | 10 #include "cc/blink/web_external_texture_layer_impl.h" |
| 15 #include "cc/blink/web_filter_animation_curve_impl.h" | |
| 16 #include "cc/blink/web_filter_operations_impl.h" | |
| 17 #include "cc/blink/web_float_animation_curve_impl.h" | |
| 18 #include "cc/blink/web_image_layer_impl.h" | 11 #include "cc/blink/web_image_layer_impl.h" |
| 19 #include "cc/blink/web_layer_impl.h" | 12 #include "cc/blink/web_layer_impl.h" |
| 20 #include "cc/blink/web_scroll_offset_animation_curve_impl.h" | |
| 21 #include "cc/blink/web_scrollbar_layer_impl.h" | 13 #include "cc/blink/web_scrollbar_layer_impl.h" |
| 22 #include "cc/blink/web_transform_animation_curve_impl.h" | |
| 23 #include "cc/blink/web_transform_operations_impl.h" | |
| 24 #include "cc/layers/layer.h" | 14 #include "cc/layers/layer.h" |
| 25 #include "cc/output/output_surface.h" | 15 #include "cc/output/output_surface.h" |
| 26 #include "cc/output/software_output_device.h" | 16 #include "cc/output/software_output_device.h" |
| 27 | 17 |
| 28 using blink::WebCompositorAnimation; | |
| 29 using blink::WebCompositorAnimationCurve; | |
| 30 using blink::WebCompositorAnimationPlayer; | |
| 31 using blink::WebCompositorAnimationTimeline; | |
| 32 using blink::WebContentLayer; | 18 using blink::WebContentLayer; |
| 33 using blink::WebContentLayerClient; | 19 using blink::WebContentLayerClient; |
| 34 using blink::WebDisplayItemList; | 20 using blink::WebDisplayItemList; |
| 35 using blink::WebExternalTextureLayer; | 21 using blink::WebExternalTextureLayer; |
| 36 using blink::WebExternalTextureLayerClient; | 22 using blink::WebExternalTextureLayerClient; |
| 37 using blink::WebFilterAnimationCurve; | |
| 38 using blink::WebFilterOperations; | |
| 39 using blink::WebFloatAnimationCurve; | |
| 40 using blink::WebImageLayer; | 23 using blink::WebImageLayer; |
| 41 using blink::WebLayer; | 24 using blink::WebLayer; |
| 42 using blink::WebScrollbar; | 25 using blink::WebScrollbar; |
| 43 using blink::WebScrollbarLayer; | 26 using blink::WebScrollbarLayer; |
| 44 using blink::WebScrollbarThemeGeometry; | 27 using blink::WebScrollbarThemeGeometry; |
| 45 using blink::WebScrollbarThemePainter; | 28 using blink::WebScrollbarThemePainter; |
| 46 using blink::WebScrollOffsetAnimationCurve; | |
| 47 using blink::WebTransformAnimationCurve; | |
| 48 using blink::WebTransformOperations; | |
| 49 | 29 |
| 50 namespace cc_blink { | 30 namespace cc_blink { |
| 51 | 31 |
| 52 WebCompositorSupportImpl::WebCompositorSupportImpl() { | 32 WebCompositorSupportImpl::WebCompositorSupportImpl() { |
| 53 } | 33 } |
| 54 | 34 |
| 55 WebCompositorSupportImpl::~WebCompositorSupportImpl() { | 35 WebCompositorSupportImpl::~WebCompositorSupportImpl() { |
| 56 } | 36 } |
| 57 | 37 |
| 58 WebLayer* WebCompositorSupportImpl::createLayer() { | 38 WebLayer* WebCompositorSupportImpl::createLayer() { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 88 WebScrollbar::Orientation orientation, | 68 WebScrollbar::Orientation orientation, |
| 89 int thumb_thickness, | 69 int thumb_thickness, |
| 90 int track_start, | 70 int track_start, |
| 91 bool is_left_side_vertical_scrollbar) { | 71 bool is_left_side_vertical_scrollbar) { |
| 92 return new WebScrollbarLayerImpl(orientation, | 72 return new WebScrollbarLayerImpl(orientation, |
| 93 thumb_thickness, | 73 thumb_thickness, |
| 94 track_start, | 74 track_start, |
| 95 is_left_side_vertical_scrollbar); | 75 is_left_side_vertical_scrollbar); |
| 96 } | 76 } |
| 97 | 77 |
| 98 WebCompositorAnimation* WebCompositorSupportImpl::createAnimation( | |
| 99 const blink::WebCompositorAnimationCurve& curve, | |
| 100 blink::WebCompositorAnimation::TargetProperty target, | |
| 101 int group_id, | |
| 102 int animation_id) { | |
| 103 return new WebCompositorAnimationImpl(curve, target, animation_id, group_id); | |
| 104 } | |
| 105 | |
| 106 WebFilterAnimationCurve* | |
| 107 WebCompositorSupportImpl::createFilterAnimationCurve() { | |
| 108 return new WebFilterAnimationCurveImpl(); | |
| 109 } | |
| 110 | |
| 111 WebFloatAnimationCurve* WebCompositorSupportImpl::createFloatAnimationCurve() { | |
| 112 return new WebFloatAnimationCurveImpl(); | |
| 113 } | |
| 114 | |
| 115 WebScrollOffsetAnimationCurve* | |
| 116 WebCompositorSupportImpl::createScrollOffsetAnimationCurve( | |
| 117 blink::WebFloatPoint target_value, | |
| 118 WebCompositorAnimationCurve::TimingFunctionType timing_function, | |
| 119 WebScrollOffsetAnimationCurve::ScrollDurationBehavior duration_behavior) { | |
| 120 return new WebScrollOffsetAnimationCurveImpl(target_value, timing_function, | |
| 121 duration_behavior); | |
| 122 } | |
| 123 | |
| 124 WebTransformAnimationCurve* | |
| 125 WebCompositorSupportImpl::createTransformAnimationCurve() { | |
| 126 return new WebTransformAnimationCurveImpl(); | |
| 127 } | |
| 128 | |
| 129 WebTransformOperations* WebCompositorSupportImpl::createTransformOperations() { | |
| 130 return new WebTransformOperationsImpl(); | |
| 131 } | |
| 132 | |
| 133 WebFilterOperations* WebCompositorSupportImpl::createFilterOperations() { | |
| 134 return new WebFilterOperationsImpl(); | |
| 135 } | |
| 136 | |
| 137 WebCompositorAnimationPlayer* | |
| 138 WebCompositorSupportImpl::createAnimationPlayer() { | |
| 139 return new WebCompositorAnimationPlayerImpl(); | |
| 140 } | |
| 141 | |
| 142 WebCompositorAnimationTimeline* | |
| 143 WebCompositorSupportImpl::createAnimationTimeline() { | |
| 144 return new WebCompositorAnimationTimelineImpl(); | |
| 145 } | |
| 146 | |
| 147 } // namespace cc_blink | 78 } // namespace cc_blink |
| OLD | NEW |