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

Unified Diff: cc/resources/picture_layer_tiling.cc

Issue 547723002: Reland of: cc: Add occlusion checker as a fixed view of occlusion tracker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: with test? Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: cc/resources/picture_layer_tiling.cc
diff --git a/cc/resources/picture_layer_tiling.cc b/cc/resources/picture_layer_tiling.cc
index 3dde0c21e368111911600b630ea8037c7030458c..27b1c160d419c9c9ff25dc20ad25c5039ad40700 100644
--- a/cc/resources/picture_layer_tiling.cc
+++ b/cc/resources/picture_layer_tiling.cc
@@ -15,7 +15,7 @@
#include "cc/base/math_util.h"
#include "cc/resources/tile.h"
#include "cc/resources/tile_priority.h"
-#include "cc/trees/occlusion_tracker.h"
+#include "cc/trees/occlusion_checker.h"
danakj 2014/09/09 15:14:39 already in the .h
vmpstr 2014/09/09 21:56:56 Done.
#include "ui/gfx/point_conversions.h"
#include "ui/gfx/rect_conversions.h"
#include "ui/gfx/safe_integer_conversions.h"
@@ -532,9 +532,7 @@ void PictureLayerTiling::UpdateTilePriorities(
const gfx::Rect& visible_layer_rect,
float ideal_contents_scale,
double current_frame_time_in_seconds,
- const OcclusionTracker<LayerImpl>* occlusion_tracker,
- const LayerImpl* render_target,
- const gfx::Transform& draw_transform) {
+ const OcclusionChecker<LayerImpl>& occlusion_checker_in_layer_space) {
if (!NeedsUpdateForFrameAtTime(current_frame_time_in_seconds)) {
// This should never be zero for the purposes of has_ever_been_updated().
DCHECK_NE(current_frame_time_in_seconds, 0.0);
@@ -597,16 +595,11 @@ void PictureLayerTiling::UpdateTilePriorities(
tile->SetPriority(tree, now_priority);
// Set whether tile is occluded or not.
- bool is_occluded = false;
- if (occlusion_tracker) {
- gfx::Rect tile_query_rect = ScaleToEnclosingRect(
- IntersectRects(tile->content_rect(), visible_rect_in_content_space),
- 1.0f / contents_scale_);
- // TODO(vmpstr): Remove render_target and draw_transform from the
- // parameters so they can be hidden from the tiling.
- is_occluded = occlusion_tracker->Occluded(
- render_target, tile_query_rect, draw_transform);
- }
+ gfx::Rect tile_query_rect = ScaleToEnclosingRect(
+ IntersectRects(tile->content_rect(), visible_rect_in_content_space),
+ 1.0f / contents_scale_);
+ bool is_occluded =
+ occlusion_checker_in_layer_space.Occluded(tile_query_rect);
tile->set_is_occluded(tree, is_occluded);
}

Powered by Google App Engine
This is Rietveld 408576698