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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 if (!tile) | 371 if (!tile) |
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 tile->occluded = true; | 382 tile->occluded = true; |
385 occluded_tile_count++; | 383 occluded_tile_count++; |
386 } else { | 384 } else { |
387 succeeded &= tile->managed_resource()->RequestLate(); | 385 succeeded &= tile->managed_resource()->RequestLate(); |
388 } | 386 } |
389 } | 387 } |
390 } | 388 } |
391 | 389 |
392 if (!succeeded) | 390 if (!succeeded) |
393 return; | 391 return; |
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
893 gfx::Rect prepaint_rect = visible_content_rect(); | 891 gfx::Rect prepaint_rect = visible_content_rect(); |
894 prepaint_rect.Inset(-tiler_->tile_size().width() * kPrepaintColumns, | 892 prepaint_rect.Inset(-tiler_->tile_size().width() * kPrepaintColumns, |
895 -tiler_->tile_size().height() * kPrepaintRows); | 893 -tiler_->tile_size().height() * kPrepaintRows); |
896 gfx::Rect content_rect(content_bounds()); | 894 gfx::Rect content_rect(content_bounds()); |
897 prepaint_rect.Intersect(content_rect); | 895 prepaint_rect.Intersect(content_rect); |
898 | 896 |
899 return prepaint_rect; | 897 return prepaint_rect; |
900 } | 898 } |
901 | 899 |
902 } // namespace cc | 900 } // namespace cc |
OLD | NEW |