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" |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 bool succeeded = true; | 345 bool succeeded = true; |
346 for (int j = top; j <= bottom; ++j) { | 346 for (int j = top; j <= bottom; ++j) { |
347 for (int i = left; i <= right; ++i) { | 347 for (int i = left; i <= right; ++i) { |
348 UpdatableTile* tile = tileAt(i, j); | 348 UpdatableTile* tile = tileAt(i, j); |
349 DCHECK(tile); // Did setTexturePriorities get skipped? | 349 DCHECK(tile); // Did setTexturePriorities get skipped? |
350 // FIXME: This should not ever be null. | 350 // FIXME: This should not ever be null. |
351 if (!tile) | 351 if (!tile) |
352 continue; | 352 continue; |
353 DCHECK(!tile->occluded); // Did resetUpdateState get skipped? Are we
doing more than one occlusion pass? | 353 DCHECK(!tile->occluded); // Did resetUpdateState get skipped? Are we
doing more than one occlusion pass? |
354 gfx::Rect visibleTileRect = gfx::IntersectRects(m_tiler->tileBounds(
i, j), visibleContentRect()); | 354 gfx::Rect visibleTileRect = gfx::IntersectRects(m_tiler->tileBounds(
i, j), visibleContentRect()); |
355 if (occlusion && occlusion->occluded(renderTarget(), visibleTileRect
, drawTransform(), drawTransformIsAnimating(), drawableContentRect())) { | 355 if (occlusion && occlusion->occluded(renderTarget(), visibleTileRect
, drawTransform(), drawTransformIsAnimating(), isClipped(), clipRect())) { |
356 tile->occluded = true; | 356 tile->occluded = true; |
357 occludedTileCount++; | 357 occludedTileCount++; |
358 } else { | 358 } else { |
359 succeeded &= tile->managedResource()->requestLate(); | 359 succeeded &= tile->managedResource()->requestLate(); |
360 } | 360 } |
361 } | 361 } |
362 } | 362 } |
363 | 363 |
364 if (!succeeded) | 364 if (!succeeded) |
365 return; | 365 return; |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
774 gfx::Rect prepaintRect = visibleContentRect(); | 774 gfx::Rect prepaintRect = visibleContentRect(); |
775 prepaintRect.Inset(-m_tiler->tileSize().width() * prepaintColumns, | 775 prepaintRect.Inset(-m_tiler->tileSize().width() * prepaintColumns, |
776 -m_tiler->tileSize().height() * prepaintRows); | 776 -m_tiler->tileSize().height() * prepaintRows); |
777 gfx::Rect contentRect(gfx::Point(), contentBounds()); | 777 gfx::Rect contentRect(gfx::Point(), contentBounds()); |
778 prepaintRect.Intersect(contentRect); | 778 prepaintRect.Intersect(contentRect); |
779 | 779 |
780 return prepaintRect; | 780 return prepaintRect; |
781 } | 781 } |
782 | 782 |
783 } // namespace cc | 783 } // namespace cc |
OLD | NEW |