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

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

Issue 1357423009: gfx: Make conversions from Size to SizeF be explicit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sizefconvert-gfx: . Created 5 years, 2 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/heads_up_display_layer_impl.cc ('k') | cc/layers/layer_impl.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 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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.h" 5 #include "cc/layers/layer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/atomic_sequence_num.h" 9 #include "base/atomic_sequence_num.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 if (bounds() == size) 350 if (bounds() == size)
351 return; 351 return;
352 bounds_ = size; 352 bounds_ = size;
353 353
354 if (!layer_tree_host_) 354 if (!layer_tree_host_)
355 return; 355 return;
356 356
357 if (ClipNode* clip_node = layer_tree_host_->property_trees()->clip_tree.Node( 357 if (ClipNode* clip_node = layer_tree_host_->property_trees()->clip_tree.Node(
358 clip_tree_index())) { 358 clip_tree_index())) {
359 if (clip_node->owner_id == id()) { 359 if (clip_node->owner_id == id()) {
360 clip_node->data.clip.set_size(size); 360 clip_node->data.clip.set_size(gfx::SizeF(size));
361 layer_tree_host_->property_trees()->clip_tree.set_needs_update(true); 361 layer_tree_host_->property_trees()->clip_tree.set_needs_update(true);
362 } 362 }
363 } 363 }
364 364
365 SetNeedsCommitNoRebuild(); 365 SetNeedsCommitNoRebuild();
366 } 366 }
367 367
368 Layer* Layer::RootLayer() { 368 Layer* Layer::RootLayer() {
369 Layer* layer = this; 369 Layer* layer = this;
370 while (layer->parent()) 370 while (layer->parent())
(...skipping 1314 matching lines...) Expand 10 before | Expand all | Expand 10 after
1685 this, layer_tree_host_->property_trees()->transform_tree); 1685 this, layer_tree_host_->property_trees()->transform_tree);
1686 } 1686 }
1687 1687
1688 gfx::Transform Layer::screen_space_transform() const { 1688 gfx::Transform Layer::screen_space_transform() const {
1689 DCHECK_NE(transform_tree_index_, -1); 1689 DCHECK_NE(transform_tree_index_, -1);
1690 return ScreenSpaceTransformFromPropertyTrees( 1690 return ScreenSpaceTransformFromPropertyTrees(
1691 this, layer_tree_host_->property_trees()->transform_tree); 1691 this, layer_tree_host_->property_trees()->transform_tree);
1692 } 1692 }
1693 1693
1694 } // namespace cc 1694 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/heads_up_display_layer_impl.cc ('k') | cc/layers/layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698