Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(591)

Side by Side Diff: cc/tiled_layer.cc

Issue 11871008: cc: Stop using drawableContentRect for occlusion. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/test/render_pass_test_utils.cc ('k') | cc/tiled_layer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « cc/test/render_pass_test_utils.cc ('k') | cc/tiled_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698