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

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

Issue 1599673002: compositor-worker: Remove code from cc_blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix blink_platform_unittests Created 4 years, 11 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.cc ('k') | cc/layers/layer_impl_unittest.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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 num_descendants_that_draw_content_(0), 87 num_descendants_that_draw_content_(0),
88 transform_tree_index_(-1), 88 transform_tree_index_(-1),
89 effect_tree_index_(-1), 89 effect_tree_index_(-1),
90 clip_tree_index_(-1), 90 clip_tree_index_(-1),
91 draw_depth_(0.f), 91 draw_depth_(0.f),
92 needs_push_properties_(false), 92 needs_push_properties_(false),
93 num_dependents_need_push_properties_(0), 93 num_dependents_need_push_properties_(0),
94 sorting_context_id_(0), 94 sorting_context_id_(0),
95 current_draw_mode_(DRAW_MODE_NONE), 95 current_draw_mode_(DRAW_MODE_NONE),
96 element_id_(0), 96 element_id_(0),
97 mutable_properties_(kMutablePropertyNone), 97 mutable_properties_(MutableProperty::kNone),
98 force_render_surface_(false), 98 force_render_surface_(false),
99 frame_timing_requests_dirty_(false), 99 frame_timing_requests_dirty_(false),
100 visited_(false), 100 visited_(false),
101 layer_or_descendant_is_drawn_(false), 101 layer_or_descendant_is_drawn_(false),
102 layer_or_descendant_has_input_handler_(false), 102 layer_or_descendant_has_input_handler_(false),
103 sorted_for_recursion_(false), 103 sorted_for_recursion_(false),
104 is_hidden_from_property_trees_(false) { 104 is_hidden_from_property_trees_(false) {
105 DCHECK_GT(layer_id_, 0); 105 DCHECK_GT(layer_id_, 0);
106 DCHECK(layer_tree_impl_); 106 DCHECK(layer_tree_impl_);
107 layer_tree_impl_->RegisterLayer(this); 107 layer_tree_impl_->RegisterLayer(this);
(...skipping 1605 matching lines...) Expand 10 before | Expand all | Expand 10 after
1713 MathUtil::AddToTracedValue("bounds", bounds_, state); 1713 MathUtil::AddToTracedValue("bounds", bounds_, state);
1714 1714
1715 state->SetDouble("opacity", opacity()); 1715 state->SetDouble("opacity", opacity());
1716 1716
1717 MathUtil::AddToTracedValue("position", position_, state); 1717 MathUtil::AddToTracedValue("position", position_, state);
1718 1718
1719 state->SetInteger("draws_content", DrawsContent()); 1719 state->SetInteger("draws_content", DrawsContent());
1720 state->SetInteger("gpu_memory_usage", 1720 state->SetInteger("gpu_memory_usage",
1721 base::saturated_cast<int>(GPUMemoryUsageInBytes())); 1721 base::saturated_cast<int>(GPUMemoryUsageInBytes()));
1722 1722
1723 if (mutable_properties_ != kMutablePropertyNone) { 1723 if (mutable_properties_ != MutableProperty::kNone) {
1724 state->SetInteger("element_id", base::saturated_cast<int>(element_id_)); 1724 state->SetInteger("element_id", base::saturated_cast<int>(element_id_));
1725 state->SetInteger("mutable_properties", mutable_properties_); 1725 state->SetInteger("mutable_properties", mutable_properties_);
1726 } 1726 }
1727 1727
1728 MathUtil::AddToTracedValue( 1728 MathUtil::AddToTracedValue(
1729 "scroll_offset", scroll_offset_ ? scroll_offset_->Current(IsActive()) 1729 "scroll_offset", scroll_offset_ ? scroll_offset_->Current(IsActive())
1730 : gfx::ScrollOffset(), 1730 : gfx::ScrollOffset(),
1731 state); 1731 state);
1732 1732
1733 MathUtil::AddToTracedValue("transform_origin", transform_origin_, state); 1733 MathUtil::AddToTracedValue("transform_origin", transform_origin_, state);
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
1943 .layer_transforms_should_scale_layer_contents) { 1943 .layer_transforms_should_scale_layer_contents) {
1944 return default_scale; 1944 return default_scale;
1945 } 1945 }
1946 1946
1947 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents( 1947 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents(
1948 DrawTransform(), default_scale); 1948 DrawTransform(), default_scale);
1949 return std::max(transform_scales.x(), transform_scales.y()); 1949 return std::max(transform_scales.x(), transform_scales.y());
1950 } 1950 }
1951 1951
1952 } // namespace cc 1952 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer.cc ('k') | cc/layers/layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698