diff options
author | Mike Klein <mtklein@chromium.org> | 2017-05-10 16:13:35 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-05-11 13:43:58 +0000 |
commit | b60acfcfacdd5631f449fc0b8e8bec4396fa2fa5 (patch) | |
tree | 3cecb3635b8c965d712f498307f085dfa051686b | |
parent | 6c9f1013772436b61d092b312dad5fecc144c09f (diff) |
Add a way to force raster pipeline blitter.
And add some Test/Perf bots to try it out!
CQ_INCLUDE_TRYBOTS=skia.primary:Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER
Change-Id: I56ea2285f9fec2e468fae89673a545a717ab0f49
Reviewed-on: https://skia-review.googlesource.com/16423
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
-rw-r--r-- | infra/bots/jobs.json | 3 | ||||
-rw-r--r-- | infra/bots/tasks.json | 198 | ||||
-rw-r--r-- | src/core/SkBlitter.cpp | 15 |
3 files changed, 214 insertions, 2 deletions
diff --git a/infra/bots/jobs.json b/infra/bots/jobs.json index 24f104c0b4..be765d0cd0 100644 --- a/infra/bots/jobs.json +++ b/infra/bots/jobs.json @@ -40,6 +40,7 @@ "Build-Ubuntu-Clang-x86_64-Release-Vulkan", "Build-Ubuntu-Clang-x86_64-Release-SK_CPU_LIMIT_SSE2", "Build-Ubuntu-Clang-x86_64-Release-SK_CPU_LIMIT_SSE41", + "Build-Ubuntu-Clang-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER", "Build-Ubuntu-GCC-arm-Debug-Chromecast", "Build-Ubuntu-GCC-arm-Release-Chromecast", "Build-Ubuntu-GCC-x86-Debug", @@ -135,6 +136,7 @@ "Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release", "Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-ASAN", "Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-Fast", + "Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER", "Perf-Ubuntu-Clang-Golo-GPU-GT610-x86_64-Debug-ASAN", "Perf-Ubuntu-Clang-Golo-GPU-GT610-x86_64-Release-ASAN", "Perf-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug", @@ -280,6 +282,7 @@ "Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-TSAN", "Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_CPU_LIMIT_SSE2", "Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_CPU_LIMIT_SSE41", + "Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER", "Test-Ubuntu-Clang-Golo-GPU-GT610-x86_64-Debug-ASAN", "Test-Ubuntu-Clang-Golo-GPU-GT610-x86_64-Release-ASAN", "Test-Ubuntu-Clang-Golo-GPU-GT610-x86_64-Release-TSAN", diff --git a/infra/bots/tasks.json b/infra/bots/tasks.json index 2ef281f5b5..5bc497597c 100644 --- a/infra/bots/tasks.json +++ b/infra/bots/tasks.json @@ -234,6 +234,12 @@ "Build-Ubuntu-Clang-x86_64-Release-SK_CPU_LIMIT_SSE41" ] }, + "Build-Ubuntu-Clang-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER": { + "priority": 0.8, + "tasks": [ + "Build-Ubuntu-Clang-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER" + ] + }, "Build-Ubuntu-Clang-x86_64-Release-TSAN": { "priority": 0.8, "tasks": [ @@ -818,6 +824,12 @@ "Upload-Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-Fast" ] }, + "Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER": { + "priority": 0.8, + "tasks": [ + "Upload-Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER" + ] + }, "Perf-Ubuntu-Clang-Golo-GPU-GT610-x86_64-Debug-ASAN": { "priority": 0.8, "tasks": [ @@ -1682,6 +1694,12 @@ "Upload-Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_CPU_LIMIT_SSE41" ] }, + "Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER": { + "priority": 0.8, + "tasks": [ + "Upload-Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER" + ] + }, "Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-TSAN": { "priority": 0.8, "tasks": [ @@ -3377,6 +3395,36 @@ "isolate": "compile_skia.isolate", "priority": 0.8 }, + "Build-Ubuntu-Clang-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER": { + "cipd_packages": [ + { + "name": "skia/bots/clang_linux", + "path": "clang_linux", + "version": "version:8" + } + ], + "dimensions": [ + "cpu:x86-64-avx2", + "gpu:none", + "os:Ubuntu-14.04", + "pool:Skia" + ], + "extra_args": [ + "--workdir", + "../../..", + "compile", + "repository=<(REPO)", + "buildername=Build-Ubuntu-Clang-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER", + "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-Ubuntu-Clang-x86_64-Release-TSAN": { "cipd_packages": [ { @@ -7197,6 +7245,54 @@ "max_attempts": 1, "priority": 0.8 }, + "Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER": { + "cipd_packages": [ + { + "name": "skia/bots/skimage", + "path": "skimage", + "version": "version:24" + }, + { + "name": "skia/bots/skp", + "path": "skp", + "version": "version:56" + }, + { + "name": "skia/bots/svg", + "path": "svg", + "version": "version:5" + } + ], + "dependencies": [ + "Build-Ubuntu-Clang-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER", + "Housekeeper-PerCommit-BundleRecipes" + ], + "dimensions": [ + "cpu:x86-64-avx2", + "gpu:none", + "os:Ubuntu-14.04", + "pool:Skia" + ], + "execution_timeout_ns": 14400000000000, + "expiration_ns": 72000000000000, + "extra_args": [ + "--workdir", + "../../..", + "perf", + "repository=<(REPO)", + "buildername=Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER", + "swarm_out_dir=${ISOLATED_OUTDIR}", + "revision=<(REVISION)", + "patch_repo=<(PATCH_REPO)", + "patch_storage=<(PATCH_STORAGE)", + "patch_issue=<(ISSUE)", + "patch_set=<(PATCHSET)" + ], + "io_timeout_ns": 2400000000000, + "isolate": "perf_skia_bundled_unix.isolate", + "max_attempts": 1, + "priority": 0.8 + }, "Perf-Ubuntu-Clang-Golo-GPU-GT610-x86_64-Debug-ASAN": { "cipd_packages": [ { @@ -14078,6 +14174,54 @@ "max_attempts": 1, "priority": 0.8 }, + "Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER": { + "cipd_packages": [ + { + "name": "skia/bots/skimage", + "path": "skimage", + "version": "version:24" + }, + { + "name": "skia/bots/skp", + "path": "skp", + "version": "version:56" + }, + { + "name": "skia/bots/svg", + "path": "svg", + "version": "version:5" + } + ], + "dependencies": [ + "Build-Ubuntu-Clang-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER", + "Housekeeper-PerCommit-BundleRecipes" + ], + "dimensions": [ + "cpu:x86-64-avx2", + "gpu:none", + "os:Ubuntu-14.04", + "pool:Skia" + ], + "execution_timeout_ns": 14400000000000, + "expiration_ns": 72000000000000, + "extra_args": [ + "--workdir", + "../../..", + "test", + "repository=<(REPO)", + "buildername=Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER", + "swarm_out_dir=${ISOLATED_OUTDIR}", + "revision=<(REVISION)", + "patch_repo=<(PATCH_REPO)", + "patch_storage=<(PATCH_STORAGE)", + "patch_issue=<(ISSUE)", + "patch_set=<(PATCHSET)" + ], + "io_timeout_ns": 2400000000000, + "isolate": "test_skia_bundled_unix.isolate", + "max_attempts": 1, + "priority": 0.8 + }, "Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-TSAN": { "cipd_packages": [ { @@ -19367,6 +19511,33 @@ "isolate": "upload_nano_results.isolate", "priority": 0.8 }, + "Upload-Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER": { + "dependencies": [ + "Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER" + ], + "dimensions": [ + "cpu:x86-64-avx2", + "gpu:none", + "os:Ubuntu-14.04", + "pool:Skia" + ], + "extra_args": [ + "--workdir", + "../../..", + "upload_nano_results", + "repository=<(REPO)", + "buildername=Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER", + "swarm_out_dir=${ISOLATED_OUTDIR}", + "revision=<(REVISION)", + "patch_repo=<(PATCH_REPO)", + "patch_storage=<(PATCH_STORAGE)", + "patch_issue=<(ISSUE)", + "patch_set=<(PATCHSET)", + "gs_bucket=skia-perf" + ], + "isolate": "upload_nano_results.isolate", + "priority": 0.8 + }, "Upload-Perf-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release": { "dependencies": [ "Perf-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release" @@ -21878,6 +22049,33 @@ "isolate": "upload_dm_results.isolate", "priority": 0.8 }, + "Upload-Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER": { + "dependencies": [ + "Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER" + ], + "dimensions": [ + "cpu:x86-64-avx2", + "gpu:none", + "os:Ubuntu-14.04", + "pool:Skia" + ], + "extra_args": [ + "--workdir", + "../../..", + "upload_dm_results", + "repository=<(REPO)", + "buildername=Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER", + "swarm_out_dir=${ISOLATED_OUTDIR}", + "revision=<(REVISION)", + "patch_repo=<(PATCH_REPO)", + "patch_storage=<(PATCH_STORAGE)", + "patch_issue=<(ISSUE)", + "patch_set=<(PATCHSET)", + "gs_bucket=skia-infra-gm" + ], + "isolate": "upload_dm_results.isolate", + "priority": 0.8 + }, "Upload-Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug": { "dependencies": [ "Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug" diff --git a/src/core/SkBlitter.cpp b/src/core/SkBlitter.cpp index c2a3a89ca2..3c607acf4a 100644 --- a/src/core/SkBlitter.cpp +++ b/src/core/SkBlitter.cpp @@ -782,6 +782,18 @@ SkShader::ContextRec::DstType SkBlitter::PreferredShaderDest(const SkImageInfo& #endif } +static bool use_raster_pipeline_blitter(const SkPixmap& device, const SkPaint& paint) { +#if defined(SK_FORCE_RASTER_PIPELINE_BLITTER) + return true; +#else + // By policy we choose not to handle legacy 8888 with SkRasterPipelineBlitter. + if (device.colorSpace()) { + return true; + } + return device.colorType() != kN32_SkColorType; +#endif +} + SkBlitter* SkBlitter::Choose(const SkPixmap& device, const SkMatrix& matrix, const SkPaint& origPaint, @@ -847,8 +859,7 @@ SkBlitter* SkBlitter::Choose(const SkPixmap& device, return alloc->make<SkA8_Coverage_Blitter>(device, *paint); } - // By policy we choose not to handle legacy 8888 with SkRasterPipelineBlitter. - if (device.colorSpace() || device.colorType() != kN32_SkColorType) { + if (use_raster_pipeline_blitter(device, *paint)) { auto blitter = SkCreateRasterPipelineBlitter(device, *paint, matrix, alloc); SkASSERT(blitter); return blitter; |