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

Unified Diff: cc/layers/surface_layer_impl_unittest.cc

Issue 2817833002: Replacing ScaleToEnclosedRect with ScaleToEnclosingRect (Closed)
Patch Set: Modified unit test to add test case that would fail without this patch Created 3 years, 7 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/layers/surface_layer_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/surface_layer_impl_unittest.cc
diff --git a/cc/layers/surface_layer_impl_unittest.cc b/cc/layers/surface_layer_impl_unittest.cc
index 8bebf597e6c3009e9724f9df6d40dc2312adcb47..b8c332cd408f47fffb2388d66cf9060181c87201 100644
--- a/cc/layers/surface_layer_impl_unittest.cc
+++ b/cc/layers/surface_layer_impl_unittest.cc
@@ -20,12 +20,12 @@ namespace {
static constexpr FrameSinkId kArbitraryFrameSinkId(1, 1);
TEST(SurfaceLayerImplTest, OcclusionWithDeviceScaleFactor) {
- float device_scale_factor = 1.25f;
+ float device_scale_factor = 1.33f;
- gfx::Size layer_size(1000, 1000);
+ gfx::Size layer_size(512, 512);
gfx::Size scaled_surface_size(
gfx::ScaleToCeiledSize(layer_size, device_scale_factor));
- gfx::Size viewport_size(1250, 1325);
+ gfx::Size viewport_size(681, 750);
const LocalSurfaceId kArbitraryLocalSurfaceId(
9, base::UnguessableToken::Create());
@@ -67,7 +67,7 @@ TEST(SurfaceLayerImplTest, OcclusionWithDeviceScaleFactor) {
{
SCOPED_TRACE("Partial occlusion");
- gfx::Rect occluded(gfx::ScaleToEnclosingRect(gfx::Rect(200, 0, 800, 1000),
+ gfx::Rect occluded(gfx::ScaleToEnclosingRect(gfx::Rect(200, 0, 312, 512),
device_scale_factor));
impl.AppendQuadsWithOcclusion(surface_layer_impl, occluded);
@@ -80,7 +80,7 @@ TEST(SurfaceLayerImplTest, OcclusionWithDeviceScaleFactor) {
}
{
SCOPED_TRACE("No outside occlusion");
- gfx::Rect occluded(gfx::ScaleToEnclosingRect(gfx::Rect(0, 1000, 1250, 300),
+ gfx::Rect occluded(gfx::ScaleToEnclosingRect(gfx::Rect(0, 681, 681, 69),
device_scale_factor));
impl.AppendQuadsWithOcclusion(surface_layer_impl, occluded);
« no previous file with comments | « cc/layers/surface_layer_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698