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

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

Issue 13206004: cc: Fix build issues for adding ‘chromium_code’: 1 to cc.gyp and cc_tests.gyp (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_host_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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/trees/layer_tree_host_common.h" 5 #include "cc/trees/layer_tree_host_common.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "cc/base/math_util.h" 10 #include "cc/base/math_util.h"
(...skipping 1314 matching lines...) Expand 10 before | Expand all | Expand 10 after
1325 &dummy_layer_list, 1325 &dummy_layer_list,
1326 NULL, 1326 NULL,
1327 max_texture_size, 1327 max_texture_size,
1328 device_scale_factor, 1328 device_scale_factor,
1329 page_scale_factor, 1329 page_scale_factor,
1330 can_use_lcd_text, 1330 can_use_lcd_text,
1331 &total_drawable_content_rect, 1331 &total_drawable_content_rect,
1332 update_tile_priorities); 1332 update_tile_priorities);
1333 1333
1334 // The dummy layer list should not have been used. 1334 // The dummy layer list should not have been used.
1335 DCHECK_EQ(dummy_layer_list.size(), 0); 1335 DCHECK_EQ(0u, dummy_layer_list.size());
1336 // A root layer render_surface should always exist after 1336 // A root layer render_surface should always exist after
1337 // CalculateDrawProperties. 1337 // CalculateDrawProperties.
1338 DCHECK(root_layer->render_surface()); 1338 DCHECK(root_layer->render_surface());
1339 } 1339 }
1340 1340
1341 void LayerTreeHostCommon::CalculateDrawProperties( 1341 void LayerTreeHostCommon::CalculateDrawProperties(
1342 LayerImpl* root_layer, 1342 LayerImpl* root_layer,
1343 gfx::Size device_viewport_size, 1343 gfx::Size device_viewport_size,
1344 float device_scale_factor, 1344 float device_scale_factor,
1345 float page_scale_factor, 1345 float page_scale_factor,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
1378 &dummy_layer_list, 1378 &dummy_layer_list,
1379 &layer_sorter, 1379 &layer_sorter,
1380 max_texture_size, 1380 max_texture_size,
1381 device_scale_factor, 1381 device_scale_factor,
1382 page_scale_factor, 1382 page_scale_factor,
1383 can_use_lcd_text, 1383 can_use_lcd_text,
1384 &total_drawable_content_rect, 1384 &total_drawable_content_rect,
1385 update_tile_priorities); 1385 update_tile_priorities);
1386 1386
1387 // The dummy layer list should not have been used. 1387 // The dummy layer list should not have been used.
1388 DCHECK_EQ(dummy_layer_list.size(), 0); 1388 DCHECK_EQ(0u, dummy_layer_list.size());
1389 // A root layer render_surface should always exist after 1389 // A root layer render_surface should always exist after
1390 // CalculateDrawProperties. 1390 // CalculateDrawProperties.
1391 DCHECK(root_layer->render_surface()); 1391 DCHECK(root_layer->render_surface());
1392 } 1392 }
1393 1393
1394 static bool PointHitsRect( 1394 static bool PointHitsRect(
1395 gfx::PointF screen_space_point, 1395 gfx::PointF screen_space_point,
1396 const gfx::Transform& local_space_to_screen_space_transform, 1396 const gfx::Transform& local_space_to_screen_space_transform,
1397 gfx::RectF local_space_rect) { 1397 gfx::RectF local_space_rect) {
1398 // If the transform is not invertible, then assume that this point doesn't hit 1398 // If the transform is not invertible, then assume that this point doesn't hit
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
1576 // At this point, we think the point does hit the touch event handler region 1576 // At this point, we think the point does hit the touch event handler region
1577 // on the layer, but we need to walk up the parents to ensure that the layer 1577 // on the layer, but we need to walk up the parents to ensure that the layer
1578 // was not clipped in such a way that the hit point actually should not hit 1578 // was not clipped in such a way that the hit point actually should not hit
1579 // the layer. 1579 // the layer.
1580 if (PointIsClippedBySurfaceOrClipRect(screen_space_point, layer_impl)) 1580 if (PointIsClippedBySurfaceOrClipRect(screen_space_point, layer_impl))
1581 return false; 1581 return false;
1582 1582
1583 return true; 1583 return true;
1584 } 1584 }
1585 } // namespace cc 1585 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698