aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--BUILD.gn13
-rw-r--r--dm/DMGpuSupport.h1
-rw-r--r--infra/bots/jobs.json1
-rw-r--r--infra/bots/recipe_modules/flavor/examples/full.expected/Build-Debian9-GCC-x86_64-Release-Mesa.json56
-rw-r--r--infra/bots/recipe_modules/flavor/examples/full.py1
-rw-r--r--infra/bots/recipe_modules/flavor/gn_flavor.py2
-rw-r--r--infra/bots/recipes/compile.expected/Build-Debian9-GCC-x86_64-Release-Mesa.json186
-rw-r--r--infra/bots/recipes/compile.py1
-rw-r--r--infra/bots/tasks.json29
-rw-r--r--public.bzl2
-rw-r--r--src/gpu/gl/mesa/osmesa_wrapper.h15
-rw-r--r--tests/TestConfigParsing.cpp9
-rw-r--r--tools/fiddle/mesa_context.cpp31
-rw-r--r--tools/flags/SkCommonFlagsConfig.cpp12
-rw-r--r--tools/gpu/GrContextFactory.cpp8
-rw-r--r--tools/gpu/GrContextFactory.h3
-rw-r--r--tools/gpu/gl/mesa/GLTestContext_mesa.cpp156
-rw-r--r--tools/gpu/gl/mesa/GLTestContext_mesa.h17
-rw-r--r--tools/gpu/gl/mesa/osmesa_wrapper.h16
-rwxr-xr-xtools/install_dependencies.sh1
-rw-r--r--tools/skiaserve/Request.cpp8
21 files changed, 0 insertions, 568 deletions
diff --git a/BUILD.gn b/BUILD.gn
index bd3e9b8092..f629c67834 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -27,7 +27,6 @@ declare_args() {
skia_use_libpng = true
skia_use_libwebp = !is_fuchsia
skia_use_lua = false
- skia_use_mesa = false
skia_use_piex = !is_win
skia_use_zlib = true
skia_use_metal = false
@@ -897,8 +896,6 @@ if (skia_enable_tools) {
}
if (skia_enable_gpu && target_cpu == "x64") {
- # Our bots only have 64-bit libOSMesa installed.
- # TODO: worth fixing?
executable("fiddle") {
libs = []
sources = [
@@ -908,11 +905,6 @@ if (skia_enable_tools) {
if (skia_use_egl) {
sources += [ "tools/fiddle/egl_context.cpp" ]
- } else if (skia_use_mesa) {
- sources += [ "tools/fiddle/mesa_context.cpp" ]
- if (is_linux) {
- libs += [ "OSMesa" ]
- }
} else {
sources += [ "tools/fiddle/null_context.cpp" ]
}
@@ -1044,11 +1036,6 @@ if (skia_enable_tools) {
deps += [ "//third_party/angle2" ]
sources += [ "tools/gpu/gl/angle/GLTestContext_angle.cpp" ]
}
- if (skia_use_mesa) {
- public_defines += [ "SK_MESA" ]
- sources += [ "tools/gpu/gl/mesa/GLTestContext_mesa.cpp" ]
- libs += [ "OSMesa" ]
- }
if (skia_use_vulkan) {
sources += [ "tools/gpu/vk/VkTestContext.cpp" ]
sources += [ "tools/gpu/vk/VkTestUtils.cpp" ]
diff --git a/dm/DMGpuSupport.h b/dm/DMGpuSupport.h
index 7b1fb0d61d..a552d69f70 100644
--- a/dm/DMGpuSupport.h
+++ b/dm/DMGpuSupport.h
@@ -72,7 +72,6 @@ public:
kANGLE_GL_ContextType = 0,
kCommandBuffer_ContextType = 0,
kDebugGL_ContextType = 0,
- kMESA_ContextType = 0,
kNVPR_ContextType = 0,
kNativeGL_ContextType = 0,
kGL_ContextType = 0,
diff --git a/infra/bots/jobs.json b/infra/bots/jobs.json
index 82eb9cb0fb..cd3d8b92f0 100644
--- a/infra/bots/jobs.json
+++ b/infra/bots/jobs.json
@@ -51,7 +51,6 @@
"Build-Debian9-GCC-x86_64-Release",
"Build-Debian9-GCC-x86_64-Release-ANGLE",
"Build-Debian9-GCC-x86_64-Release-Flutter_Android",
- "Build-Debian9-GCC-x86_64-Release-Mesa",
"Build-Debian9-GCC-x86_64-Release-NoGPU",
"Build-Debian9-GCC-x86_64-Release-PDFium",
"Build-Debian9-GCC-x86_64-Release-PDFium_SkiaPaths",
diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/Build-Debian9-GCC-x86_64-Release-Mesa.json b/infra/bots/recipe_modules/flavor/examples/full.expected/Build-Debian9-GCC-x86_64-Release-Mesa.json
deleted file mode 100644
index 3f62c184e0..0000000000
--- a/infra/bots/recipe_modules/flavor/examples/full.expected/Build-Debian9-GCC-x86_64-Release-Mesa.json
+++ /dev/null
@@ -1,56 +0,0 @@
-[
- {
- "cmd": [
- "python",
- "-u",
- "[CUSTOM_/_B_WORK]/skia/bin/fetch-gn"
- ],
- "cwd": "[CUSTOM_/_B_WORK]/skia",
- "env": {
- "BUILDTYPE": "Release",
- "CHROME_HEADLESS": "1",
- "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
- "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Debian9-GCC-x86_64-Release-Mesa"
- },
- "infra_step": true,
- "name": "fetch-gn"
- },
- {
- "cmd": [
- "[CUSTOM_/_B_WORK]/skia/bin/gn",
- "gen",
- "[CUSTOM_/_B_WORK]/skia/out/Build-Debian9-GCC-x86_64-Release-Mesa/Release",
- "--args=cc=\"gcc\" cxx=\"g++\" is_debug=false skia_use_mesa=true target_cpu=\"x86_64\""
- ],
- "cwd": "[CUSTOM_/_B_WORK]/skia",
- "env": {
- "BUILDTYPE": "Release",
- "CHROME_HEADLESS": "1",
- "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
- "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Debian9-GCC-x86_64-Release-Mesa"
- },
- "name": "gn gen"
- },
- {
- "cmd": [
- "ninja",
- "-k",
- "0",
- "-C",
- "[CUSTOM_/_B_WORK]/skia/out/Build-Debian9-GCC-x86_64-Release-Mesa/Release"
- ],
- "cwd": "[CUSTOM_/_B_WORK]/skia",
- "env": {
- "BUILDTYPE": "Release",
- "CHROME_HEADLESS": "1",
- "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
- "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Debian9-GCC-x86_64-Release-Mesa"
- },
- "name": "ninja"
- },
- {
- "name": "$result",
- "recipe_result": null,
- "status_code": 0
- }
-] \ No newline at end of file
diff --git a/infra/bots/recipe_modules/flavor/examples/full.py b/infra/bots/recipe_modules/flavor/examples/full.py
index 7fdae65fe9..c3e54d562a 100644
--- a/infra/bots/recipe_modules/flavor/examples/full.py
+++ b/infra/bots/recipe_modules/flavor/examples/full.py
@@ -67,7 +67,6 @@ TEST_BUILDERS = [
'Build-Debian9-EMCC-wasm-Release',
'Build-Debian9-GCC-x86_64-Release-ANGLE',
'Build-Debian9-GCC-x86_64-Release-Flutter_Android',
- 'Build-Debian9-GCC-x86_64-Release-Mesa',
'Build-Debian9-GCC-x86_64-Release-NoGPU',
'Build-Debian9-GCC-x86_64-Release-PDFium',
'Build-Debian9-GCC-x86_64-Release-PDFium_SkiaPaths',
diff --git a/infra/bots/recipe_modules/flavor/gn_flavor.py b/infra/bots/recipe_modules/flavor/gn_flavor.py
index c7ee513a92..be2b5a81c9 100644
--- a/infra/bots/recipe_modules/flavor/gn_flavor.py
+++ b/infra/bots/recipe_modules/flavor/gn_flavor.py
@@ -95,8 +95,6 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils):
args['skia_use_fontconfig'] = 'false'
if 'ASAN' in extra_config or 'UBSAN' in extra_config:
args['skia_enable_spirv_validation'] = 'false'
- if extra_config == 'Mesa':
- args['skia_use_mesa'] = 'true'
if extra_config == 'Mini':
args.update({
'is_component_build': 'true', # Proves we can link a coherent .so.
diff --git a/infra/bots/recipes/compile.expected/Build-Debian9-GCC-x86_64-Release-Mesa.json b/infra/bots/recipes/compile.expected/Build-Debian9-GCC-x86_64-Release-Mesa.json
deleted file mode 100644
index a61cb62a5a..0000000000
--- a/infra/bots/recipes/compile.expected/Build-Debian9-GCC-x86_64-Release-Mesa.json
+++ /dev/null
@@ -1,186 +0,0 @@
-[
- {
- "cmd": [
- "python",
- "-u",
- "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
- "--json-output",
- "/path/to/tmp/json",
- "ensure-directory",
- "--mode",
- "0777",
- "[CUSTOM_/_B_WORK]"
- ],
- "infra_step": true,
- "name": "makedirs checkout_path"
- },
- {
- "cmd": [
- "python",
- "-u",
- "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
- "--json-output",
- "/path/to/tmp/json",
- "remove",
- "[CUSTOM_/_B_WORK]/.gclient_entries"
- ],
- "infra_step": true,
- "name": "remove [CUSTOM_/_B_WORK]/.gclient_entries"
- },
- {
- "cmd": [
- "python",
- "-u",
- "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py",
- "--spec-path",
- "cache_dir = '[CUSTOM_/_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]",
- "--patch_root",
- "skia",
- "--revision_mapping_file",
- "{\"got_revision\": \"skia\"}",
- "--git-cache-dir",
- "[CUSTOM_/_B_CACHE]",
- "--cleanup-dir",
- "[CLEANUP]/bot_update",
- "--output_json",
- "/path/to/tmp/json",
- "--revision",
- "skia@abc123"
- ],
- "cwd": "[CUSTOM_/_B_WORK]",
- "env_prefixes": {
- "PATH": [
- "RECIPE_PACKAGE_REPO[depot_tools]"
- ]
- },
- "infra_step": true,
- "name": "bot_update",
- "~followup_annotations": [
- "@@@STEP_TEXT@Some step text@@@",
- "@@@STEP_LOG_LINE@json.output@{@@@",
- "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@",
- "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"skia\": \"abc123\"@@@",
- "@@@STEP_LOG_LINE@json.output@ }, @@@",
- "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/skia.git\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@",
- "@@@STEP_LOG_LINE@json.output@ }@@@",
- "@@@STEP_LOG_LINE@json.output@ }, @@@",
- "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@",
- "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"skia\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@",
- "@@@STEP_LOG_LINE@json.output@ }, @@@",
- "@@@STEP_LOG_LINE@json.output@ \"root\": \"skia\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"source_manifest\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"git_checkout\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"repo_url\": \"https://fake.org/skia.git\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@",
- "@@@STEP_LOG_LINE@json.output@ }@@@",
- "@@@STEP_LOG_LINE@json.output@ }, @@@",
- "@@@STEP_LOG_LINE@json.output@ \"version\": 0@@@",
- "@@@STEP_LOG_LINE@json.output@ }, @@@",
- "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@",
- "@@@STEP_LOG_LINE@json.output@}@@@",
- "@@@STEP_LOG_END@json.output@@@",
- "@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@",
- "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@"
- ]
- },
- {
- "cmd": [
- "python",
- "-u",
- "[CUSTOM_/_B_WORK]/skia/bin/fetch-gn"
- ],
- "cwd": "[CUSTOM_/_B_WORK]/skia",
- "env": {
- "BUILDTYPE": "Release",
- "CHROME_HEADLESS": "1",
- "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
- "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Debian9-GCC-x86_64-Release-Mesa"
- },
- "infra_step": true,
- "name": "fetch-gn"
- },
- {
- "cmd": [
- "[CUSTOM_/_B_WORK]/skia/bin/gn",
- "gen",
- "[CUSTOM_/_B_WORK]/skia/out/Build-Debian9-GCC-x86_64-Release-Mesa/Release",
- "--args=cc=\"gcc\" cxx=\"g++\" is_debug=false skia_use_mesa=true target_cpu=\"x86_64\""
- ],
- "cwd": "[CUSTOM_/_B_WORK]/skia",
- "env": {
- "BUILDTYPE": "Release",
- "CHROME_HEADLESS": "1",
- "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
- "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Debian9-GCC-x86_64-Release-Mesa"
- },
- "name": "gn gen"
- },
- {
- "cmd": [
- "ninja",
- "-k",
- "0",
- "-C",
- "[CUSTOM_/_B_WORK]/skia/out/Build-Debian9-GCC-x86_64-Release-Mesa/Release"
- ],
- "cwd": "[CUSTOM_/_B_WORK]/skia",
- "env": {
- "BUILDTYPE": "Release",
- "CHROME_HEADLESS": "1",
- "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
- "SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Debian9-GCC-x86_64-Release-Mesa"
- },
- "name": "ninja"
- },
- {
- "cmd": [
- "python",
- "-u",
- "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['dm', 'dm.exe', 'dm.app', 'nanobench.app', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products_whitelist:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print 'Copying build product %s to %s' % (f, dst_path)\n shutil.move(f, dst_path)\n",
- "[CUSTOM_/_B_WORK]/skia/out/Build-Debian9-GCC-x86_64-Release-Mesa/Release",
- "[CUSTOM_[SWARM_OUT_DIR]]/out/Release"
- ],
- "infra_step": true,
- "name": "copy build products",
- "~followup_annotations": [
- "@@@STEP_LOG_LINE@python.inline@import errno@@@",
- "@@@STEP_LOG_LINE@python.inline@import glob@@@",
- "@@@STEP_LOG_LINE@python.inline@import os@@@",
- "@@@STEP_LOG_LINE@python.inline@import shutil@@@",
- "@@@STEP_LOG_LINE@python.inline@import sys@@@",
- "@@@STEP_LOG_LINE@python.inline@@@@",
- "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@",
- "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@",
- "@@@STEP_LOG_LINE@python.inline@build_products_whitelist = ['dm', 'dm.exe', 'dm.app', 'nanobench.app', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'lib/*.so', 'iOSShell.app', 'iOSShell.ipa', 'visualbench', 'visualbench.exe', 'vulkan-1.dll']@@@",
- "@@@STEP_LOG_LINE@python.inline@@@@",
- "@@@STEP_LOG_LINE@python.inline@try:@@@",
- "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@",
- "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@",
- "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@",
- "@@@STEP_LOG_LINE@python.inline@ raise@@@",
- "@@@STEP_LOG_LINE@python.inline@@@@",
- "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@",
- "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@",
- "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@",
- "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@",
- "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@",
- "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@",
- "@@@STEP_LOG_LINE@python.inline@ print 'Copying build product %s to %s' % (f, dst_path)@@@",
- "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@",
- "@@@STEP_LOG_END@python.inline@@@"
- ]
- },
- {
- "name": "$result",
- "recipe_result": null,
- "status_code": 0
- }
-] \ No newline at end of file
diff --git a/infra/bots/recipes/compile.py b/infra/bots/recipes/compile.py
index af9e560f9c..d958ee881e 100644
--- a/infra/bots/recipes/compile.py
+++ b/infra/bots/recipes/compile.py
@@ -96,7 +96,6 @@ TEST_BUILDERS = [
'Build-Debian9-GCC-x86_64-Debug-NoGPU',
'Build-Debian9-GCC-x86_64-Release-ANGLE',
'Build-Debian9-GCC-x86_64-Release-Flutter_Android',
- 'Build-Debian9-GCC-x86_64-Release-Mesa',
'Build-Debian9-GCC-x86_64-Release-PDFium',
'Build-Debian9-GCC-x86_64-Release-PDFium_SkiaPaths',
'Build-Debian9-GCC-x86_64-Release-Shared',
diff --git a/infra/bots/tasks.json b/infra/bots/tasks.json
index d93ba97057..b5346398e4 100644
--- a/infra/bots/tasks.json
+++ b/infra/bots/tasks.json
@@ -313,12 +313,6 @@
],
"trigger": "master"
},
- "Build-Debian9-GCC-x86_64-Release-Mesa": {
- "priority": 0.8,
- "tasks": [
- "Build-Debian9-GCC-x86_64-Release-Mesa"
- ]
- },
"Build-Debian9-GCC-x86_64-Release-NoGPU": {
"priority": 0.8,
"tasks": [
@@ -4592,29 +4586,6 @@
"isolate": "compile_skia.isolate",
"priority": 0.8
},
- "Build-Debian9-GCC-x86_64-Release-Mesa": {
- "dimensions": [
- "cpu:x86-64-Haswell_GCE",
- "gpu:none",
- "os:Debian-9.1",
- "pool:Skia"
- ],
- "extra_args": [
- "--workdir",
- "../../..",
- "compile",
- "repository=<(REPO)",
- "buildername=Build-Debian9-GCC-x86_64-Release-Mesa",
- "swarm_out_dir=${ISOLATED_OUTDIR}",
- "revision=<(REVISION)",
- "patch_repo=<(PATCH_REPO)",
- "patch_storage=<(PATCH_STORAGE)",
- "patch_issue=<(ISSUE)",
- "patch_set=<(PATCHSET)"
- ],
- "isolate": "compile_skia.isolate",
- "priority": 0.8
- },
"Build-Debian9-GCC-x86_64-Release-NoGPU": {
"dimensions": [
"cpu:x86-64-Haswell_GCE",
diff --git a/public.bzl b/public.bzl
index 2d23bd76d8..f455981485 100644
--- a/public.bzl
+++ b/public.bzl
@@ -238,7 +238,6 @@ BASE_SRCS_ALL = struct(
"src/gpu/gl/GrGLDefaultInterface_none.cpp",
# Exclude files that don't compile with the current DEFINES.
- "src/gpu/gl/mesa/*", # Requires SK_MESA define.
"src/svg/**/*", # Depends on XML.
"src/xml/**/*",
@@ -476,7 +475,6 @@ DM_SRCS_ALL = struct(
"tools/gpu/gl/glx/*",
"tools/gpu/gl/iOS/*",
"tools/gpu/gl/mac/*",
- "tools/gpu/gl/mesa/*",
"tools/gpu/gl/win/*",
"tools/timer/SysTimer_mach.cpp",
"tools/timer/SysTimer_windows.cpp",
diff --git a/src/gpu/gl/mesa/osmesa_wrapper.h b/src/gpu/gl/mesa/osmesa_wrapper.h
deleted file mode 100644
index 4bb70a4739..0000000000
--- a/src/gpu/gl/mesa/osmesa_wrapper.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- * Copyright 2013 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-// Older versions of XQuartz have a bug where a header included by osmesa.h
-// defines GL_GLEXT_PROTOTYPES. This will cause a redefinition warning if
-// the file that includes osmesa.h already defined it. XCode 3 uses a version
-// of gcc (4.2.1) that does not support the diagnostic pragma to disable a
-// warning (added in 4.2.4). So we use the system_header pragma to shut GCC
-// up about warnings in osmesa.h
-#pragma GCC system_header
-#include <GL/osmesa.h>
diff --git a/tests/TestConfigParsing.cpp b/tests/TestConfigParsing.cpp
index 8e2276c51a..22d79aa6dc 100644
--- a/tests/TestConfigParsing.cpp
+++ b/tests/TestConfigParsing.cpp
@@ -237,11 +237,7 @@ DEF_TEST(ParseConfigs_DefaultConfigs, reporter) {
GrContextFactory::kGL_ContextType);
REPORTER_ASSERT(reporter, configs[46]->asConfigGpu()->getColorType() == kRGB_565_SkColorType);
REPORTER_ASSERT(reporter, configs[46]->asConfigGpu()->getAlphaType() == kOpaque_SkAlphaType);
-#if SK_MESA
- REPORTER_ASSERT(reporter, configs[23]->asConfigGpu());
-#else
REPORTER_ASSERT(reporter, !configs[22]->asConfigGpu());
-#endif
REPORTER_ASSERT(reporter, configs[26]->asConfigGpu());
REPORTER_ASSERT(reporter, configs[27]->asConfigGpu());
REPORTER_ASSERT(reporter, configs[27]->asConfigGpu()->getSamples() == 4);
@@ -295,12 +291,7 @@ DEF_TEST(ParseConfigs_ExtendedGpuConfigsCorrect, reporter) {
REPORTER_ASSERT(reporter, configs[2]->asConfigGpu()->getContextType() ==
GrContextFactory::kANGLE_GL_ES3_ContextType);
REPORTER_ASSERT(reporter, configs[2]->asConfigGpu());
-#if SK_MESA
- REPORTER_ASSERT(reporter, configs[3]->asConfigGpu()->getContextType() ==
- GrContextFactory::kMESA_ContextType);
-#else
REPORTER_ASSERT(reporter, !configs[3]->asConfigGpu());
-#endif
REPORTER_ASSERT(reporter, configs[4]->asConfigGpu()->getContextType() ==
GrContextFactory::kCommandBuffer_ContextType);
REPORTER_ASSERT(reporter, configs[5]->asConfigGpu()->getContextType() ==
diff --git a/tools/fiddle/mesa_context.cpp b/tools/fiddle/mesa_context.cpp
deleted file mode 100644
index 89902ec711..0000000000
--- a/tools/fiddle/mesa_context.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2017 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include "fiddle_main.h"
-
-#include <GL/osmesa.h>
-
-// create_grcontext implementation for Mesa.
-sk_sp<GrContext> create_grcontext(std::ostringstream &driverinfo) {
- // We just leak the OSMesaContext... the process will die soon anyway.
- if (OSMesaContext osMesaContext = OSMesaCreateContextExt(OSMESA_BGRA, 0, 0, 0, nullptr)) {
- static uint32_t buffer[16 * 16];
- OSMesaMakeCurrent(osMesaContext, &buffer, GL_UNSIGNED_BYTE, 16, 16);
- }
- driverinfo << "Mesa";
-
- auto osmesa_get = [](void* ctx, const char name[]) {
- SkASSERT(nullptr == ctx);
- SkASSERT(OSMesaGetCurrentContext());
- return OSMesaGetProcAddress(name);
- };
- sk_sp<const GrGLInterface> mesa(GrGLAssembleInterface(nullptr, osmesa_get));
- if (!mesa) {
- return nullptr;
- }
- return GrContext::MakeGL(mesa.get());
-}
diff --git a/tools/flags/SkCommonFlagsConfig.cpp b/tools/flags/SkCommonFlagsConfig.cpp
index 16fe914f77..fe9faaef1d 100644
--- a/tools/flags/SkCommonFlagsConfig.cpp
+++ b/tools/flags/SkCommonFlagsConfig.cpp
@@ -86,9 +86,6 @@ static const struct {
{ "angle_gl_es3", "gpu", "api=angle_gl_es3" },
{ "commandbuffer", "gpu", "api=commandbuffer" },
{ "mock", "gpu", "api=mock" }
-#if SK_MESA
- ,{ "mesa", "gpu", "api=mesa" }
-#endif
#ifdef SK_VULKAN
,{ "vk", "gpu", "api=vulkan" }
,{ "vksrgb", "gpu", "api=vulkan,color=srgb" }
@@ -141,9 +138,6 @@ static const char configExtendedHelp[] =
"\t\tangle_gl_es3\t\t\tUse OpenGL ES3 on the ANGLE OpenGL backend.\n"
"\t\tcommandbuffer\t\tUse command buffer.\n"
"\t\tmock\t\tUse mock context.\n"
-#if SK_MESA
- "\t\tmesa\t\t\tUse MESA.\n"
-#endif
#ifdef SK_VULKAN
"\t\tvulkan\t\t\tUse Vulkan.\n"
#endif
@@ -307,12 +301,6 @@ static bool parse_option_gpu_api(const SkString& value,
*outContextType = GrContextFactory::kMock_ContextType;
return true;
}
-#if SK_MESA
- if (value.equals("mesa")) {
- *outContextType = GrContextFactory::kMESA_ContextType;
- return true;
- }
-#endif
#ifdef SK_VULKAN
if (value.equals("vulkan")) {
*outContextType = GrContextFactory::kVulkan_ContextType;
diff --git a/tools/gpu/GrContextFactory.cpp b/tools/gpu/GrContextFactory.cpp
index 1bc4655558..21766db2b8 100644
--- a/tools/gpu/GrContextFactory.cpp
+++ b/tools/gpu/GrContextFactory.cpp
@@ -14,9 +14,6 @@
#endif
#include "gl/command_buffer/GLTestContext_command_buffer.h"
#include "gl/debug/DebugGLTestContext.h"
-#if SK_MESA
- #include "gl/mesa/GLTestContext_mesa.h"
-#endif
#ifdef SK_VULKAN
#include "vk/VkTestContext.h"
#endif
@@ -174,11 +171,6 @@ ContextInfo GrContextFactory::getContextInfoInternal(ContextType type, ContextOv
glCtx = CommandBufferGLTestContext::Create(glShareContext);
break;
#endif
-#if SK_MESA
- case kMESA_ContextType:
- glCtx = CreateMesaGLTestContext(glShareContext);
- break;
-#endif
case kNullGL_ContextType:
glCtx = CreateNullGLTestContext(
ContextOverrides::kRequireNVPRSupport & overrides, glShareContext);
diff --git a/tools/gpu/GrContextFactory.h b/tools/gpu/GrContextFactory.h
index 1073f6a594..6997ca1337 100644
--- a/tools/gpu/GrContextFactory.h
+++ b/tools/gpu/GrContextFactory.h
@@ -39,7 +39,6 @@ public:
kANGLE_GL_ES2_ContextType, //! ANGLE on OpenGL OpenGL ES 2 context.
kANGLE_GL_ES3_ContextType, //! ANGLE on OpenGL OpenGL ES 3 context.
kCommandBuffer_ContextType, //! Chromium command buffer OpenGL ES context.
- kMESA_ContextType, //! MESA OpenGL context
kNullGL_ContextType, //! Non-rendering OpenGL mock context.
kDebugGL_ContextType, //! Non-rendering, state verifying OpenGL context.
kVulkan_ContextType, //! Vulkan
@@ -107,8 +106,6 @@ public:
return "ANGLE GL ES3";
case kCommandBuffer_ContextType:
return "Command Buffer";
- case kMESA_ContextType:
- return "Mesa";
case kNullGL_ContextType:
return "Null GL";
case kDebugGL_ContextType:
diff --git a/tools/gpu/gl/mesa/GLTestContext_mesa.cpp b/tools/gpu/gl/mesa/GLTestContext_mesa.cpp
deleted file mode 100644
index 5d0014b82c..0000000000
--- a/tools/gpu/gl/mesa/GLTestContext_mesa.cpp
+++ /dev/null
@@ -1,156 +0,0 @@
-
-/*
- * Copyright 2011 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include <GL/osmesa.h>
-
-#include "gl/mesa/GLTestContext_mesa.h"
-#include "gl/GrGLDefines.h"
-
-#include "gl/GrGLAssembleInterface.h"
-#include "gl/GrGLUtil.h"
-#include "osmesa_wrapper.h"
-
-namespace {
-
-static GrGLFuncPtr osmesa_get(void* ctx, const char name[]) {
- SkASSERT(nullptr == ctx);
- SkASSERT(OSMesaGetCurrentContext());
- return OSMesaGetProcAddress(name);
-}
-
-static const GrGLInterface* create_mesa_interface() {
- if (nullptr == OSMesaGetCurrentContext()) {
- return nullptr;
- }
- return GrGLAssembleInterface(nullptr, osmesa_get);
-}
-
-static const GrGLint gBOGUS_SIZE = 16;
-
-class MesaGLContext : public sk_gpu_test::GLTestContext {
-private:
- typedef intptr_t Context;
-
-public:
- MesaGLContext(MesaGLContext* shareContext);
- ~MesaGLContext() override;
-
-private:
- void destroyGLContext();
-
- void onPlatformMakeCurrent() const override;
-
- void onPlatformSwapBuffers() const override;
-
- GrGLFuncPtr onPlatformGetProcAddress(const char *) const override;
-
- Context fContext;
- GrGLubyte *fImage;
-};
-
-MesaGLContext::MesaGLContext(MesaGLContext* shareContext)
- : fContext(static_cast<Context>(0))
- , fImage(nullptr) {
- GR_STATIC_ASSERT(sizeof(Context) == sizeof(OSMesaContext));
- OSMesaContext mesaShareContext = shareContext ? (OSMesaContext)(shareContext->fContext)
- : nullptr;
-
- /* Create an RGBA-mode context */
-#if OSMESA_MAJOR_VERSION * 100 + OSMESA_MINOR_VERSION >= 305
- /* specify Z, stencil, accum sizes */
- fContext = (Context)OSMesaCreateContextExt(OSMESA_BGRA, 0, 0, 0, mesaShareContext);
-#else
- fContext = (Context) OSMesaCreateContext(OSMESA_BGRA, mesaShareContext);
-#endif
- if (!fContext) {
- SkDebugf("OSMesaCreateContext failed!\n");
- this->destroyGLContext();
- return;
- }
- // Allocate the image buffer
- fImage = (GrGLubyte *) sk_malloc_throw(gBOGUS_SIZE * gBOGUS_SIZE *
- 4 * sizeof(GrGLubyte));
- if (!fImage) {
- SkDebugf("Alloc image buffer failed!\n");
- this->destroyGLContext();
- return;
- }
-
- // Bind the buffer to the context and make it current
- if (!OSMesaMakeCurrent((OSMesaContext) fContext,
- fImage,
- GR_GL_UNSIGNED_BYTE,
- gBOGUS_SIZE,
- gBOGUS_SIZE)) {
- SkDebugf("OSMesaMakeCurrent failed!\n");
- this->destroyGLContext();
- return;
- }
-
- sk_sp<const GrGLInterface> gl(create_mesa_interface());
- if (nullptr == gl.get()) {
- SkDebugf("Could not create GL interface!\n");
- this->destroyGLContext();
- return;
- }
-
- if (!gl->validate()) {
- SkDebugf("Could not validate GL interface!\n");
- this->destroyGLContext();
- return;
- }
-
- this->init(gl.release());
-}
-
-MesaGLContext::~MesaGLContext() {
- this->teardown();
- this->destroyGLContext();
-}
-
-void MesaGLContext::destroyGLContext() {
- if (fImage) {
- sk_free(fImage);
- fImage = nullptr;
- }
-
- if (fContext) {
- OSMesaDestroyContext((OSMesaContext) fContext);
- fContext = static_cast<Context>(0);
- }
-}
-
-
-void MesaGLContext::onPlatformMakeCurrent() const {
- if (fContext) {
- if (!OSMesaMakeCurrent((OSMesaContext) fContext, fImage,
- GR_GL_UNSIGNED_BYTE, gBOGUS_SIZE, gBOGUS_SIZE)) {
- SkDebugf("Could not make MESA context current.");
- }
- }
-}
-
-void MesaGLContext::onPlatformSwapBuffers() const { }
-
-GrGLFuncPtr MesaGLContext::onPlatformGetProcAddress(const char *procName) const {
- return OSMesaGetProcAddress(procName);
-}
-} // anonymous namespace
-
-
-namespace sk_gpu_test {
-GLTestContext *CreateMesaGLTestContext(GLTestContext* shareContext) {
- MesaGLContext* mesaShareContext = reinterpret_cast<MesaGLContext*>(shareContext);
- MesaGLContext *ctx = new MesaGLContext(mesaShareContext);
- if (!ctx->isValid()) {
- delete ctx;
- return nullptr;
- }
- return ctx;
-}
-} // sk_gpu_test
diff --git a/tools/gpu/gl/mesa/GLTestContext_mesa.h b/tools/gpu/gl/mesa/GLTestContext_mesa.h
deleted file mode 100644
index 40184aa7ea..0000000000
--- a/tools/gpu/gl/mesa/GLTestContext_mesa.h
+++ /dev/null
@@ -1,17 +0,0 @@
-
-/*
- * Copyright 2011 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-#ifndef GLTestContext_mesa_DEFINED
-#define GLTestContext_mesa_DEFINED
-
-#include "gl/GLTestContext.h"
-
-namespace sk_gpu_test {
-GLTestContext* CreateMesaGLTestContext(GLTestContext* shareContext);
-} // namespace sk_gpu_test
-
-#endif
diff --git a/tools/gpu/gl/mesa/osmesa_wrapper.h b/tools/gpu/gl/mesa/osmesa_wrapper.h
deleted file mode 100644
index 70de99376d..0000000000
--- a/tools/gpu/gl/mesa/osmesa_wrapper.h
+++ /dev/null
@@ -1,16 +0,0 @@
-
-/*
- * Copyright 2013 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-// Older versions of XQuartz have a bug where a header included by osmesa.h
-// defines GL_GLEXT_PROTOTYPES. This will cause a redefinition warning if
-// the file that includes osmesa.h already defined it. XCode 3 uses a version
-// of gcc (4.2.1) that does not support the diagnostic pragma to disable a
-// warning (added in 4.2.4). So we use the system_header pragma to shut GCC
-// up about warnings in osmesa.h
-#pragma GCC system_header
-#include <GL/osmesa.h>
diff --git a/tools/install_dependencies.sh b/tools/install_dependencies.sh
index fd5c3669d0..9d1a45fa15 100755
--- a/tools/install_dependencies.sh
+++ b/tools/install_dependencies.sh
@@ -31,7 +31,6 @@ if command -v lsb_release > /dev/null ; then
libfreetype6-dev
libgif-dev
libglu1-mesa-dev
- libosmesa6-dev
libpng12-dev
libqt4-dev
EOF
diff --git a/tools/skiaserve/Request.cpp b/tools/skiaserve/Request.cpp
index 12f3596817..6a0f4df0a9 100644
--- a/tools/skiaserve/Request.cpp
+++ b/tools/skiaserve/Request.cpp
@@ -79,10 +79,6 @@ SkCanvas* Request::getCanvas() {
gl = factory->getContextInfo(GrContextFactory::kGLES_ContextType,
GrContextFactory::ContextOverrides::kNone).glContext();
}
- if (!gl) {
- gl = factory->getContextInfo(GrContextFactory::kMESA_ContextType,
- GrContextFactory::ContextOverrides::kNone).glContext();
- }
if (gl) {
gl->makeCurrent();
}
@@ -136,10 +132,6 @@ GrContext* Request::getContext() {
result = fContextFactory->get(GrContextFactory::kGLES_ContextType,
GrContextFactory::ContextOverrides::kNone);
}
- if (!result) {
- result = fContextFactory->get(GrContextFactory::kMESA_ContextType,
- GrContextFactory::ContextOverrides::kNone);
- }
return result;
#else
return nullptr;