| 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_layer_impl.h" | 5 #include "cc/blink/web_layer_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 } | 216 } |
| 217 | 217 |
| 218 void WebLayerImpl::setForceRenderSurface(bool force_render_surface) { | 218 void WebLayerImpl::setForceRenderSurface(bool force_render_surface) { |
| 219 layer_->SetForceRenderSurface(force_render_surface); | 219 layer_->SetForceRenderSurface(force_render_surface); |
| 220 } | 220 } |
| 221 | 221 |
| 222 void WebLayerImpl::setScrollPositionDouble(blink::WebDoublePoint position) { | 222 void WebLayerImpl::setScrollPositionDouble(blink::WebDoublePoint position) { |
| 223 layer_->SetScrollOffset(gfx::ScrollOffset(position.x, position.y)); | 223 layer_->SetScrollOffset(gfx::ScrollOffset(position.x, position.y)); |
| 224 } | 224 } |
| 225 | 225 |
| 226 void WebLayerImpl::setScrollCompensationAdjustment( | |
| 227 blink::WebDoublePoint position) { | |
| 228 layer_->SetScrollCompensationAdjustment( | |
| 229 gfx::Vector2dF(position.x, position.y)); | |
| 230 } | |
| 231 | |
| 232 blink::WebDoublePoint WebLayerImpl::scrollPositionDouble() const { | 226 blink::WebDoublePoint WebLayerImpl::scrollPositionDouble() const { |
| 233 return blink::WebDoublePoint(layer_->scroll_offset().x(), | 227 return blink::WebDoublePoint(layer_->scroll_offset().x(), |
| 234 layer_->scroll_offset().y()); | 228 layer_->scroll_offset().y()); |
| 235 } | 229 } |
| 236 | 230 |
| 237 void WebLayerImpl::setScrollClipLayer(WebLayer* clip_layer) { | 231 void WebLayerImpl::setScrollClipLayer(WebLayer* clip_layer) { |
| 238 if (!clip_layer) { | 232 if (!clip_layer) { |
| 239 layer_->SetScrollClipLayerId(Layer::INVALID_ID); | 233 layer_->SetScrollClipLayerId(Layer::INVALID_ID); |
| 240 return; | 234 return; |
| 241 } | 235 } |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 446 | 440 |
| 447 Layer* WebLayerImpl::layer() const { | 441 Layer* WebLayerImpl::layer() const { |
| 448 return layer_.get(); | 442 return layer_.get(); |
| 449 } | 443 } |
| 450 | 444 |
| 451 void WebLayerImpl::SetContentsOpaqueIsFixed(bool fixed) { | 445 void WebLayerImpl::SetContentsOpaqueIsFixed(bool fixed) { |
| 452 contents_opaque_is_fixed_ = fixed; | 446 contents_opaque_is_fixed_ = fixed; |
| 453 } | 447 } |
| 454 | 448 |
| 455 } // namespace cc_blink | 449 } // namespace cc_blink |
| OLD | NEW |