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

Side by Side Diff: cc/base/tiling_data.cc

Issue 660333004: cc cleanup: Update paths to geometry headers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 6 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/base/tiling_data.h ('k') | cc/blink/web_layer_impl_fixed_bounds.h » ('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/base/tiling_data.h" 5 #include "cc/base/tiling_data.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ui/gfx/rect.h" 9 #include "ui/gfx/geometry/rect.h"
10 #include "ui/gfx/vector2d.h" 10 #include "ui/gfx/geometry/vector2d.h"
11 11
12 namespace cc { 12 namespace cc {
13 13
14 static int ComputeNumTiles(int max_texture_size, 14 static int ComputeNumTiles(int max_texture_size,
15 int total_size, 15 int total_size,
16 int border_texels) { 16 int border_texels) {
17 if (max_texture_size - 2 * border_texels <= 0) 17 if (max_texture_size - 2 * border_texels <= 0)
18 return total_size > 0 && max_texture_size >= total_size ? 1 : 0; 18 return total_size > 0 && max_texture_size >= total_size ? 1 : 0;
19 19
20 int num_tiles = std::max(1, 20 int num_tiles = std::max(1,
(...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after
921 921
922 // We should always end up in an around rect at some point. 922 // We should always end up in an around rect at some point.
923 // Since the direction is now vertical, we have to ensure that we will 923 // Since the direction is now vertical, we have to ensure that we will
924 // advance. 924 // advance.
925 DCHECK_GE(horizontal_step_count_, 1); 925 DCHECK_GE(horizontal_step_count_, 1);
926 DCHECK_GE(vertical_step_count_, 1); 926 DCHECK_GE(vertical_step_count_, 1);
927 } 927 }
928 } 928 }
929 929
930 } // namespace cc 930 } // namespace cc
OLDNEW
« no previous file with comments | « cc/base/tiling_data.h ('k') | cc/blink/web_layer_impl_fixed_bounds.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698