OLD | NEW |
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/tiled_layer.h" | 5 #include "cc/tiled_layer.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "cc/debug/overdraw_metrics.h" | 10 #include "cc/debug/overdraw_metrics.h" |
11 #include "cc/layer_impl.h" | 11 #include "cc/layer_impl.h" |
12 #include "cc/layer_updater.h" | 12 #include "cc/resources/layer_updater.h" |
13 #include "cc/prioritized_resource.h" | 13 #include "cc/resources/prioritized_resource.h" |
14 #include "cc/priority_calculator.h" | 14 #include "cc/resources/priority_calculator.h" |
15 #include "cc/tiled_layer_impl.h" | 15 #include "cc/tiled_layer_impl.h" |
16 #include "cc/trees/layer_tree_host.h" | 16 #include "cc/trees/layer_tree_host.h" |
17 #include "third_party/khronos/GLES2/gl2.h" | 17 #include "third_party/khronos/GLES2/gl2.h" |
18 #include "ui/gfx/rect_conversions.h" | 18 #include "ui/gfx/rect_conversions.h" |
19 | 19 |
20 namespace cc { | 20 namespace cc { |
21 | 21 |
22 // Maximum predictive expansion of the visible area. | 22 // Maximum predictive expansion of the visible area. |
23 static const int kMaxPredictiveTilesCount = 2; | 23 static const int kMaxPredictiveTilesCount = 2; |
24 | 24 |
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
879 gfx::Rect prepaint_rect = visible_content_rect(); | 879 gfx::Rect prepaint_rect = visible_content_rect(); |
880 prepaint_rect.Inset(-tiler_->tile_size().width() * kPrepaintColumns, | 880 prepaint_rect.Inset(-tiler_->tile_size().width() * kPrepaintColumns, |
881 -tiler_->tile_size().height() * kPrepaintRows); | 881 -tiler_->tile_size().height() * kPrepaintRows); |
882 gfx::Rect content_rect(content_bounds()); | 882 gfx::Rect content_rect(content_bounds()); |
883 prepaint_rect.Intersect(content_rect); | 883 prepaint_rect.Intersect(content_rect); |
884 | 884 |
885 return prepaint_rect; | 885 return prepaint_rect; |
886 } | 886 } |
887 | 887 |
888 } // namespace cc | 888 } // namespace cc |
OLD | NEW |