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

Unified Diff: content/browser/compositor/reflector_impl_unittest.cc

Issue 1101103004: Revert of ui: Clean up damaged rects and clear them after painting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 | « no previous file | ui/compositor/compositor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/compositor/reflector_impl_unittest.cc
diff --git a/content/browser/compositor/reflector_impl_unittest.cc b/content/browser/compositor/reflector_impl_unittest.cc
index a1dd7512e665715670c396b2426bfc3c753e7135..a8de2d2c05991714874460e92e7fc22c02d2c6d3 100644
--- a/content/browser/compositor/reflector_impl_unittest.cc
+++ b/content/browser/compositor/reflector_impl_unittest.cc
@@ -89,7 +89,8 @@
gfx::Size SurfaceSize() const override { return gfx::Size(256, 256); }
};
-const gfx::Rect kSubRect(0, 0, 64, 64);
+const gfx::Rect kSubRect = gfx::Rect(0, 0, 64, 64);
+const SkIRect kSkSubRect = SkIRect::MakeXYWH(0, 0, 64, 64);
} // namespace
@@ -158,10 +159,10 @@
SetUpReflector();
UpdateTexture();
EXPECT_TRUE(mirroring_layer_->TextureFlipped());
- gfx::Rect expected_rect =
- kSubRect + gfx::Vector2d(0, output_surface_->SurfaceSize().height()) -
- gfx::Vector2d(0, kSubRect.height());
- EXPECT_EQ(expected_rect, mirroring_layer_->damaged_region());
+ EXPECT_EQ(SkRegion(SkIRect::MakeXYWH(
+ 0, output_surface_->SurfaceSize().height() - kSubRect.height(),
+ kSubRect.width(), kSubRect.height())),
+ mirroring_layer_->damaged_region());
}
TEST_F(ReflectorImplTest, CheckInvertedOutputSurface) {
@@ -169,7 +170,7 @@
SetUpReflector();
UpdateTexture();
EXPECT_FALSE(mirroring_layer_->TextureFlipped());
- EXPECT_EQ(kSubRect, mirroring_layer_->damaged_region());
+ EXPECT_EQ(SkRegion(kSkSubRect), mirroring_layer_->damaged_region());
}
#if defined(USE_OZONE)
« no previous file with comments | « no previous file | ui/compositor/compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698