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/layer_impl.h" | 10 #include "cc/layer_impl.h" |
11 #include "cc/layer_tree_host.h" | 11 #include "cc/layer_tree_host.h" |
| 12 #include "cc/layer_updater.h" |
12 #include "cc/overdraw_metrics.h" | 13 #include "cc/overdraw_metrics.h" |
| 14 #include "cc/prioritized_resource.h" |
| 15 #include "cc/priority_calculator.h" |
13 #include "cc/tiled_layer_impl.h" | 16 #include "cc/tiled_layer_impl.h" |
14 #include "third_party/khronos/GLES2/gl2.h" | 17 #include "third_party/khronos/GLES2/gl2.h" |
15 #include "ui/gfx/rect_conversions.h" | 18 #include "ui/gfx/rect_conversions.h" |
16 | 19 |
17 namespace cc { | 20 namespace cc { |
18 | 21 |
19 // Maximum predictive expansion of the visible area. | 22 // Maximum predictive expansion of the visible area. |
20 static const int maxPredictiveTilesCount = 2; | 23 static const int maxPredictiveTilesCount = 2; |
21 | 24 |
22 // Number of rows/columns of tiles to pre-paint. | 25 // Number of rows/columns of tiles to pre-paint. |
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
771 gfx::Rect prepaintRect = visibleContentRect(); | 774 gfx::Rect prepaintRect = visibleContentRect(); |
772 prepaintRect.Inset(-m_tiler->tileSize().width() * prepaintColumns, | 775 prepaintRect.Inset(-m_tiler->tileSize().width() * prepaintColumns, |
773 -m_tiler->tileSize().height() * prepaintRows); | 776 -m_tiler->tileSize().height() * prepaintRows); |
774 gfx::Rect contentRect(gfx::Point(), contentBounds()); | 777 gfx::Rect contentRect(gfx::Point(), contentBounds()); |
775 prepaintRect.Intersect(contentRect); | 778 prepaintRect.Intersect(contentRect); |
776 | 779 |
777 return prepaintRect; | 780 return prepaintRect; |
778 } | 781 } |
779 | 782 |
780 } // namespace cc | 783 } // namespace cc |
OLD | NEW |