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/layers/tiled_layer.h" | 5 #include "cc/layers/tiled_layer.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 continue; | 372 continue; |
373 // Did ResetUpdateState get skipped? Are we doing more than one occlusion | 373 // Did ResetUpdateState get skipped? Are we doing more than one occlusion |
374 // pass? | 374 // pass? |
375 DCHECK(!tile->occluded); | 375 DCHECK(!tile->occluded); |
376 gfx::Rect visible_tile_rect = gfx::IntersectRects( | 376 gfx::Rect visible_tile_rect = gfx::IntersectRects( |
377 tiler_->tile_bounds(i, j), visible_content_rect()); | 377 tiler_->tile_bounds(i, j), visible_content_rect()); |
378 if (occlusion && occlusion->Occluded(render_target(), | 378 if (occlusion && occlusion->Occluded(render_target(), |
379 visible_tile_rect, | 379 visible_tile_rect, |
380 draw_transform(), | 380 draw_transform(), |
381 draw_transform_is_animating(), | 381 draw_transform_is_animating(), |
382 is_clipped(), | |
383 clip_rect(), | |
384 NULL)) { | 382 NULL)) { |
385 tile->occluded = true; | 383 tile->occluded = true; |
386 occluded_tile_count++; | 384 occluded_tile_count++; |
387 } else { | 385 } else { |
388 succeeded &= tile->managed_resource()->RequestLate(); | 386 succeeded &= tile->managed_resource()->RequestLate(); |
389 } | 387 } |
390 } | 388 } |
391 } | 389 } |
392 | 390 |
393 if (!succeeded) | 391 if (!succeeded) |
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
894 gfx::Rect prepaint_rect = visible_content_rect(); | 892 gfx::Rect prepaint_rect = visible_content_rect(); |
895 prepaint_rect.Inset(-tiler_->tile_size().width() * kPrepaintColumns, | 893 prepaint_rect.Inset(-tiler_->tile_size().width() * kPrepaintColumns, |
896 -tiler_->tile_size().height() * kPrepaintRows); | 894 -tiler_->tile_size().height() * kPrepaintRows); |
897 gfx::Rect content_rect(content_bounds()); | 895 gfx::Rect content_rect(content_bounds()); |
898 prepaint_rect.Intersect(content_rect); | 896 prepaint_rect.Intersect(content_rect); |
899 | 897 |
900 return prepaint_rect; | 898 return prepaint_rect; |
901 } | 899 } |
902 | 900 |
903 } // namespace cc | 901 } // namespace cc |
OLD | NEW |