Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(686)

Side by Side Diff: webkit/renderer/compositor_bindings/web_compositor_support_impl.cc

Issue 317163002: Moving compositor_bindings from webkit to content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changing dependencies due to failing ios bots Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "webkit/renderer/compositor_bindings/web_compositor_support_impl.h"
6
7 #include "base/memory/scoped_ptr.h"
8 #include "base/message_loop/message_loop_proxy.h"
9 #include "cc/animation/transform_operations.h"
10 #include "cc/output/output_surface.h"
11 #include "cc/output/software_output_device.h"
12 #include "webkit/renderer/compositor_bindings/web_animation_impl.h"
13 #include "webkit/renderer/compositor_bindings/web_content_layer_impl.h"
14 #include "webkit/renderer/compositor_bindings/web_external_texture_layer_impl.h"
15 #include "webkit/renderer/compositor_bindings/web_filter_animation_curve_impl.h"
16 #include "webkit/renderer/compositor_bindings/web_filter_operations_impl.h"
17 #include "webkit/renderer/compositor_bindings/web_float_animation_curve_impl.h"
18 #include "webkit/renderer/compositor_bindings/web_image_layer_impl.h"
19 #include "webkit/renderer/compositor_bindings/web_layer_impl.h"
20 #include "webkit/renderer/compositor_bindings/web_nine_patch_layer_impl.h"
21 #include "webkit/renderer/compositor_bindings/web_scroll_offset_animation_curve_ impl.h"
22 #include "webkit/renderer/compositor_bindings/web_scrollbar_layer_impl.h"
23 #include "webkit/renderer/compositor_bindings/web_solid_color_layer_impl.h"
24 #include "webkit/renderer/compositor_bindings/web_transform_animation_curve_impl .h"
25 #include "webkit/renderer/compositor_bindings/web_transform_operations_impl.h"
26
27 using blink::WebAnimation;
28 using blink::WebAnimationCurve;
29 using blink::WebContentLayer;
30 using blink::WebContentLayerClient;
31 using blink::WebExternalTextureLayer;
32 using blink::WebExternalTextureLayerClient;
33 using blink::WebFilterAnimationCurve;
34 using blink::WebFilterOperations;
35 using blink::WebFloatAnimationCurve;
36 using blink::WebImageLayer;
37 using blink::WebNinePatchLayer;
38 using blink::WebLayer;
39 using blink::WebScrollbar;
40 using blink::WebScrollbarLayer;
41 using blink::WebScrollbarThemeGeometry;
42 using blink::WebScrollbarThemePainter;
43 #if WEB_SCROLL_OFFSET_ANIMATION_CURVE_IS_DEFINED
44 using blink::WebScrollOffsetAnimationCurve;
45 #endif
46 using blink::WebSolidColorLayer;
47 using blink::WebTransformAnimationCurve;
48 using blink::WebTransformOperations;
49
50 namespace webkit {
51
52 WebCompositorSupportImpl::WebCompositorSupportImpl() {}
53
54 WebCompositorSupportImpl::~WebCompositorSupportImpl() {}
55
56 WebLayer* WebCompositorSupportImpl::createLayer() {
57 return new WebLayerImpl();
58 }
59
60 WebContentLayer* WebCompositorSupportImpl::createContentLayer(
61 WebContentLayerClient* client) {
62 return new WebContentLayerImpl(client);
63 }
64
65 WebExternalTextureLayer* WebCompositorSupportImpl::createExternalTextureLayer(
66 WebExternalTextureLayerClient* client) {
67 return new WebExternalTextureLayerImpl(client);
68 }
69
70 blink::WebImageLayer* WebCompositorSupportImpl::createImageLayer() {
71 return new WebImageLayerImpl();
72 }
73
74 blink::WebNinePatchLayer* WebCompositorSupportImpl::createNinePatchLayer() {
75 return new WebNinePatchLayerImpl();
76 }
77
78 WebSolidColorLayer* WebCompositorSupportImpl::createSolidColorLayer() {
79 return new WebSolidColorLayerImpl();
80 }
81
82 WebScrollbarLayer* WebCompositorSupportImpl::createScrollbarLayer(
83 WebScrollbar* scrollbar,
84 WebScrollbarThemePainter painter,
85 WebScrollbarThemeGeometry* geometry) {
86 return new WebScrollbarLayerImpl(scrollbar, painter, geometry);
87 }
88
89 WebScrollbarLayer* WebCompositorSupportImpl::createSolidColorScrollbarLayer(
90 WebScrollbar::Orientation orientation,
91 int thumb_thickness,
92 int track_start,
93 bool is_left_side_vertical_scrollbar) {
94 return new WebScrollbarLayerImpl(orientation,
95 thumb_thickness,
96 track_start,
97 is_left_side_vertical_scrollbar);
98 }
99
100 WebAnimation* WebCompositorSupportImpl::createAnimation(
101 const blink::WebAnimationCurve& curve,
102 blink::WebAnimation::TargetProperty target,
103 int animation_id) {
104 return new WebAnimationImpl(curve, target, animation_id, 0);
105 }
106
107 WebFilterAnimationCurve*
108 WebCompositorSupportImpl::createFilterAnimationCurve() {
109 return new WebFilterAnimationCurveImpl();
110 }
111
112 WebFloatAnimationCurve* WebCompositorSupportImpl::createFloatAnimationCurve() {
113 return new WebFloatAnimationCurveImpl();
114 }
115
116 #if WEB_SCROLL_OFFSET_ANIMATION_CURVE_IS_DEFINED
117 WebScrollOffsetAnimationCurve*
118 WebCompositorSupportImpl::createScrollOffsetAnimationCurve(
119 blink::WebFloatPoint target_value,
120 blink::WebAnimationCurve::TimingFunctionType timing_function) {
121 return new WebScrollOffsetAnimationCurveImpl(target_value, timing_function);
122 }
123 #endif
124
125 WebTransformAnimationCurve*
126 WebCompositorSupportImpl::createTransformAnimationCurve() {
127 return new WebTransformAnimationCurveImpl();
128 }
129
130 WebTransformOperations* WebCompositorSupportImpl::createTransformOperations() {
131 return new WebTransformOperationsImpl();
132 }
133
134 WebFilterOperations* WebCompositorSupportImpl::createFilterOperations() {
135 return new WebFilterOperationsImpl();
136 }
137
138 } // namespace webkit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698