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

Side by Side Diff: cc/blink/web_layer_impl.cc

Issue 895853003: Update from https://crrev.com/314320 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « cc/blink/web_layer_impl.h ('k') | cc/cc.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
9 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
10 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
11 #include "base/threading/thread_checker.h" 10 #include "base/threading/thread_checker.h"
11 #include "base/trace_event/trace_event_impl.h"
12 #include "cc/animation/animation.h" 12 #include "cc/animation/animation.h"
13 #include "cc/base/region.h" 13 #include "cc/base/region.h"
14 #include "cc/base/switches.h" 14 #include "cc/base/switches.h"
15 #include "cc/blink/web_animation_impl.h" 15 #include "cc/blink/web_animation_impl.h"
16 #include "cc/blink/web_blend_mode.h" 16 #include "cc/blink/web_blend_mode.h"
17 #include "cc/blink/web_filter_operations_impl.h" 17 #include "cc/blink/web_filter_operations_impl.h"
18 #include "cc/blink/web_to_cc_animation_delegate_adapter.h" 18 #include "cc/blink/web_to_cc_animation_delegate_adapter.h"
19 #include "cc/layers/layer.h" 19 #include "cc/layers/layer.h"
20 #include "cc/layers/layer_position_constraint.h" 20 #include "cc/layers/layer_position_constraint.h"
21 #include "cc/trees/layer_tree_host.h" 21 #include "cc/trees/layer_tree_host.h"
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::setScrollCompensationAdjustment(
277 blink::WebDoublePoint position) {
278 layer_->SetScrollCompensationAdjustment(
279 gfx::Vector2dF(position.x, position.y));
280 }
281
276 blink::WebDoublePoint WebLayerImpl::scrollPositionDouble() const { 282 blink::WebDoublePoint WebLayerImpl::scrollPositionDouble() const {
277 return blink::WebDoublePoint(layer_->scroll_offset().x(), 283 return blink::WebDoublePoint(layer_->scroll_offset().x(),
278 layer_->scroll_offset().y()); 284 layer_->scroll_offset().y());
279 } 285 }
280 286
281 void WebLayerImpl::setScrollClipLayer(WebLayer* clip_layer) { 287 void WebLayerImpl::setScrollClipLayer(WebLayer* clip_layer) {
282 if (!clip_layer) { 288 if (!clip_layer) {
283 layer_->SetScrollClipLayerId(Layer::INVALID_ID); 289 layer_->SetScrollClipLayerId(Layer::INVALID_ID);
284 return; 290 return;
285 } 291 }
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 if (parent) 479 if (parent)
474 clip_parent = static_cast<WebLayerImpl*>(parent)->layer(); 480 clip_parent = static_cast<WebLayerImpl*>(parent)->layer();
475 layer_->SetClipParent(clip_parent); 481 layer_->SetClipParent(clip_parent);
476 } 482 }
477 483
478 Layer* WebLayerImpl::layer() const { 484 Layer* WebLayerImpl::layer() const {
479 return layer_.get(); 485 return layer_.get();
480 } 486 }
481 487
482 } // namespace cc_blink 488 } // namespace cc_blink
OLDNEW
« no previous file with comments | « cc/blink/web_layer_impl.h ('k') | cc/cc.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698