OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 "config.h" | 5 #include "config.h" |
6 #include "web_layer_impl.h" | 6 #include "web_layer_impl.h" |
7 | 7 |
8 #include "SkMatrix44.h" | 8 #include "SkMatrix44.h" |
9 #ifdef LOG | 9 #ifdef LOG |
10 #undef LOG | 10 #undef LOG |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 m_layer->setLayerAnimationDelegate(0); | 82 m_layer->setLayerAnimationDelegate(0); |
83 } | 83 } |
84 | 84 |
85 int WebLayerImpl::id() const | 85 int WebLayerImpl::id() const |
86 { | 86 { |
87 return m_layer->id(); | 87 return m_layer->id(); |
88 } | 88 } |
89 | 89 |
90 void WebLayerImpl::invalidateRect(const WebFloatRect& rect) | 90 void WebLayerImpl::invalidateRect(const WebFloatRect& rect) |
91 { | 91 { |
92 m_layer->setNeedsDisplayRect(convert(rect)); | 92 m_layer->setNeedsDisplayRect(rect); |
93 } | 93 } |
94 | 94 |
95 void WebLayerImpl::invalidate() | 95 void WebLayerImpl::invalidate() |
96 { | 96 { |
97 m_layer->setNeedsDisplay(); | 97 m_layer->setNeedsDisplay(); |
98 } | 98 } |
99 | 99 |
100 void WebLayerImpl::addChild(WebLayer* child) | 100 void WebLayerImpl::addChild(WebLayer* child) |
101 { | 101 { |
102 m_layer->addChild(static_cast<WebLayerImpl*>(child)->layer()); | 102 m_layer->addChild(static_cast<WebLayerImpl*>(child)->layer()); |
(...skipping 14 matching lines...) Expand all Loading... |
117 m_layer->removeFromParent(); | 117 m_layer->removeFromParent(); |
118 } | 118 } |
119 | 119 |
120 void WebLayerImpl::removeAllChildren() | 120 void WebLayerImpl::removeAllChildren() |
121 { | 121 { |
122 m_layer->removeAllChildren(); | 122 m_layer->removeAllChildren(); |
123 } | 123 } |
124 | 124 |
125 void WebLayerImpl::setAnchorPoint(const WebFloatPoint& anchorPoint) | 125 void WebLayerImpl::setAnchorPoint(const WebFloatPoint& anchorPoint) |
126 { | 126 { |
127 m_layer->setAnchorPoint(convert(anchorPoint)); | 127 m_layer->setAnchorPoint(anchorPoint); |
128 } | 128 } |
129 | 129 |
130 WebFloatPoint WebLayerImpl::anchorPoint() const | 130 WebFloatPoint WebLayerImpl::anchorPoint() const |
131 { | 131 { |
132 return WebFloatPoint(m_layer->anchorPoint().x(), m_layer->anchorPoint().y())
; | 132 return m_layer->anchorPoint(); |
133 } | 133 } |
134 | 134 |
135 void WebLayerImpl::setAnchorPointZ(float anchorPointZ) | 135 void WebLayerImpl::setAnchorPointZ(float anchorPointZ) |
136 { | 136 { |
137 m_layer->setAnchorPointZ(anchorPointZ); | 137 m_layer->setAnchorPointZ(anchorPointZ); |
138 } | 138 } |
139 | 139 |
140 float WebLayerImpl::anchorPointZ() const | 140 float WebLayerImpl::anchorPointZ() const |
141 { | 141 { |
142 return m_layer->anchorPointZ(); | 142 return m_layer->anchorPointZ(); |
143 } | 143 } |
144 | 144 |
145 void WebLayerImpl::setBounds(const WebSize& size) | 145 void WebLayerImpl::setBounds(const WebSize& size) |
146 { | 146 { |
147 m_layer->setBounds(convert(size)); | 147 m_layer->setBounds(size); |
148 } | 148 } |
149 | 149 |
150 WebSize WebLayerImpl::bounds() const | 150 WebSize WebLayerImpl::bounds() const |
151 { | 151 { |
152 return convert(m_layer->bounds()); | 152 return m_layer->bounds(); |
153 } | 153 } |
154 | 154 |
155 void WebLayerImpl::setMasksToBounds(bool masksToBounds) | 155 void WebLayerImpl::setMasksToBounds(bool masksToBounds) |
156 { | 156 { |
157 m_layer->setMasksToBounds(masksToBounds); | 157 m_layer->setMasksToBounds(masksToBounds); |
158 } | 158 } |
159 | 159 |
160 bool WebLayerImpl::masksToBounds() const | 160 bool WebLayerImpl::masksToBounds() const |
161 { | 161 { |
162 return m_layer->masksToBounds(); | 162 return m_layer->masksToBounds(); |
(...skipping 24 matching lines...) Expand all Loading... |
187 m_layer->setContentsOpaque(opaque); | 187 m_layer->setContentsOpaque(opaque); |
188 } | 188 } |
189 | 189 |
190 bool WebLayerImpl::opaque() const | 190 bool WebLayerImpl::opaque() const |
191 { | 191 { |
192 return m_layer->contentsOpaque(); | 192 return m_layer->contentsOpaque(); |
193 } | 193 } |
194 | 194 |
195 void WebLayerImpl::setPosition(const WebFloatPoint& position) | 195 void WebLayerImpl::setPosition(const WebFloatPoint& position) |
196 { | 196 { |
197 m_layer->setPosition(convert(position)); | 197 m_layer->setPosition(position); |
198 } | 198 } |
199 | 199 |
200 WebFloatPoint WebLayerImpl::position() const | 200 WebFloatPoint WebLayerImpl::position() const |
201 { | 201 { |
202 return WebFloatPoint(m_layer->position().x(), m_layer->position().y()); | 202 return m_layer->position(); |
203 } | 203 } |
204 | 204 |
205 void WebLayerImpl::setSublayerTransform(const SkMatrix44& matrix) | 205 void WebLayerImpl::setSublayerTransform(const SkMatrix44& matrix) |
206 { | 206 { |
207 m_layer->setSublayerTransform(transformationMatrixFromSkMatrix44(matrix)); | 207 m_layer->setSublayerTransform(transformationMatrixFromSkMatrix44(matrix)); |
208 } | 208 } |
209 | 209 |
210 void WebLayerImpl::setSublayerTransform(const WebTransformationMatrix& matrix) | 210 void WebLayerImpl::setSublayerTransform(const WebTransformationMatrix& matrix) |
211 { | 211 { |
212 m_layer->setSublayerTransform(matrix); | 212 m_layer->setSublayerTransform(matrix); |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
437 { | 437 { |
438 m_layer->setLayerScrollClient(scrollClient); | 438 m_layer->setLayerScrollClient(scrollClient); |
439 } | 439 } |
440 | 440 |
441 Layer* WebLayerImpl::layer() const | 441 Layer* WebLayerImpl::layer() const |
442 { | 442 { |
443 return m_layer.get(); | 443 return m_layer.get(); |
444 } | 444 } |
445 | 445 |
446 } // namespace WebKit | 446 } // namespace WebKit |
OLD | NEW |