| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/debug/trace_event_impl.h" | 8 #include "base/debug/trace_event_impl.h" |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 } | 266 } |
| 267 | 267 |
| 268 void WebLayerImpl::setForceRenderSurface(bool force_render_surface) { | 268 void WebLayerImpl::setForceRenderSurface(bool force_render_surface) { |
| 269 layer_->SetForceRenderSurface(force_render_surface); | 269 layer_->SetForceRenderSurface(force_render_surface); |
| 270 } | 270 } |
| 271 | 271 |
| 272 void WebLayerImpl::setScrollPositionDouble(blink::WebDoublePoint position) { | 272 void WebLayerImpl::setScrollPositionDouble(blink::WebDoublePoint position) { |
| 273 layer_->SetScrollOffset(gfx::ScrollOffset(position.x, position.y)); | 273 layer_->SetScrollOffset(gfx::ScrollOffset(position.x, position.y)); |
| 274 } | 274 } |
| 275 | 275 |
| 276 void WebLayerImpl::setScrollPositionFractionalPart( | 276 void WebLayerImpl::setScrollCompensationAdjustment( |
| 277 blink::WebDoublePoint position) { | 277 blink::WebDoublePoint position) { |
| 278 layer_->SetScrollOffsetFractionalPart(gfx::Vector2dF(position.x, position.y)); | 278 layer_->SetScrollCompensationAdjustment( |
| 279 gfx::Vector2dF(position.x, position.y)); |
| 279 } | 280 } |
| 280 | 281 |
| 281 blink::WebDoublePoint WebLayerImpl::scrollPositionDouble() const { | 282 blink::WebDoublePoint WebLayerImpl::scrollPositionDouble() const { |
| 282 return blink::WebDoublePoint(layer_->scroll_offset().x(), | 283 return blink::WebDoublePoint(layer_->scroll_offset().x(), |
| 283 layer_->scroll_offset().y()); | 284 layer_->scroll_offset().y()); |
| 284 } | 285 } |
| 285 | 286 |
| 286 void WebLayerImpl::setScrollClipLayer(WebLayer* clip_layer) { | 287 void WebLayerImpl::setScrollClipLayer(WebLayer* clip_layer) { |
| 287 if (!clip_layer) { | 288 if (!clip_layer) { |
| 288 layer_->SetScrollClipLayerId(Layer::INVALID_ID); | 289 layer_->SetScrollClipLayerId(Layer::INVALID_ID); |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 if (parent) | 479 if (parent) |
| 479 clip_parent = static_cast<WebLayerImpl*>(parent)->layer(); | 480 clip_parent = static_cast<WebLayerImpl*>(parent)->layer(); |
| 480 layer_->SetClipParent(clip_parent); | 481 layer_->SetClipParent(clip_parent); |
| 481 } | 482 } |
| 482 | 483 |
| 483 Layer* WebLayerImpl::layer() const { | 484 Layer* WebLayerImpl::layer() const { |
| 484 return layer_.get(); | 485 return layer_.get(); |
| 485 } | 486 } |
| 486 | 487 |
| 487 } // namespace cc_blink | 488 } // namespace cc_blink |
| OLD | NEW |