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/layers/layer_impl.cc

Issue 2011063002: cc: Use ScreenSpaceTransform to determine content scale (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make layout test need-auto-rebaseline Created 4 years, 6 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 | « no previous file | cc/layers/picture_image_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 <algorithm> 10 #include <algorithm>
(...skipping 1381 matching lines...) Expand 10 before | Expand all | Expand 10 after
1392 float device_scale = layer_tree_impl()->device_scale_factor(); 1392 float device_scale = layer_tree_impl()->device_scale_factor();
1393 1393
1394 float default_scale = page_scale * device_scale; 1394 float default_scale = page_scale * device_scale;
1395 if (!layer_tree_impl() 1395 if (!layer_tree_impl()
1396 ->settings() 1396 ->settings()
1397 .layer_transforms_should_scale_layer_contents) { 1397 .layer_transforms_should_scale_layer_contents) {
1398 return default_scale; 1398 return default_scale;
1399 } 1399 }
1400 1400
1401 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents( 1401 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents(
1402 DrawTransform(), default_scale); 1402 ScreenSpaceTransform(), default_scale);
1403 return std::max(transform_scales.x(), transform_scales.y()); 1403 return std::max(transform_scales.x(), transform_scales.y());
1404 } 1404 }
1405 1405
1406 } // namespace cc 1406 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/layers/picture_image_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698