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

Side by Side Diff: cc/layers/layer_impl.cc

Issue 1819683002: Use sk_sp-based picture recording APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: skspify GetPicture/GetFlattenedPicture Created 4 years, 9 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/layers/layer_impl.h ('k') | cc/layers/picture_image_layer.cc » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/layers/layer_impl.h" 5 #include "cc/layers/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 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 457
458 void LayerImpl::set_user_scrollable_vertical(bool scrollable) { 458 void LayerImpl::set_user_scrollable_vertical(bool scrollable) {
459 user_scrollable_vertical_ = scrollable; 459 user_scrollable_vertical_ = scrollable;
460 } 460 }
461 461
462 bool LayerImpl::user_scrollable(ScrollbarOrientation orientation) const { 462 bool LayerImpl::user_scrollable(ScrollbarOrientation orientation) const {
463 return (orientation == HORIZONTAL) ? user_scrollable_horizontal_ 463 return (orientation == HORIZONTAL) ? user_scrollable_horizontal_
464 : user_scrollable_vertical_; 464 : user_scrollable_vertical_;
465 } 465 }
466 466
467 skia::RefPtr<SkPicture> LayerImpl::GetPicture() { 467 sk_sp<SkPicture> LayerImpl::GetPicture() {
468 return skia::RefPtr<SkPicture>(); 468 return nullptr;
469 } 469 }
470 470
471 scoped_ptr<LayerImpl> LayerImpl::CreateLayerImpl(LayerTreeImpl* tree_impl) { 471 scoped_ptr<LayerImpl> LayerImpl::CreateLayerImpl(LayerTreeImpl* tree_impl) {
472 return LayerImpl::Create(tree_impl, layer_id_); 472 return LayerImpl::Create(tree_impl, layer_id_);
473 } 473 }
474 474
475 void LayerImpl::set_main_thread_scrolling_reasons( 475 void LayerImpl::set_main_thread_scrolling_reasons(
476 uint32_t main_thread_scrolling_reasons) { 476 uint32_t main_thread_scrolling_reasons) {
477 if (main_thread_scrolling_reasons_ == main_thread_scrolling_reasons) 477 if (main_thread_scrolling_reasons_ == main_thread_scrolling_reasons)
478 return; 478 return;
(...skipping 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1580 .layer_transforms_should_scale_layer_contents) { 1580 .layer_transforms_should_scale_layer_contents) {
1581 return default_scale; 1581 return default_scale;
1582 } 1582 }
1583 1583
1584 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents( 1584 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents(
1585 DrawTransform(), default_scale); 1585 DrawTransform(), default_scale);
1586 return std::max(transform_scales.x(), transform_scales.y()); 1586 return std::max(transform_scales.x(), transform_scales.y());
1587 } 1587 }
1588 1588
1589 } // namespace cc 1589 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_impl.h ('k') | cc/layers/picture_image_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698