Commit 7894bc2d authored by Makoto Shimazu's avatar Makoto Shimazu Committed by Commit Bot

Revert "Switching all ui/gl dependent tests to SwiftShader"

This reverts commit 9f1eb0ba.

Reason for revert: speculative revert due to cc_unittests failures
https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Linux%20Tests%20%28dbg%29%281%29%2832%29/51119

Original change's description:
> Switching all ui/gl dependent tests to SwiftShader
> 
> This cl's switches cc_unittests and viz_unittests from OSMesa
> to SwiftShader and fixes other issues related to that change.
> 
> Bug chromium:848035
> 
> Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
> Change-Id: Ib1b58e02d4df4a687ef7be57284c06097bdeca94
> Reviewed-on: https://chromium-review.googlesource.com/1070490
> Reviewed-by: Daniele Castagna <dcastagna@chromium.org>
> Reviewed-by: danakj <danakj@chromium.org>
> Reviewed-by: Antoine Labour <piman@chromium.org>
> Reviewed-by: Eric Karl <ericrk@chromium.org>
> Commit-Queue: Alexis Hétu <sugoi@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#572442}

TBR=danakj@chromium.org,sugoi@chromium.org,dcastagna@chromium.org,piman@chromium.org,ericrk@chromium.org

Change-Id: I5957fd458b172fd58d4d1fe866e4b07be600c6cb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
Reviewed-on: https://chromium-review.googlesource.com/1125599Reviewed-by: default avatarMakoto Shimazu <shimazu@chromium.org>
Commit-Queue: Makoto Shimazu <shimazu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#572485}
parent 38bb04f3
......@@ -167,8 +167,10 @@ TEST_F(TransferCacheTest, RawMemoryTransfer) {
}
TEST_F(TransferCacheTest, ImageMemoryTransfer) {
// TODO(ericrk): This test doesn't work. crbug.com/859619
// TODO(ericrk): This test doesn't work on Android. crbug.com/777628
#if defined(OS_ANDROID)
return;
#endif
auto* service_cache = ServiceTransferCache();
......
......@@ -612,13 +612,7 @@ LayerTreeTest::LayerTreeTest()
// specified (for running in a debugger).
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
if (!command_line->HasSwitch(switches::kCCLayerTreeTestNoTimeout))
#if defined(THREAD_SANITIZER)
timeout_seconds_ = 35;
#elif defined(ADDRESS_SANITIZER)
timeout_seconds_ = 10;
#else
timeout_seconds_ = 6;
#endif
timeout_seconds_ = 5;
if (command_line->HasSwitch(switches::kCCLayerTreeTestLongTimeout))
timeout_seconds_ = 5 * 60;
}
......
......@@ -320,12 +320,9 @@ TEST_P(LayerTreeHostMasksForBackgroundFiltersPixelTest,
large_error_allowed,
small_error_allowed);
base::FilePath image_name =
(test_case_ == GPU)
? base::FilePath(
FILE_PATH_LITERAL("mask_of_background_filter_gpu.png"))
: base::FilePath(FILE_PATH_LITERAL("mask_of_background_filter.png"));
RunPixelResourceTest(background, image_name);
RunPixelResourceTest(background,
base::FilePath(
FILE_PATH_LITERAL("mask_of_background_filter.png")));
}
TEST_P(LayerTreeHostMasksForBackgroundFiltersPixelTest,
......@@ -677,13 +674,9 @@ TEST_P(LayerTreeHostMaskAsBlendingPixelTest, RotatedClippedCircle) {
mask_layer->SetBlendMode(SkBlendMode::kDstIn);
mask_isolation->AddChild(mask_layer);
base::FilePath image_name =
(test_type_ == PIXEL_TEST_SOFTWARE)
? base::FilePath(
FILE_PATH_LITERAL("mask_as_blending_rotated_circle.png"))
: base::FilePath(
FILE_PATH_LITERAL("mask_as_blending_rotated_circle_gl.png"));
RunPixelResourceTest(root, image_name);
RunPixelResourceTest(
root,
base::FilePath(FILE_PATH_LITERAL("mask_as_blending_rotated_circle.png")));
}
TEST_P(LayerTreeHostMaskAsBlendingPixelTest, RotatedClippedCircleUnderflow) {
......@@ -724,13 +717,9 @@ TEST_P(LayerTreeHostMaskAsBlendingPixelTest, RotatedClippedCircleUnderflow) {
mask_layer->SetBlendMode(SkBlendMode::kDstIn);
mask_isolation->AddChild(mask_layer);
base::FilePath image_name =
(test_type_ == PIXEL_TEST_SOFTWARE)
? base::FilePath(FILE_PATH_LITERAL(
"mask_as_blending_rotated_circle_underflow.png"))
: base::FilePath(FILE_PATH_LITERAL(
"mask_as_blending_rotated_circle_underflow_gl.png"));
RunPixelResourceTest(root, image_name);
RunPixelResourceTest(root,
base::FilePath(FILE_PATH_LITERAL(
"mask_as_blending_rotated_circle_underflow.png")));
}
TEST_P(LayerTreeHostMasksForBackgroundFiltersPixelTest,
......
......@@ -2287,7 +2287,7 @@ TYPED_TEST(RendererPixelTest, EnlargedRenderPassTextureWithAntiAliasing) {
EXPECT_TRUE(this->RunPixelTest(
&pass_list,
base::FilePath(FILE_PATH_LITERAL("blue_yellow_anti_aliasing.png")),
cc::FuzzyPixelComparator(true, 100.f, 0.f, 5.f, 7, 0)));
cc::FuzzyPixelComparator(true, 100.f, 0.f, 5.f, 5, 0)));
}
// This tests the case where we have a RenderPass with a mask, but the quad
......
components/viz/test/data/axis_aligned.png

670 Bytes | W: | H:

components/viz/test/data/axis_aligned.png

672 Bytes | W: | H:

components/viz/test/data/axis_aligned.png
components/viz/test/data/axis_aligned.png
components/viz/test/data/axis_aligned.png
components/viz/test/data/axis_aligned.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -301,15 +301,6 @@ GpuVideoAcceleratorFactoriesImpl::VideoFrameOutputFormat(size_t bit_depth) {
DCHECK(task_runner_->BelongsToCurrentThread());
if (CheckContextLost())
return media::GpuVideoAcceleratorFactories::OutputFormat::UNDEFINED;
#if defined(OS_CHROMEOS) && defined(USE_OZONE)
// TODO(sugoi): This configuration is currently used only for testing ChromeOS
// on Linux and doesn't support hardware acceleration. OSMesa did not support
// any hardware acceleration here, so this was never an issue, but SwiftShader
// revealed this issue. See https://crbug.com/859946
if (gpu_channel_host_->gpu_info().gl_renderer.find("SwiftShader") !=
std::string::npos)
return media::GpuVideoAcceleratorFactories::OutputFormat::UNDEFINED;
#endif
auto capabilities = context_provider_->ContextCapabilities();
if (bit_depth > 8) {
// If high bit depth rendering is enabled, bail here, otherwise try and use
......
......@@ -12,7 +12,8 @@ import("//testing/test.gni")
declare_args() {
enable_swiftshader =
(is_win || (is_linux && use_x11) || (is_mac && use_egl) || is_chromeos) &&
(is_win || (is_linux && use_x11) || (is_mac && use_egl) ||
(is_chromeos && ozone_platform_x11)) &&
(target_cpu == "x86" || target_cpu == "x64")
}
......
......@@ -20,7 +20,6 @@
#include "base/strings/string_util.h"
#include "build/build_config.h"
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_features.h"
#include "ui/gl/gl_gl_api_implementation.h"
#include "ui/gl/gl_version_info.h"
......@@ -122,9 +121,9 @@ GLImplementation GetNamedGLImplementation(const std::string& name) {
}
GLImplementation GetSoftwareGLImplementation() {
#if (BUILDFLAG(ENABLE_SWIFTSHADER) && \
(defined(OS_WIN) || defined(OS_LINUX) || \
(defined(OS_MACOSX) && defined(USE_EGL))))
#if (defined(OS_WIN) || \
(defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(USE_OZONE)) || \
(defined(OS_MACOSX) && defined(USE_EGL)))
return kGLImplementationSwiftShaderGL;
#else
return kGLImplementationOSMesaGL;
......
......@@ -64,7 +64,10 @@ void InitializeOneOffHelper(bool init_extensions) {
GLImplementation impl = allowed_impls[0];
if (use_software_gl)
impl = gl::GetSoftwareGLImplementation();
impl = kGLImplementationOSMesaGL; // FIXME(sugoi): change to
// gl::GetSoftwareGLImplementation() when
// SwiftShader is used for Layout Tests
// on all platforms
DCHECK(!base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseGL))
<< "kUseGL has not effect in tests";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment