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

Unified Diff: cc/trees/occlusion_tracker_perftest.cc

Issue 576173003: cc: Move UnoccludedContentRect to Occlusion. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « cc/trees/occlusion_tracker.cc ('k') | cc/trees/occlusion_tracker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/occlusion_tracker_perftest.cc
diff --git a/cc/trees/occlusion_tracker_perftest.cc b/cc/trees/occlusion_tracker_perftest.cc
index d9130746de716f1d4cf68f9efd2f0bb4e71609c2..14a9ffd272d18baa7e2179330f52c765055118f0 100644
--- a/cc/trees/occlusion_tracker_perftest.cc
+++ b/cc/trees/occlusion_tracker_perftest.cc
@@ -106,11 +106,13 @@ TEST_F(OcclusionTrackerPerfTest, UnoccludedContentRect_FullyOccluded) {
transform_to_target.Translate(0, 96);
do {
+ Occlusion occlusion =
vmpstr 2014/09/17 23:19:23 I'm not sure what's more useful to benchmark here.
vmpstr 2014/09/17 23:23:47 Ignore the caching statement, that's not going to
+ tracker.GetCurrentOcclusionForLayer(transform_to_target);
for (int x = 0; x < viewport_rect.width(); x += 256) {
for (int y = 0; y < viewport_rect.height(); y += 256) {
gfx::Rect query_content_rect(x, y, 256, 256);
- gfx::Rect unoccluded = tracker.UnoccludedContentRect(
- query_content_rect, transform_to_target);
+ gfx::Rect unoccluded =
+ occlusion.GetUnoccludedContentRect(query_content_rect);
// Sanity test that we're not hitting early outs.
bool expect_empty =
query_content_rect.right() <= viewport_rect.width() &&
@@ -181,11 +183,13 @@ TEST_F(OcclusionTrackerPerfTest, UnoccludedContentRect_10OpaqueLayers) {
transform_to_target.Translate(0, 96);
do {
+ Occlusion occlusion =
+ tracker.GetCurrentOcclusionForLayer(transform_to_target);
for (int x = 0; x < viewport_rect.width(); x += 256) {
for (int y = 0; y < viewport_rect.height(); y += 256) {
gfx::Rect query_content_rect(x, y, 256, 256);
- gfx::Rect unoccluded = tracker.UnoccludedContentRect(
- query_content_rect, transform_to_target);
+ gfx::Rect unoccluded =
+ occlusion.GetUnoccludedContentRect(query_content_rect);
}
}
« no previous file with comments | « cc/trees/occlusion_tracker.cc ('k') | cc/trees/occlusion_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698