OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
11 * notice, this list of conditions and the following disclaimer in the | 11 * notice, this list of conditions and the following disclaimer in the |
12 * documentation and/or other materials provided with the distribution. | 12 * documentation and/or other materials provided with the distribution. |
13 * | 13 * |
14 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY | 14 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY |
15 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 15 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
16 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 16 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
17 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY | 17 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY |
18 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 18 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
19 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 19 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
20 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 20 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
21 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 21 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
24 */ | 24 */ |
25 | 25 |
26 #ifndef WebCompositorSupport_h | 26 #ifndef WebCompositorSupport_h |
27 #define WebCompositorSupport_h | 27 #define WebCompositorSupport_h |
28 | 28 |
29 #include "WebCommon.h" | 29 #include "WebCommon.h" |
30 #include "WebCompositorAnimation.h" | |
31 #include "WebCompositorAnimationCurve.h" | |
32 #include "WebFloatPoint.h" | 30 #include "WebFloatPoint.h" |
33 #include "WebLayerTreeView.h" | 31 #include "WebLayerTreeView.h" |
34 #include "WebScrollOffsetAnimationCurve.h" | |
35 #include "WebScrollbar.h" | 32 #include "WebScrollbar.h" |
36 #include "WebScrollbarThemePainter.h" | 33 #include "WebScrollbarThemePainter.h" |
37 | 34 |
38 namespace cc { | 35 namespace cc { |
39 class Layer; | 36 class Layer; |
40 } | 37 } |
41 | 38 |
42 namespace blink { | 39 namespace blink { |
43 | 40 |
44 class WebCompositorAnimationPlayer; | |
45 class WebCompositorAnimationTimeline; | |
46 class WebContentLayer; | 41 class WebContentLayer; |
47 class WebContentLayerClient; | 42 class WebContentLayerClient; |
48 class WebExternalTextureLayer; | 43 class WebExternalTextureLayer; |
49 class WebExternalTextureLayerClient; | 44 class WebExternalTextureLayerClient; |
50 class WebFilterAnimationCurve; | |
51 class WebFilterOperations; | |
52 class WebFloatAnimationCurve; | |
53 class WebGraphicsContext3D; | 45 class WebGraphicsContext3D; |
54 class WebImageLayer; | 46 class WebImageLayer; |
55 class WebLayer; | 47 class WebLayer; |
56 class WebScrollbarLayer; | 48 class WebScrollbarLayer; |
57 class WebScrollbarThemeGeometry; | 49 class WebScrollbarThemeGeometry; |
58 class WebTransformAnimationCurve; | |
59 class WebTransformOperations; | |
60 | 50 |
61 class WebCompositorSupport { | 51 class WebCompositorSupport { |
62 public: | 52 public: |
63 | 53 |
64 // Layers ------------------------------------------------------- | 54 // Layers ------------------------------------------------------- |
65 | 55 |
66 virtual WebLayer* createLayer() { return nullptr; } | 56 virtual WebLayer* createLayer() { return nullptr; } |
67 | 57 |
68 virtual WebLayer* createLayerFromCCLayer(cc::Layer*) { return nullptr; } | 58 virtual WebLayer* createLayerFromCCLayer(cc::Layer*) { return nullptr; } |
69 | 59 |
70 virtual WebContentLayer* createContentLayer(WebContentLayerClient*) { return
nullptr; } | 60 virtual WebContentLayer* createContentLayer(WebContentLayerClient*) { return
nullptr; } |
71 | 61 |
72 virtual WebExternalTextureLayer* createExternalTextureLayer(WebExternalTextu
reLayerClient*) { return nullptr; } | 62 virtual WebExternalTextureLayer* createExternalTextureLayer(WebExternalTextu
reLayerClient*) { return nullptr; } |
73 | 63 |
74 virtual WebImageLayer* createImageLayer() { return nullptr; } | 64 virtual WebImageLayer* createImageLayer() { return nullptr; } |
75 | 65 |
76 // The ownership of the WebScrollbarThemeGeometry pointer is passed to Chrom
ium. | 66 // The ownership of the WebScrollbarThemeGeometry pointer is passed to Chrom
ium. |
77 virtual WebScrollbarLayer* createScrollbarLayer(WebScrollbar*, WebScrollbarT
hemePainter, WebScrollbarThemeGeometry*) { return nullptr; } | 67 virtual WebScrollbarLayer* createScrollbarLayer(WebScrollbar*, WebScrollbarT
hemePainter, WebScrollbarThemeGeometry*) { return nullptr; } |
78 | 68 |
79 virtual WebScrollbarLayer* createSolidColorScrollbarLayer(WebScrollbar::Orie
ntation, int thumbThickness, int trackStart, bool isLeftSideVerticalScrollbar) {
return nullptr; } | 69 virtual WebScrollbarLayer* createSolidColorScrollbarLayer(WebScrollbar::Orie
ntation, int thumbThickness, int trackStart, bool isLeftSideVerticalScrollbar) {
return nullptr; } |
80 | 70 |
81 // Animation ---------------------------------------------------- | |
82 | |
83 virtual WebCompositorAnimation* createAnimation(const WebCompositorAnimation
Curve&, WebCompositorAnimation::TargetProperty, int groupId = 0, int animationId
= 0) { return nullptr; } | |
84 | |
85 virtual WebFilterAnimationCurve* createFilterAnimationCurve() { return nullp
tr; } | |
86 | |
87 virtual WebFloatAnimationCurve* createFloatAnimationCurve() { return nullptr
; } | |
88 | |
89 virtual WebScrollOffsetAnimationCurve* createScrollOffsetAnimationCurve( | |
90 WebFloatPoint targetValue, | |
91 WebCompositorAnimationCurve::TimingFunctionType, | |
92 WebScrollOffsetAnimationCurve::ScrollDurationBehavior) { return nullptr;
} | |
93 | |
94 virtual WebTransformAnimationCurve* createTransformAnimationCurve() { return
nullptr; } | |
95 | |
96 virtual WebTransformOperations* createTransformOperations() { return nullptr
; } | |
97 | |
98 virtual WebFilterOperations* createFilterOperations() { return nullptr; } | |
99 | |
100 virtual WebCompositorAnimationPlayer* createAnimationPlayer() { return nullp
tr; } | |
101 | |
102 virtual WebCompositorAnimationTimeline* createAnimationTimeline() { return n
ullptr; } | |
103 | |
104 protected: | 71 protected: |
105 virtual ~WebCompositorSupport() { } | 72 virtual ~WebCompositorSupport() { } |
106 }; | 73 }; |
107 | 74 |
108 } | 75 } |
109 | 76 |
110 #endif // WebCompositorSupport_h | 77 #endif // WebCompositorSupport_h |
OLD | NEW |