diff --git a/infra/bots/assets/cast_toolchain/VERSION b/infra/bots/assets/cast_toolchain/VERSION index d8263ee986..bf0d87ab1b 100644 --- a/infra/bots/assets/cast_toolchain/VERSION +++ b/infra/bots/assets/cast_toolchain/VERSION @@ -1 +1 @@ -2 \ No newline at end of file +4 \ No newline at end of file diff --git a/infra/bots/gen_tasks.go b/infra/bots/gen_tasks.go index 9a919a50fd..01711f03a9 100644 --- a/infra/bots/gen_tasks.go +++ b/infra/bots/gen_tasks.go @@ -332,6 +332,7 @@ func compile(b *specs.TasksCfgBuilder, name string, parts map[string]string) str } } else if strings.Contains(name, "Chromecast") { pkgs = append(pkgs, b.MustGetCipdPackageFromAsset("cast_toolchain")) + pkgs = append(pkgs, b.MustGetCipdPackageFromAsset("chromebook_arm_gles")) } else if strings.Contains(name, "Chromebook") { pkgs = append(pkgs, b.MustGetCipdPackageFromAsset("clang_linux")) pkgs = append(pkgs, b.MustGetCipdPackageFromAsset("armhf_sysroot")) diff --git a/infra/bots/recipe_modules/flavor/example.expected/Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Release.json b/infra/bots/recipe_modules/flavor/example.expected/Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Release.json index 8d5bf64def..dc995127e5 100644 --- a/infra/bots/recipe_modules/flavor/example.expected/Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Release.json +++ b/infra/bots/recipe_modules/flavor/example.expected/Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Release.json @@ -20,7 +20,7 @@ "[START_DIR]/skia/bin/gn", "gen", "[START_DIR]/out/Release", - "--args=ar=\"[START_DIR]/cast_toolchain/bin/armv7a-cros-linux-gnueabi-ar\" cc=\"[START_DIR]/cast_toolchain/bin/armv7a-cros-linux-gnueabi-gcc\" cxx=\"[START_DIR]/cast_toolchain/bin/armv7a-cros-linux-gnueabi-g++\" extra_cflags=[\"-g0\"] extra_ldflags=[\"-static-libstdc++\", \"-static-libgcc\"] is_debug=false skia_enable_gpu=false skia_use_fontconfig=false skia_use_icu=false skia_use_system_freetype2=false target_cpu=\"None\"" + "--args=ar=\"[START_DIR]/cast_toolchain/armv7a/bin/armv7a-cros-linux-gnueabi-ar\" cc=\"[START_DIR]/cast_toolchain/armv7a/bin/armv7a-cros-linux-gnueabi-gcc\" cxx=\"[START_DIR]/cast_toolchain/armv7a/bin/armv7a-cros-linux-gnueabi-g++\" extra_cflags=[\"-I[START_DIR]/chromebook_arm_gles/include\", \"-DMESA_EGL_NO_X11_HEADERS\", \"-DEGL_NO_IMAGE_EXTERNAL\", \"-DSK_NO_COMMAND_BUFFER\", \"-Wno-error=unused-function\", \"-g0\"] extra_ldflags=[\"-static-libstdc++\", \"-static-libgcc\", \"-L[START_DIR]/cast_toolchain/armv7a/lib\"] is_debug=false skia_enable_gpu=true skia_use_egl=true skia_use_fontconfig=false skia_use_icu=false skia_use_system_freetype2=false target_cpu=\"None\"" ], "cwd": "[START_DIR]/skia", "env": { diff --git a/infra/bots/recipe_modules/flavor/gn_chromecast_flavor.py b/infra/bots/recipe_modules/flavor/gn_chromecast_flavor.py index 0296d98f43..591c78921f 100644 --- a/infra/bots/recipe_modules/flavor/gn_chromecast_flavor.py +++ b/infra/bots/recipe_modules/flavor/gn_chromecast_flavor.py @@ -20,13 +20,26 @@ class GNChromecastFlavorUtils(gn_android_flavor.GNAndroidFlavorUtils): os = self.m.vars.builder_cfg.get('os') target_arch = self.m.vars.builder_cfg.get('target_arch') - # Makes the binary small enough to fit on the small disk. - extra_cflags = ['-g0'] - # Chromecast does not package libstdc++ - extra_ldflags = ['-static-libstdc++', '-static-libgcc'] - # TODO(kjlubick): can this toolchain be replaced/shared with chromebook? - toolchain_dir = self.m.vars.slave_dir.join('cast_toolchain') + toolchain_dir = self.m.vars.slave_dir.join('cast_toolchain', 'armv7a') + gles_dir = self.m.vars.slave_dir.join('chromebook_arm_gles') + + extra_cflags = [ + '-I%s' % gles_dir.join('include'), + '-DMESA_EGL_NO_X11_HEADERS', + '-DEGL_NO_IMAGE_EXTERNAL', + "-DSK_NO_COMMAND_BUFFER", + # Avoid unused warning with yyunput + '-Wno-error=unused-function', + # Makes the binary small enough to fit on the small disk. + '-g0', + ] + + extra_ldflags = [ + # Chromecast does not package libstdc++ + '-static-libstdc++', '-static-libgcc', + '-L%s' % toolchain_dir.join('lib'), + ] quote = lambda x: '"%s"' % x args = { @@ -35,12 +48,13 @@ class GNChromecastFlavorUtils(gn_android_flavor.GNAndroidFlavorUtils): 'ar': quote(toolchain_dir.join('bin','armv7a-cros-linux-gnueabi-ar')), 'target_cpu': quote(target_arch), 'skia_use_fontconfig': 'false', - 'skia_enable_gpu': 'false', + 'skia_enable_gpu': 'true', # The toolchain won't allow system libraries to be used # when cross-compiling 'skia_use_system_freetype2': 'false', # Makes the binary smaller 'skia_use_icu': 'false', + 'skia_use_egl': 'true', } if configuration != 'Debug': diff --git a/infra/bots/recipes/compile.expected/Build-Ubuntu-GCC-arm-Release-Chromecast.json b/infra/bots/recipes/compile.expected/Build-Ubuntu-GCC-arm-Release-Chromecast.json index 30db20afae..619e3f001c 100644 --- a/infra/bots/recipes/compile.expected/Build-Ubuntu-GCC-arm-Release-Chromecast.json +++ b/infra/bots/recipes/compile.expected/Build-Ubuntu-GCC-arm-Release-Chromecast.json @@ -156,7 +156,7 @@ "[CUSTOM_/_B_WORK]/skia/bin/gn", "gen", "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-arm-Release-Chromecast/Release", - "--args=ar=\"[START_DIR]/cast_toolchain/bin/armv7a-cros-linux-gnueabi-ar\" cc=\"[START_DIR]/cast_toolchain/bin/armv7a-cros-linux-gnueabi-gcc\" cxx=\"[START_DIR]/cast_toolchain/bin/armv7a-cros-linux-gnueabi-g++\" extra_cflags=[\"-g0\"] extra_ldflags=[\"-static-libstdc++\", \"-static-libgcc\"] is_debug=false skia_enable_gpu=false skia_use_fontconfig=false skia_use_icu=false skia_use_system_freetype2=false target_cpu=\"arm\"" + "--args=ar=\"[START_DIR]/cast_toolchain/armv7a/bin/armv7a-cros-linux-gnueabi-ar\" cc=\"[START_DIR]/cast_toolchain/armv7a/bin/armv7a-cros-linux-gnueabi-gcc\" cxx=\"[START_DIR]/cast_toolchain/armv7a/bin/armv7a-cros-linux-gnueabi-g++\" extra_cflags=[\"-I[START_DIR]/chromebook_arm_gles/include\", \"-DMESA_EGL_NO_X11_HEADERS\", \"-DEGL_NO_IMAGE_EXTERNAL\", \"-DSK_NO_COMMAND_BUFFER\", \"-Wno-error=unused-function\", \"-g0\"] extra_ldflags=[\"-static-libstdc++\", \"-static-libgcc\", \"-L[START_DIR]/cast_toolchain/armv7a/lib\"] is_debug=false skia_enable_gpu=true skia_use_egl=true skia_use_fontconfig=false skia_use_icu=false skia_use_system_freetype2=false target_cpu=\"arm\"" ], "cwd": "[CUSTOM_/_B_WORK]/skia", "env": { diff --git a/infra/bots/recipes/perf.expected/Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Debug.json b/infra/bots/recipes/perf.expected/Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Debug.json index cac41db9aa..2d0b41594a 100644 --- a/infra/bots/recipes/perf.expected/Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Debug.json +++ b/infra/bots/recipes/perf.expected/Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Debug.json @@ -293,7 +293,7 @@ "python", "-u", "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", - "set -x; /cache/skia/nanobench -i /cache/skia/resources --images /cache/skia/resources/color_wheel.jpg --svgs /cache/skia/svgs; echo $? >/cache/skia/rc", + "set -x; /cache/skia/nanobench --config gles -i /cache/skia/resources --images /cache/skia/resources/color_wheel.jpg --svgs /cache/skia/svgs --pre_log --match ~matrixconvolution ~blur_image_filter ~blur_0.01 ~GM_animated-image-blurs; echo $? >/cache/skia/rc", "[START_DIR]/tmp/nanobench.sh" ], "env": { diff --git a/infra/bots/recipes/perf.expected/Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Release.json b/infra/bots/recipes/perf.expected/Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Release.json index 872564db23..29a7c19ee9 100644 --- a/infra/bots/recipes/perf.expected/Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Release.json +++ b/infra/bots/recipes/perf.expected/Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Release.json @@ -329,7 +329,7 @@ "python", "-u", "\nimport shutil\nimport sys\nshutil.copy(sys.argv[1], sys.argv[2])\n", - "set -x; /cache/skia/nanobench -i /cache/skia/resources --images /cache/skia/resources/color_wheel.jpg --svgs /cache/skia/svgs --outResultsFile /cache/skia/perf/nanobench_abc123_1337000001.json --properties gitHash abc123 swarming_bot_id skia-bot-123 swarming_task_id 123456 --key arch arm compiler GCC cpu_or_gpu CPU cpu_or_gpu_value Cortex_A7 model Chorizo os Chromecast; echo $? >/cache/skia/rc", + "set -x; /cache/skia/nanobench --config gles -i /cache/skia/resources --images /cache/skia/resources/color_wheel.jpg --svgs /cache/skia/svgs --pre_log --match ~matrixconvolution ~blur_image_filter ~blur_0.01 ~GM_animated-image-blurs --outResultsFile /cache/skia/perf/nanobench_abc123_1337000001.json --properties gitHash abc123 swarming_bot_id skia-bot-123 swarming_task_id 123456 --key arch arm compiler GCC cpu_or_gpu CPU cpu_or_gpu_value Cortex_A7 model Chorizo os Chromecast; echo $? >/cache/skia/rc", "[START_DIR]/tmp/nanobench.sh" ], "env": { diff --git a/infra/bots/recipes/perf.py b/infra/bots/recipes/perf.py index 1b384732a6..987d44a154 100644 --- a/infra/bots/recipes/perf.py +++ b/infra/bots/recipes/perf.py @@ -113,11 +113,6 @@ def nanobench_flags(bot): match.append('~blurroundrect') match.append('~patch_grid') # skia:2847 match.append('~desk_carsvg') - if 'Chromecast' in bot: - match.append('~matrixconvolution') # skia:6581 - match.append('~blur_image_filter') - match.append('~blur_0.01') - match.append('GM_animated-image-blurs') if 'NexusPlayer' in bot: match.append('~desk_unicodetable') if 'Nexus5' in bot: @@ -242,10 +237,18 @@ def perf_steps(api): # Due to limited disk space, run a watered down perf run on Chromecast. args = [ target, - '-i', api.flavor.device_dirs.resource_dir, - '--images', api.flavor.device_path_join( - api.flavor.device_dirs.resource_dir, 'color_wheel.jpg'), - '--svgs', api.flavor.device_dirs.svg_dir, + '--config', + 'gles', + '-i', api.flavor.device_dirs.resource_dir, + '--images', api.flavor.device_path_join( + api.flavor.device_dirs.resource_dir, 'color_wheel.jpg'), + '--svgs', api.flavor.device_dirs.svg_dir, + '--pre_log', + '--match', # skia:6581 + '~matrixconvolution', + '~blur_image_filter', + '~blur_0.01', + '~GM_animated-image-blurs', ] if api.vars.upload_perf_results: diff --git a/infra/bots/tasks.json b/infra/bots/tasks.json index 10a87279ca..7fd3dbc3ba 100644 --- a/infra/bots/tasks.json +++ b/infra/bots/tasks.json @@ -3496,7 +3496,12 @@ { "name": "skia/bots/cast_toolchain", "path": "cast_toolchain", - "version": "version:2" + "version": "version:4" + }, + { + "name": "skia/bots/chromebook_arm_gles", + "path": "chromebook_arm_gles", + "version": "version:0" } ], "dimensions": [ @@ -3526,7 +3531,12 @@ { "name": "skia/bots/cast_toolchain", "path": "cast_toolchain", - "version": "version:2" + "version": "version:4" + }, + { + "name": "skia/bots/chromebook_arm_gles", + "path": "chromebook_arm_gles", + "version": "version:0" } ], "dimensions": [ diff --git a/tools/gpu/GrContextFactory.cpp b/tools/gpu/GrContextFactory.cpp index 5aa57853b5..0238898d71 100644 --- a/tools/gpu/GrContextFactory.cpp +++ b/tools/gpu/GrContextFactory.cpp @@ -162,9 +162,11 @@ ContextInfo GrContextFactory::getContextInfoInternal(ContextType type, ContextOv glShareContext).release(); break; #endif +#ifndef SK_NO_COMMAND_BUFFER case kCommandBuffer_ContextType: glCtx = CommandBufferGLTestContext::Create(glShareContext); break; +#endif #if SK_MESA case kMESA_ContextType: glCtx = CreateMesaGLTestContext(glShareContext); diff --git a/tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp b/tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp index 82888d8984..54845fc28b 100644 --- a/tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp +++ b/tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp @@ -6,6 +6,8 @@ * found in the LICENSE file. */ +#ifndef SK_NO_COMMAND_BUFFER + #include "SkMutex.h" #include "SkOnce.h" #include "gl/GrGLInterface.h" @@ -302,3 +304,4 @@ int CommandBufferGLTestContext::getSampleCount() { } } // namespace sk_gpu_test +#endif // SK_NO_COMMAND_BUFFER diff --git a/tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp b/tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp index e5939f4a79..c006098d2f 100644 --- a/tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp +++ b/tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp @@ -237,6 +237,7 @@ GrGLuint EGLGLTestContext::eglImageToExternalTexture(GrEGLImage image) const { if (!this->gl()->hasExtension("GL_OES_EGL_image_external")) { return 0; } +#ifndef EGL_NO_IMAGE_EXTERNAL typedef GrGLvoid (*EGLImageTargetTexture2DProc)(GrGLenum, GrGLeglImage); EGLImageTargetTexture2DProc glEGLImageTargetTexture2D = @@ -260,6 +261,9 @@ GrGLuint EGLGLTestContext::eglImageToExternalTexture(GrEGLImage image) const { return 0; } return texID; +#else + return 0; +#endif //EGL_NO_IMAGE_EXTERNAL } std::unique_ptr EGLGLTestContext::makeNew() const {