summaryrefslogtreecommitdiffstats
path: root/cc/quad_culler_unittest.cc
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-07 17:47:32 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-07 17:47:32 +0000
commit5e533c5cfd2c216d521de43b8b1635c80f06c0b9 (patch)
tree928f749b82609d398e7e02180cde2b9b597d9a54 /cc/quad_culler_unittest.cc
parent6328c43fd93905dd316f2a3562eb3eed97fc2dd3 (diff)
downloadchromium_src-5e533c5cfd2c216d521de43b8b1635c80f06c0b9.zip
chromium_src-5e533c5cfd2c216d521de43b8b1635c80f06c0b9.tar.gz
chromium_src-5e533c5cfd2c216d521de43b8b1635c80f06c0b9.tar.bz2
Turn overdraw metrics on only when about:tracing is recording.
Now that we're in chromium, we can tell if about:tracing is enabled ot not! Turn on overdraw metrics, and their expensive computations, only when about:tracing is turned on. When we do turn them on, we don't want the performance characteristics of the system to suddenly change, or the tracing is not very meaningful! So, we track the number of pixels read, instead of written, for overdraw (which should mostly be the same with the new rasterScale feature). This computation is very cheap compared to the old one. R=jamesr BUG=119126 Review URL: https://codereview.chromium.org/11293143 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166464 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/quad_culler_unittest.cc')
-rw-r--r--cc/quad_culler_unittest.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/cc/quad_culler_unittest.cc b/cc/quad_culler_unittest.cc
index c60aec6..433d489 100644
--- a/cc/quad_culler_unittest.cc
+++ b/cc/quad_culler_unittest.cc
@@ -224,7 +224,7 @@ TEST(QuadCullerTest, verifyCullCenterTileNonIntegralSize1)
appendQuads(quadList, sharedStateList, rootLayer.get(), it, occlusionTracker);
EXPECT_EQ(quadList.size(), 2u);
- EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnOpaque(), 20363, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnOpaque(), 20000, 1);
EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnTranslucent(), 0, 1);
EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsCulledForDrawing(), 0, 1);
}
@@ -252,7 +252,7 @@ TEST(QuadCullerTest, verifyCullCenterTileNonIntegralSize2)
appendQuads(quadList, sharedStateList, rootLayer.get(), it, occlusionTracker);
EXPECT_EQ(quadList.size(), 2u);
- EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnOpaque(), 19643, 1);
+ EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnOpaque(), 20000, 1);
EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsDrawnTranslucent(), 0, 1);
EXPECT_NEAR(occlusionTracker.overdrawMetrics().pixelsCulledForDrawing(), 0, 1);
}