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

Unified Diff: cc/trees/layer_tree_host_pixeltest_synchronous.cc

Issue 1036693002: cc: Fix crash while running blink layout tests with GPU rasterization (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: +test Created 5 years, 9 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/layer_tree_host_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_pixeltest_synchronous.cc
diff --git a/cc/trees/layer_tree_host_pixeltest_synchronous.cc b/cc/trees/layer_tree_host_pixeltest_synchronous.cc
index c22075f768225ce89667c3fbe473153433bf42dc..7dd6d7d856df8a162314cc17b10307dc3d34f108 100644
--- a/cc/trees/layer_tree_host_pixeltest_synchronous.cc
+++ b/cc/trees/layer_tree_host_pixeltest_synchronous.cc
@@ -44,6 +44,36 @@ TEST_F(LayerTreeHostSynchronousPixelTest, OneContentLayer) {
PIXEL_TEST_GL, root, base::FilePath(FILE_PATH_LITERAL("green.png")));
}
+class LayerTreeHostSynchronousGPUPixelTest : public LayerTreePixelTest {
enne (OOO) 2015/03/25 17:10:22 Ooh, perfect. Thanks!
+ public:
+ void InitializeSettings(LayerTreeSettings* settings) override {
+ LayerTreePixelTest::InitializeSettings(settings);
+ settings->single_thread_proxy_scheduler = false;
+ settings->gpu_rasterization_enabled = true;
+ settings->gpu_rasterization_forced = true;
+ }
+
+ void BeginTest() override {
+ LayerTreePixelTest::BeginTest();
+ PostCompositeImmediatelyToMainThread();
+ }
+};
+
+TEST_F(LayerTreeHostSynchronousGPUPixelTest, OneContentLayer) {
+ gfx::Size bounds(200, 200);
+
+ FakeContentLayerClient client;
+ SkPaint green_paint;
+ green_paint.setColor(SkColorSetARGB(255, 0, 255, 0));
+ client.add_draw_rect(gfx::RectF(bounds), green_paint);
+ scoped_refptr<PictureLayer> root = PictureLayer::Create(&client);
+ root->SetBounds(bounds);
+ root->SetIsDrawable(true);
+
+ RunSingleThreadedPixelTest(PIXEL_TEST_GL, root,
+ base::FilePath(FILE_PATH_LITERAL("green.png")));
+}
+
} // namespace
} // namespace cc
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698