Skip to content

Commit

Permalink
Enable more cc_unittests for Skia Dawn
Browse files Browse the repository at this point in the history
Many of the cc_unittests are already passing for SkiaRenderer Dawn.
Enable all of the mirror, readback, scrollbars, synchronous, and tiles
test cases.

The partial raster test cases are failing on Linux, so set up a filter
file for them.

Bug: 1021566
Change-Id: I8d8212eccf3c9ff5cfe30fb55f92d9bda6d9d6ca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2204406
Commit-Queue: Sean Gilhuly <sgilhuly@chromium.org>
Reviewed-by: Brian Sheedy <bsheedy@chromium.org>
Reviewed-by: kylechar <kylechar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#789092}
  • Loading branch information
Sean Gilhuly authored and Commit Bot committed Jul 16, 2020
1 parent 5d7f1ac commit 3a4627d
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 7 deletions.
6 changes: 4 additions & 2 deletions cc/trees/layer_tree_host_pixeltest_mirror.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@ class LayerTreeHostMirrorPixelTest
};

const TestRendererType kRendererTypes[] = {
TestRendererType::kGL,
TestRendererType::kSkiaGL,
TestRendererType::kGL, TestRendererType::kSkiaGL,
TestRendererType::kSoftware,
#if defined(ENABLE_CC_VULKAN_TESTS)
TestRendererType::kSkiaVk,
#endif // defined(ENABLE_CC_VULKAN_TESTS)
#if defined(ENABLE_CC_DAWN_TESTS)
TestRendererType::kSkiaDawn,
#endif // defined(ENABLE_CC_DAWN_TESTS)
};

INSTANTIATE_TEST_SUITE_P(All,
Expand Down
6 changes: 6 additions & 0 deletions cc/trees/layer_tree_host_pixeltest_readback.cc
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,9 @@ ReadbackTestConfig const kTestConfigs[] = {
#if defined(ENABLE_CC_VULKAN_TESTS)
ReadbackTestConfig{TestRendererType::kSkiaVk, TestReadBackType::kBitmap},
#endif // defined(ENABLE_CC_VULKAN_TESTS)
#if defined(ENABLE_CC_DAWN_TESTS)
ReadbackTestConfig{TestRendererType::kSkiaDawn, TestReadBackType::kBitmap},
#endif // defined(ENABLE_CC_DAWN_TESTS)
};

INSTANTIATE_TEST_SUITE_P(All,
Expand All @@ -453,6 +456,9 @@ ReadbackTestConfig const kMaybeVulkanTestConfigs[] = {
!defined(MEMORY_SANITIZER)
ReadbackTestConfig{TestRendererType::kSkiaVk, TestReadBackType::kBitmap},
#endif
#if defined(ENABLE_CC_DAWN_TESTS)
ReadbackTestConfig{TestRendererType::kSkiaDawn, TestReadBackType::kBitmap},
#endif // defined(ENABLE_CC_DAWN_TESTS)
};

INSTANTIATE_TEST_SUITE_P(All,
Expand Down
6 changes: 5 additions & 1 deletion cc/trees/layer_tree_host_pixeltest_scrollbars.cc
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ TestRendererType const kRendererTypes[] = {
#if defined(ENABLE_CC_VULKAN_TESTS)
TestRendererType::kSkiaVk,
#endif // defined(ENABLE_CC_VULKAN_TESTS)
#if defined(ENABLE_CC_DAWN_TESTS)
TestRendererType::kSkiaDawn,
#endif // defined(ENABLE_CC_DAWN_TESTS)
};

INSTANTIATE_TEST_SUITE_P(All,
Expand Down Expand Up @@ -180,7 +183,8 @@ TEST_P(LayerTreeHostScrollbarsPixelTest, MAYBE_HugeTransformScale) {
scale_transform.Scale(scale, scale);
layer->SetTransform(scale_transform);

if (renderer_type_ == TestRendererType::kSkiaGL)
if (renderer_type_ == TestRendererType::kSkiaGL ||
renderer_type_ == TestRendererType::kSkiaDawn)
pixel_comparator_ = std::make_unique<FuzzyPixelOffByOneComparator>(true);

RunPixelTest(background,
Expand Down
3 changes: 3 additions & 0 deletions cc/trees/layer_tree_host_pixeltest_synchronous.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ TestRendererType const kRendererTypesGpu[] = {
#if defined(ENABLE_CC_VULKAN_TESTS)
TestRendererType::kSkiaVk,
#endif // defined(ENABLE_CC_VULKAN_TESTS)
#if defined(ENABLE_CC_DAWN_TESTS)
TestRendererType::kSkiaDawn,
#endif // defined(ENABLE_CC_DAWN_TESTS)
};

INSTANTIATE_TEST_SUITE_P(All,
Expand Down
6 changes: 6 additions & 0 deletions cc/trees/layer_tree_host_pixeltest_tiles.cc
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ std::vector<TilesTestConfig> const kTestCases = {
#if defined(ENABLE_CC_VULKAN_TESTS)
{TestRendererType::kSkiaVk, TestRasterType::kOop},
#endif // defined(ENABLE_CC_VULKAN_TESTS)
#if defined(ENABLE_CC_DAWN_TESTS)
{TestRendererType::kSkiaDawn, TestRasterType::kOop},
#endif // defined(ENABLE_CC_DAWN_TESTS)
};

INSTANTIATE_TEST_SUITE_P(All,
Expand Down Expand Up @@ -195,6 +198,9 @@ std::vector<TilesTestConfig> const kTestCasesMultiThread = {
// Vulkan in these tests.
{TestRendererType::kSkiaVk, TestRasterType::kOop},
#endif // defined(ENABLE_CC_VULKAN_TESTS)
#if defined(ENABLE_CC_DAWN_TESTS)
{TestRendererType::kSkiaDawn, TestRasterType::kOop},
#endif // defined(ENABLE_CC_DAWN_TESTS)
};

using LayerTreeHostTilesTestPartialInvalidationMultiThread =
Expand Down
3 changes: 2 additions & 1 deletion testing/buildbot/chromium.ci.json
Original file line number Diff line number Diff line change
Expand Up @@ -40838,7 +40838,8 @@
"gtest_tests": [
{
"args": [
"--no-xvfb"
"--no-xvfb",
"--test-launcher-filter-file=../../testing/buildbot/filters/gpu.linux.skiarenderer_dawn_cc_unittests.filter"
],
"merge": {
"args": [],
Expand Down
3 changes: 2 additions & 1 deletion testing/buildbot/chromium.gpu.fyi.json
Original file line number Diff line number Diff line change
Expand Up @@ -12470,7 +12470,8 @@
"gtest_tests": [
{
"args": [
"--no-xvfb"
"--no-xvfb",
"--test-launcher-filter-file=../../testing/buildbot/filters/gpu.linux.skiarenderer_dawn_cc_unittests.filter"
],
"merge": {
"args": [],
Expand Down
5 changes: 4 additions & 1 deletion testing/buildbot/filters/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
source_set("cc_unittests_filters") {
testonly = true

data = [ "//testing/buildbot/filters/android.emulator.cc_unittests.filter" ]
data = [
"//testing/buildbot/filters/android.emulator.cc_unittests.filter",
"//testing/buildbot/filters/gpu.linux.skiarenderer_dawn_cc_unittests.filter",
]
}

source_set("blink_web_tests_filter") {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# crbug.com/1088479: Partial Raster isn't supported using Skia Dawn Vulkan
-All/LayerTreeHostTilesTestPartialInvalidation.PartialRaster/6
-All/LayerTreeHostTilesTestPartialInvalidationMultiThread.PartialRaster/3
5 changes: 4 additions & 1 deletion testing/buildbot/test_suites.pyl
Original file line number Diff line number Diff line change
Expand Up @@ -2570,7 +2570,10 @@

'gpu_skia_renderer_dawn_gtests': {
'cc_unittests': {
'linux_args': ['--no-xvfb'],
'linux_args': [
'--no-xvfb',
'--test-launcher-filter-file=../../testing/buildbot/filters/gpu.linux.skiarenderer_dawn_cc_unittests.filter',
],
},
'viz_unittests': {
'linux_args': [
Expand Down

0 comments on commit 3a4627d

Please sign in to comment.