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

Side by Side Diff: cc/trees/property_tree.cc

Issue 2163823003: cc : Use effect id to decide if surface contents scale should be applied (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix_compile_error Created 4 years, 5 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/trees/layer_tree_impl.cc ('k') | no next file » | 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 } else { 874 } else {
875 // The root surface doesn't have the notion of sub-layer scale, but 875 // The root surface doesn't have the notion of sub-layer scale, but
876 // instead has a similar notion of transforming from the space of the root 876 // instead has a similar notion of transforming from the space of the root
877 // layer to the space of the screen. 877 // layer to the space of the screen.
878 DCHECK_EQ(0, destination_id); 878 DCHECK_EQ(0, destination_id);
879 source_id = 1; 879 source_id = 1;
880 } 880 }
881 gfx::Transform transform; 881 gfx::Transform transform;
882 property_trees()->transform_tree.ComputeTransform(source_id, destination_id, 882 property_trees()->transform_tree.ComputeTransform(source_id, destination_id,
883 &transform); 883 &transform);
884 if (destination_id != 0) { 884 if (effect_node->id != 1) {
885 transform.matrix().postScale(effect_node->surface_contents_scale.x(), 885 transform.matrix().postScale(effect_node->surface_contents_scale.x(),
886 effect_node->surface_contents_scale.y(), 886 effect_node->surface_contents_scale.y(),
887 1.f); 887 1.f);
888 } 888 }
889 it->set_area(MathUtil::MapEnclosingClippedRect(transform, it->area())); 889 it->set_area(MathUtil::MapEnclosingClippedRect(transform, it->area()));
890 } 890 }
891 } 891 }
892 892
893 bool EffectTree::HasCopyRequests() const { 893 bool EffectTree::HasCopyRequests() const {
894 return !copy_requests_.empty(); 894 return !copy_requests_.empty();
(...skipping 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after
1898 if (transform_id > destination_transform_id) { 1898 if (transform_id > destination_transform_id) {
1899 return transform_tree.CombineTransformsBetween( 1899 return transform_tree.CombineTransformsBetween(
1900 transform_id, destination_transform_id, transform); 1900 transform_id, destination_transform_id, transform);
1901 } 1901 }
1902 1902
1903 return transform_tree.CombineInversesBetween( 1903 return transform_tree.CombineInversesBetween(
1904 transform_id, destination_transform_id, transform); 1904 transform_id, destination_transform_id, transform);
1905 } 1905 }
1906 1906
1907 } // namespace cc 1907 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698