Add tooling support for dmsaa
Adds a "fAlwaysAntiAlias" flag to GrContextOptions that can be set from tooling code. When dmsaa is set, SkGpuDevice draws everything antialiased. Adds new "gldmsaa" and "glesdmsaa" configs and creates bots to run them. Bug: skia:11396 Change-Id: I165e89434b733f7b02312cea0e6649812528083b Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384936 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
This commit is contained in:
parent
4cfbe536c7
commit
188443be8d
@ -247,6 +247,7 @@ struct GPUTarget : public Target {
|
||||
}
|
||||
bool init(SkImageInfo info, Benchmark* bench) override {
|
||||
GrContextOptions options = grContextOpts;
|
||||
options.fAlwaysAntialias = config.useDMSAA;
|
||||
bench->modifyGrContextOptions(&options);
|
||||
this->factory = std::make_unique<GrContextFactory>(options);
|
||||
SkSurfaceProps props(this->config.surfaceFlags, kRGB_H_SkPixelGeometry);
|
||||
@ -469,6 +470,7 @@ static void create_config(const SkCommandLineConfig* config, SkTArray<Config>* c
|
||||
const auto ctxType = gpuConfig->getContextType();
|
||||
const auto ctxOverrides = gpuConfig->getContextOverrides();
|
||||
const auto sampleCount = gpuConfig->getSamples();
|
||||
const auto useDMSAA = gpuConfig->getUseDMSAA();
|
||||
const auto colorType = gpuConfig->getColorType();
|
||||
auto colorSpace = gpuConfig->getColorSpace();
|
||||
if (gpuConfig->getSurfType() != SkCommandLineConfigGpu::SurfType::kDefault) {
|
||||
@ -499,6 +501,7 @@ static void create_config(const SkCommandLineConfig* config, SkTArray<Config>* c
|
||||
kPremul_SkAlphaType,
|
||||
sk_ref_sp(colorSpace),
|
||||
sampleCount,
|
||||
useDMSAA,
|
||||
ctxType,
|
||||
ctxOverrides,
|
||||
gpuConfig->getSurfaceFlags()
|
||||
@ -517,7 +520,7 @@ static void create_config(const SkCommandLineConfig* config, SkTArray<Config>* c
|
||||
} \
|
||||
Config config = { \
|
||||
SkString(#name), Benchmark::backend, color, alpha, colorSpace, \
|
||||
0, kBogusContextType, kBogusContextOverrides, 0 \
|
||||
0, false, kBogusContextType, kBogusContextOverrides, 0 \
|
||||
}; \
|
||||
configs->push_back(config); \
|
||||
return; \
|
||||
|
@ -25,6 +25,7 @@ struct Config {
|
||||
SkAlphaType alpha;
|
||||
sk_sp<SkColorSpace> colorSpace;
|
||||
int samples;
|
||||
bool useDMSAA;
|
||||
sk_gpu_test::GrContextFactory::ContextType ctxType;
|
||||
sk_gpu_test::GrContextFactory::ContextOverrides ctxOverrides;
|
||||
uint32_t surfaceFlags;
|
||||
|
@ -1479,6 +1479,7 @@ GPUSink::GPUSink(const SkCommandLineConfigGpu* config,
|
||||
, fAlphaType(config->getAlphaType())
|
||||
, fColorSpace(sk_ref_sp(config->getColorSpace()))
|
||||
, fBaseContextOptions(grCtxOptions) {
|
||||
fBaseContextOptions.fAlwaysAntialias = config->getUseDMSAA();
|
||||
if (FLAGS_programBinaryCache) {
|
||||
fBaseContextOptions.fPersistentCache = &fMemoryCache;
|
||||
}
|
||||
|
@ -313,6 +313,12 @@ struct SK_API GrContextOptions {
|
||||
*/
|
||||
bool fDisallowWritePixelRowBytes = false;
|
||||
|
||||
/**
|
||||
* Forces all draws to use antialiasing. This allows Ganesh to use internal multisampling
|
||||
* as well as certain clip optimizations.
|
||||
*/
|
||||
bool fAlwaysAntialias = false;
|
||||
|
||||
/**
|
||||
* Include or exclude specific GPU path renderers.
|
||||
*/
|
||||
|
@ -472,6 +472,12 @@ func (b *taskBuilder) dmFlags(internalHardwareLabel string) {
|
||||
args = append(args, "--hwtess", "--pr", "tess")
|
||||
}
|
||||
|
||||
// Test dynamic MSAA.
|
||||
if b.extraConfig("DMSAA") {
|
||||
configs = []string{glPrefix + "dmsaa"}
|
||||
args = append(args, "--hwtess")
|
||||
}
|
||||
|
||||
// Test non-nvpr on NVIDIA.
|
||||
if b.extraConfig("NonNVPR") {
|
||||
configs = []string{"gl", "glmsaa4"}
|
||||
|
@ -623,7 +623,7 @@ func (b *jobBuilder) deriveCompileTaskName() string {
|
||||
"ReleaseAndAbandonGpuContext", "FSAA", "FAAA", "FDAA", "NativeFonts", "GDI",
|
||||
"NoGPUThreads", "ProcDump", "DDL1", "DDL3", "OOPRDDL", "T8888",
|
||||
"DDLTotal", "DDLRecord", "9x9", "BonusConfigs", "SkottieTracing", "SkottieWASM",
|
||||
"GpuTess", "NonNVPR", "Mskp", "Docker", "PDF", "SkVM", "Puppeteer",
|
||||
"GpuTess", "DMSAA", "NonNVPR", "Mskp", "Docker", "PDF", "SkVM", "Puppeteer",
|
||||
"SkottieFrames", "RenderSKP", "CanvasPerf", "AllPathsVolatile", "WebGL2"}
|
||||
keep := make([]string, 0, len(ec))
|
||||
for _, part := range ec {
|
||||
|
@ -332,6 +332,7 @@
|
||||
"Test-Android-Clang-GalaxyS9-GPU-MaliG72-arm64-Release-All-Android_Vulkan",
|
||||
"Test-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Debug-All-Android",
|
||||
"Test-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Debug-All-Android_Vulkan",
|
||||
"Test-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Debug-All-Android_DMSAA",
|
||||
"Test-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android",
|
||||
"Test-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_Vulkan",
|
||||
"Test-Android-Clang-MotoG4-GPU-Adreno405-arm-Debug-All-Android",
|
||||
@ -513,6 +514,7 @@
|
||||
"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Dawn",
|
||||
"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-BonusConfigs",
|
||||
"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-GpuTess",
|
||||
"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-DMSAA",
|
||||
"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-NonNVPR",
|
||||
"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ReleaseAndAbandonGpuContext",
|
||||
"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Vulkan",
|
||||
|
@ -1613,6 +1613,11 @@
|
||||
"Upload-Test-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Debug-All-Android"
|
||||
]
|
||||
},
|
||||
"Test-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Debug-All-Android_DMSAA": {
|
||||
"tasks": [
|
||||
"Upload-Test-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Debug-All-Android_DMSAA"
|
||||
]
|
||||
},
|
||||
"Test-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Debug-All-Android_Vulkan": {
|
||||
"tasks": [
|
||||
"Upload-Test-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Debug-All-Android_Vulkan"
|
||||
@ -2585,6 +2590,11 @@
|
||||
"Upload-Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-BonusConfigs"
|
||||
]
|
||||
},
|
||||
"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-DMSAA": {
|
||||
"tasks": [
|
||||
"Upload-Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-DMSAA"
|
||||
]
|
||||
},
|
||||
"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Dawn": {
|
||||
"tasks": [
|
||||
"Upload-Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Dawn"
|
||||
@ -27305,6 +27315,73 @@
|
||||
"test"
|
||||
]
|
||||
},
|
||||
"Test-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Debug-All-Android_DMSAA": {
|
||||
"caches": [
|
||||
{
|
||||
"name": "vpython",
|
||||
"path": "cache/vpython"
|
||||
}
|
||||
],
|
||||
"casSpec": "test",
|
||||
"cipd_packages": [
|
||||
{
|
||||
"name": "infra/tools/luci-auth/${platform}",
|
||||
"path": "cipd_bin_packages",
|
||||
"version": "git_revision:14be8b751c0fb567535f520f8a7bc60c3f40b378"
|
||||
},
|
||||
{
|
||||
"name": "infra/tools/luci/kitchen/${platform}",
|
||||
"path": ".",
|
||||
"version": "git_revision:14be8b751c0fb567535f520f8a7bc60c3f40b378"
|
||||
},
|
||||
{
|
||||
"name": "infra/tools/luci/vpython/${platform}",
|
||||
"path": "cipd_bin_packages",
|
||||
"version": "git_revision:14be8b751c0fb567535f520f8a7bc60c3f40b378"
|
||||
}
|
||||
],
|
||||
"command": [
|
||||
"cipd_bin_packages/vpython${EXECUTABLE_SUFFIX}",
|
||||
"-u",
|
||||
"skia/infra/bots/run_recipe.py",
|
||||
"${ISOLATED_OUTDIR}",
|
||||
"test",
|
||||
"{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Debug-All-Android_DMSAA\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"MaliG77\\\",\\\"extra_config\\\",\\\"Android_DMSAA\\\",\\\"model\\\",\\\"GalaxyS20\\\",\\\"os\\\",\\\"Android\\\",\\\"style\\\",\\\"default\\\",\\\"--nocpu\\\",\\\"--reduceOpsTaskSplitting\\\",\\\"true\\\",\\\"--hwtess\\\",\\\"--config\\\",\\\"glesdmsaa\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"ProcessorCloneTest\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GrStyledShape\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\"interlaced1.png\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\"interlaced2.png\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\"interlaced3.png\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".arw\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".cr2\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".dng\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".nef\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".nrw\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".orf\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".raf\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".rw2\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".pef\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".srw\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".ARW\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".CR2\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".DNG\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".NEF\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".NRW\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".ORF\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".RAF\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".RW2\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".PEF\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".SRW\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Debug-All-Android_DMSAA\\\",\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\",\\\"task_id\\\":\\\"<(TASK_ID)\\\"}\",\"do_upload\":\"true\",\"gold_hashes_url\":\"https://storage.googleapis.com/skia-infra-gm/hash_files/gold-prod-hashes.txt\",\"images\":\"true\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"resources\":\"true\",\"revision\":\"<(REVISION)\",\"skps\":\"true\",\"svgs\":\"true\",\"swarm_out_dir\":\"test\",\"task_id\":\"<(TASK_ID)\"}",
|
||||
"skia"
|
||||
],
|
||||
"dependencies": [
|
||||
"Build-Debian10-Clang-arm64-Debug-Android",
|
||||
"Housekeeper-PerCommit-BundleRecipes",
|
||||
"Housekeeper-PerCommit-IsolateSKP",
|
||||
"Housekeeper-PerCommit-IsolateSVG",
|
||||
"Housekeeper-PerCommit-IsolateSkImage"
|
||||
],
|
||||
"dimensions": [
|
||||
"device_os:QP1A.190711.020",
|
||||
"device_type:exynos990",
|
||||
"os:Android",
|
||||
"pool:Skia"
|
||||
],
|
||||
"env_prefixes": {
|
||||
"PATH": [
|
||||
"cipd_bin_packages",
|
||||
"cipd_bin_packages/bin"
|
||||
],
|
||||
"VPYTHON_VIRTUALENV_ROOT": [
|
||||
"cache/vpython"
|
||||
]
|
||||
},
|
||||
"execution_timeout_ns": 14400000000000,
|
||||
"expiration_ns": 72000000000000,
|
||||
"extra_tags": {
|
||||
"log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations"
|
||||
},
|
||||
"io_timeout_ns": 14400000000000,
|
||||
"max_attempts": 2,
|
||||
"outputs": [
|
||||
"test"
|
||||
]
|
||||
},
|
||||
"Test-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Debug-All-Android_Vulkan": {
|
||||
"caches": [
|
||||
{
|
||||
@ -41932,6 +42009,89 @@
|
||||
"test"
|
||||
]
|
||||
},
|
||||
"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-DMSAA": {
|
||||
"caches": [
|
||||
{
|
||||
"name": "vpython",
|
||||
"path": "cache/vpython"
|
||||
}
|
||||
],
|
||||
"casSpec": "test",
|
||||
"cipd_packages": [
|
||||
{
|
||||
"name": "infra/3pp/tools/cpython/windows-amd64",
|
||||
"path": "cipd_bin_packages",
|
||||
"version": "version:2.7.18.chromium.30"
|
||||
},
|
||||
{
|
||||
"name": "infra/tools/luci-auth/${platform}",
|
||||
"path": "cipd_bin_packages",
|
||||
"version": "git_revision:14be8b751c0fb567535f520f8a7bc60c3f40b378"
|
||||
},
|
||||
{
|
||||
"name": "infra/tools/luci/kitchen/${platform}",
|
||||
"path": ".",
|
||||
"version": "git_revision:14be8b751c0fb567535f520f8a7bc60c3f40b378"
|
||||
},
|
||||
{
|
||||
"name": "infra/tools/luci/vpython/${platform}",
|
||||
"path": "cipd_bin_packages",
|
||||
"version": "git_revision:14be8b751c0fb567535f520f8a7bc60c3f40b378"
|
||||
},
|
||||
{
|
||||
"name": "skia/bots/skimage",
|
||||
"path": "skimage",
|
||||
"version": "version:42"
|
||||
},
|
||||
{
|
||||
"name": "skia/bots/skp",
|
||||
"path": "skp",
|
||||
"version": "version:308"
|
||||
},
|
||||
{
|
||||
"name": "skia/bots/svg",
|
||||
"path": "svg",
|
||||
"version": "version:14"
|
||||
}
|
||||
],
|
||||
"command": [
|
||||
"cipd_bin_packages/vpython${EXECUTABLE_SUFFIX}",
|
||||
"-u",
|
||||
"skia/infra/bots/run_recipe.py",
|
||||
"${ISOLATED_OUTDIR}",
|
||||
"test",
|
||||
"{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-DMSAA\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"DMSAA\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--hwtess\\\",\\\"--config\\\",\\\"gldmsaa\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\"interlaced1.png\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\"interlaced2.png\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\"interlaced3.png\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".arw\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".cr2\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".dng\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".nef\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".nrw\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".orf\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".raf\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".rw2\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".pef\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".srw\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".ARW\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".CR2\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".DNG\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".NEF\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".NRW\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".ORF\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".RAF\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".RW2\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".PEF\\\",\\\"_\\\",\\\"image\\\",\\\"_\\\",\\\".SRW\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-DMSAA\\\",\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\",\\\"task_id\\\":\\\"<(TASK_ID)\\\"}\",\"do_upload\":\"true\",\"gold_hashes_url\":\"https://storage.googleapis.com/skia-infra-gm/hash_files/gold-prod-hashes.txt\",\"images\":\"true\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"resources\":\"true\",\"revision\":\"<(REVISION)\",\"skps\":\"true\",\"svgs\":\"true\",\"swarm_out_dir\":\"test\",\"task_id\":\"<(TASK_ID)\"}",
|
||||
"skia"
|
||||
],
|
||||
"dependencies": [
|
||||
"Build-Win-Clang-x86_64-Debug",
|
||||
"Housekeeper-PerCommit-BundleRecipes"
|
||||
],
|
||||
"dimensions": [
|
||||
"gpu:10de:1cb3-25.21.14.1678",
|
||||
"os:Windows-10-16299",
|
||||
"pool:Skia"
|
||||
],
|
||||
"env_prefixes": {
|
||||
"PATH": [
|
||||
"cipd_bin_packages",
|
||||
"cipd_bin_packages/bin"
|
||||
],
|
||||
"VPYTHON_VIRTUALENV_ROOT": [
|
||||
"cache/vpython"
|
||||
]
|
||||
},
|
||||
"execution_timeout_ns": 14400000000000,
|
||||
"expiration_ns": 72000000000000,
|
||||
"extra_tags": {
|
||||
"log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations"
|
||||
},
|
||||
"io_timeout_ns": 14400000000000,
|
||||
"max_attempts": 2,
|
||||
"outputs": [
|
||||
"test"
|
||||
]
|
||||
},
|
||||
"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Dawn": {
|
||||
"caches": [
|
||||
{
|
||||
@ -59638,6 +59798,73 @@
|
||||
"max_attempts": 2,
|
||||
"service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com"
|
||||
},
|
||||
"Upload-Test-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Debug-All-Android_DMSAA": {
|
||||
"caches": [
|
||||
{
|
||||
"name": "vpython",
|
||||
"path": "cache/vpython"
|
||||
}
|
||||
],
|
||||
"casSpec": "run-recipe",
|
||||
"cipd_packages": [
|
||||
{
|
||||
"name": "infra/gsutil",
|
||||
"path": "cipd_bin_packages",
|
||||
"version": "version:4.46"
|
||||
},
|
||||
{
|
||||
"name": "infra/tools/luci-auth/${platform}",
|
||||
"path": "cipd_bin_packages",
|
||||
"version": "git_revision:14be8b751c0fb567535f520f8a7bc60c3f40b378"
|
||||
},
|
||||
{
|
||||
"name": "infra/tools/luci/kitchen/${platform}",
|
||||
"path": ".",
|
||||
"version": "git_revision:14be8b751c0fb567535f520f8a7bc60c3f40b378"
|
||||
},
|
||||
{
|
||||
"name": "infra/tools/luci/vpython/${platform}",
|
||||
"path": "cipd_bin_packages",
|
||||
"version": "git_revision:14be8b751c0fb567535f520f8a7bc60c3f40b378"
|
||||
}
|
||||
],
|
||||
"command": [
|
||||
"cipd_bin_packages/vpython${EXECUTABLE_SUFFIX}",
|
||||
"-u",
|
||||
"skia/infra/bots/run_recipe.py",
|
||||
"${ISOLATED_OUTDIR}",
|
||||
"upload_dm_results",
|
||||
"{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Debug-All-Android_DMSAA\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}",
|
||||
"skia"
|
||||
],
|
||||
"dependencies": [
|
||||
"Housekeeper-PerCommit-BundleRecipes",
|
||||
"Test-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Debug-All-Android_DMSAA"
|
||||
],
|
||||
"dimensions": [
|
||||
"cpu:x86-64-Haswell_GCE",
|
||||
"gpu:none",
|
||||
"machine_type:n1-highmem-2",
|
||||
"os:Debian-10.3",
|
||||
"pool:Skia"
|
||||
],
|
||||
"env_prefixes": {
|
||||
"PATH": [
|
||||
"cipd_bin_packages",
|
||||
"cipd_bin_packages/bin"
|
||||
],
|
||||
"VPYTHON_VIRTUALENV_ROOT": [
|
||||
"cache/vpython"
|
||||
]
|
||||
},
|
||||
"execution_timeout_ns": 3600000000000,
|
||||
"extra_tags": {
|
||||
"log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations"
|
||||
},
|
||||
"io_timeout_ns": 3600000000000,
|
||||
"max_attempts": 2,
|
||||
"service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com"
|
||||
},
|
||||
"Upload-Test-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Debug-All-Android_Vulkan": {
|
||||
"caches": [
|
||||
{
|
||||
@ -70336,6 +70563,78 @@
|
||||
"max_attempts": 2,
|
||||
"service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com"
|
||||
},
|
||||
"Upload-Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-DMSAA": {
|
||||
"caches": [
|
||||
{
|
||||
"name": "vpython",
|
||||
"path": "cache/vpython"
|
||||
}
|
||||
],
|
||||
"casSpec": "run-recipe",
|
||||
"cipd_packages": [
|
||||
{
|
||||
"name": "infra/3pp/tools/cpython/linux-amd64",
|
||||
"path": "cipd_bin_packages",
|
||||
"version": "version:2.7.18.chromium.30"
|
||||
},
|
||||
{
|
||||
"name": "infra/gsutil",
|
||||
"path": "cipd_bin_packages",
|
||||
"version": "version:4.46"
|
||||
},
|
||||
{
|
||||
"name": "infra/tools/luci-auth/${platform}",
|
||||
"path": "cipd_bin_packages",
|
||||
"version": "git_revision:14be8b751c0fb567535f520f8a7bc60c3f40b378"
|
||||
},
|
||||
{
|
||||
"name": "infra/tools/luci/kitchen/${platform}",
|
||||
"path": ".",
|
||||
"version": "git_revision:14be8b751c0fb567535f520f8a7bc60c3f40b378"
|
||||
},
|
||||
{
|
||||
"name": "infra/tools/luci/vpython/${platform}",
|
||||
"path": "cipd_bin_packages",
|
||||
"version": "git_revision:14be8b751c0fb567535f520f8a7bc60c3f40b378"
|
||||
}
|
||||
],
|
||||
"command": [
|
||||
"cipd_bin_packages/vpython${EXECUTABLE_SUFFIX}",
|
||||
"-u",
|
||||
"skia/infra/bots/run_recipe.py",
|
||||
"${ISOLATED_OUTDIR}",
|
||||
"upload_dm_results",
|
||||
"{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-DMSAA\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}",
|
||||
"skia"
|
||||
],
|
||||
"dependencies": [
|
||||
"Housekeeper-PerCommit-BundleRecipes",
|
||||
"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-DMSAA"
|
||||
],
|
||||
"dimensions": [
|
||||
"cpu:x86-64-Haswell_GCE",
|
||||
"gpu:none",
|
||||
"machine_type:n1-highmem-2",
|
||||
"os:Debian-10.3",
|
||||
"pool:Skia"
|
||||
],
|
||||
"env_prefixes": {
|
||||
"PATH": [
|
||||
"cipd_bin_packages",
|
||||
"cipd_bin_packages/bin"
|
||||
],
|
||||
"VPYTHON_VIRTUALENV_ROOT": [
|
||||
"cache/vpython"
|
||||
]
|
||||
},
|
||||
"execution_timeout_ns": 3600000000000,
|
||||
"extra_tags": {
|
||||
"log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations"
|
||||
},
|
||||
"io_timeout_ns": 3600000000000,
|
||||
"max_attempts": 2,
|
||||
"service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com"
|
||||
},
|
||||
"Upload-Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Dawn": {
|
||||
"caches": [
|
||||
{
|
||||
|
@ -570,8 +570,7 @@ void GrBlurUtils::drawShapeWithMaskFilter(GrRecordingContext* context,
|
||||
draw_shape_with_mask_filter(context, surfaceDrawContext, clip, std::move(grPaint),
|
||||
viewMatrix, mf, shape);
|
||||
} else {
|
||||
GrAA aa = GrAA(paint.isAntiAlias());
|
||||
surfaceDrawContext->drawShape(clip, std::move(grPaint), aa, viewMatrix,
|
||||
GrStyledShape(shape));
|
||||
surfaceDrawContext->drawShape(clip, std::move(grPaint), context->priv().chooseAA(paint),
|
||||
viewMatrix, GrStyledShape(shape));
|
||||
}
|
||||
}
|
||||
|
@ -8,6 +8,7 @@
|
||||
#ifndef GrRecordingContextPriv_DEFINED
|
||||
#define GrRecordingContextPriv_DEFINED
|
||||
|
||||
#include "include/core/SkPaint.h"
|
||||
#include "include/gpu/GrRecordingContext.h"
|
||||
#include "src/gpu/text/GrSDFTControl.h"
|
||||
|
||||
@ -25,6 +26,16 @@ public:
|
||||
|
||||
const GrContextOptions& options() const { return fContext->options(); }
|
||||
|
||||
#if GR_TEST_UTILS
|
||||
bool alwaysAntialias() const { return fContext->options().fAlwaysAntialias; }
|
||||
GrAA chooseAA(const SkPaint& paint) const {
|
||||
return GrAA(paint.isAntiAlias() || this->alwaysAntialias());
|
||||
}
|
||||
#else
|
||||
bool alwaysAntialias() const { return false; }
|
||||
GrAA chooseAA(const SkPaint& paint) const { return GrAA(paint.isAntiAlias()); }
|
||||
#endif
|
||||
|
||||
const GrCaps* caps() const { return fContext->caps(); }
|
||||
sk_sp<const GrCaps> refCaps() const;
|
||||
|
||||
|
@ -119,8 +119,9 @@ static SkImageInfo make_info(GrSurfaceDrawContext* context, bool opaque) {
|
||||
}
|
||||
|
||||
#if !defined(SK_DISABLE_NEW_GR_CLIP_STACK)
|
||||
static bool force_aa_clip(const GrSurfaceDrawContext* sdc) {
|
||||
return sdc->numSamples() > 1 && !sdc->caps()->multisampleDisableSupport();
|
||||
static bool force_aa_clip(const GrRecordingContext* context, const GrSurfaceDrawContext* sdc) {
|
||||
return (sdc->numSamples() > 1 && !sdc->caps()->multisampleDisableSupport()) ||
|
||||
context->priv().alwaysAntialias();
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -134,7 +135,7 @@ SkGpuDevice::SkGpuDevice(GrRecordingContext* context,
|
||||
#if !defined(SK_DISABLE_NEW_GR_CLIP_STACK)
|
||||
, fClip(SkIRect::MakeSize(fSurfaceDrawContext->dimensions()),
|
||||
&this->asMatrixProvider(),
|
||||
force_aa_clip(fSurfaceDrawContext.get())) {
|
||||
force_aa_clip(fContext.get(), fSurfaceDrawContext.get())) {
|
||||
#else
|
||||
, fClip(fSurfaceDrawContext->dimensions(), &this->cs(), &this->asMatrixProvider()) {
|
||||
#endif
|
||||
@ -264,14 +265,17 @@ void SkGpuDevice::onClipPath(const SkPath& path, SkClipOp op, bool aa) {
|
||||
void SkGpuDevice::onClipRegion(const SkRegion& globalRgn, SkClipOp op) {
|
||||
SkASSERT(op == SkClipOp::kIntersect || op == SkClipOp::kDifference);
|
||||
|
||||
// Regions don't actually need AA, but in DMSAA mode every clip element is antialiased.
|
||||
GrAA aa = GrAA(fContext->priv().alwaysAntialias());
|
||||
|
||||
if (globalRgn.isEmpty()) {
|
||||
fClip.clipRect(SkMatrix::I(), SkRect::MakeEmpty(), GrAA::kNo, op);
|
||||
fClip.clipRect(SkMatrix::I(), SkRect::MakeEmpty(), aa, op);
|
||||
} else if (globalRgn.isRect()) {
|
||||
fClip.clipRect(this->globalToDevice(), SkRect::Make(globalRgn.getBounds()), GrAA::kNo, op);
|
||||
fClip.clipRect(this->globalToDevice(), SkRect::Make(globalRgn.getBounds()), aa, op);
|
||||
} else {
|
||||
SkPath path;
|
||||
globalRgn.getBoundaryPath(&path);
|
||||
fClip.clipPath(this->globalToDevice(), path, GrAA::kNo, op);
|
||||
fClip.clipPath(this->globalToDevice(), path, aa, op);
|
||||
}
|
||||
}
|
||||
|
||||
@ -297,6 +301,7 @@ bool SkGpuDevice::onClipIsAA() const {
|
||||
if (e.fAA == GrAA::kYes) {
|
||||
return true;
|
||||
}
|
||||
SkASSERT(!fContext->priv().alwaysAntialias());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -351,6 +356,8 @@ void SkGpuDevice::drawPoints(SkCanvas::PointMode mode,
|
||||
return;
|
||||
}
|
||||
|
||||
GrAA aa = fContext->priv().chooseAA(paint);
|
||||
|
||||
if (paint.getPathEffect() && 2 == count && SkCanvas::kLines_PointMode == mode) {
|
||||
GrStyle style(paint, SkPaint::kStroke_Style);
|
||||
GrPaint grPaint;
|
||||
@ -362,8 +369,8 @@ void SkGpuDevice::drawPoints(SkCanvas::PointMode mode,
|
||||
path.setIsVolatile(true);
|
||||
path.moveTo(pts[0]);
|
||||
path.lineTo(pts[1]);
|
||||
fSurfaceDrawContext->drawPath(this->clip(), std::move(grPaint), GrAA(paint.isAntiAlias()),
|
||||
this->localToDevice(), path, style);
|
||||
fSurfaceDrawContext->drawPath(this->clip(), std::move(grPaint), aa, this->localToDevice(),
|
||||
path, style);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -373,7 +380,7 @@ void SkGpuDevice::drawPoints(SkCanvas::PointMode mode,
|
||||
SkScalarNearlyEqual(scales[0], 1.f) && SkScalarNearlyEqual(scales[1], 1.f));
|
||||
// we only handle non-antialiased hairlines and paints without path effects or mask filters,
|
||||
// else we let the SkDraw call our drawPath()
|
||||
if (!isHairline || paint.getPathEffect() || paint.getMaskFilter() || paint.isAntiAlias()) {
|
||||
if (!isHairline || paint.getPathEffect() || paint.getMaskFilter() || aa == GrAA::kYes) {
|
||||
SkRasterClip rc(this->devClipBounds());
|
||||
SkDraw draw;
|
||||
draw.fDst = SkPixmap(SkImageInfo::MakeUnknown(this->width(), this->height()), nullptr, 0);
|
||||
@ -433,8 +440,9 @@ void SkGpuDevice::drawRect(const SkRect& rect, const SkPaint& paint) {
|
||||
return;
|
||||
}
|
||||
|
||||
fSurfaceDrawContext->drawRect(this->clip(), std::move(grPaint), GrAA(paint.isAntiAlias()),
|
||||
this->localToDevice(), rect, &style);
|
||||
fSurfaceDrawContext->drawRect(this->clip(), std::move(grPaint),
|
||||
fContext->priv().chooseAA(paint), this->localToDevice(), rect,
|
||||
&style);
|
||||
}
|
||||
|
||||
void SkGpuDevice::drawEdgeAAQuad(const SkRect& rect, const SkPoint clip[4],
|
||||
@ -496,16 +504,18 @@ void SkGpuDevice::drawRRect(const SkRRect& rrect, const SkPaint& paint) {
|
||||
return;
|
||||
}
|
||||
|
||||
fSurfaceDrawContext->drawRRect(this->clip(), std::move(grPaint), GrAA(paint.isAntiAlias()),
|
||||
this->localToDevice(), rrect, style);
|
||||
fSurfaceDrawContext->drawRRect(this->clip(), std::move(grPaint),
|
||||
fContext->priv().chooseAA(paint), this->localToDevice(), rrect,
|
||||
style);
|
||||
}
|
||||
|
||||
static std::unique_ptr<GrFragmentProcessor> make_inverse_rrect_fp(const SkMatrix& viewMatrix,
|
||||
const SkRRect& rrect, bool aa,
|
||||
const SkRRect& rrect, GrAA aa,
|
||||
const GrShaderCaps& shaderCaps) {
|
||||
SkTCopyOnFirstWrite<SkRRect> devRRect(rrect);
|
||||
if (viewMatrix.isIdentity() || rrect.transform(viewMatrix, devRRect.writable())) {
|
||||
auto edgeType = (aa) ? GrClipEdgeType::kInverseFillAA : GrClipEdgeType::kInverseFillBW;
|
||||
auto edgeType = (aa == GrAA::kYes) ? GrClipEdgeType::kInverseFillAA
|
||||
: GrClipEdgeType::kInverseFillBW;
|
||||
auto [success, fp] = GrRRectEffect::Make(/*inputFP=*/nullptr, edgeType, *devRRect,
|
||||
shaderCaps);
|
||||
return (success) ? std::move(fp) : nullptr;
|
||||
@ -529,7 +539,8 @@ void SkGpuDevice::drawDRRect(const SkRRect& outer, const SkRRect& inner, const S
|
||||
if (stroke.isFillStyle() && !paint.getMaskFilter() && !paint.getPathEffect()) {
|
||||
// For axis-aligned filled DRRects, just draw a regular rrect with inner clipped out using a
|
||||
// coverage FP instead of using path rendering.
|
||||
if (auto fp = make_inverse_rrect_fp(this->localToDevice(), inner, paint.isAntiAlias(),
|
||||
if (auto fp = make_inverse_rrect_fp(this->localToDevice(), inner,
|
||||
fContext->priv().chooseAA(paint),
|
||||
*fSurfaceDrawContext->caps()->shaderCaps())) {
|
||||
GrPaint grPaint;
|
||||
if (!SkPaintToGrPaint(this->recordingContext(), fSurfaceDrawContext->colorInfo(), paint,
|
||||
@ -539,8 +550,8 @@ void SkGpuDevice::drawDRRect(const SkRRect& outer, const SkRRect& inner, const S
|
||||
SkASSERT(!grPaint.hasCoverageFragmentProcessor());
|
||||
grPaint.setCoverageFragmentProcessor(std::move(fp));
|
||||
fSurfaceDrawContext->drawRRect(this->clip(), std::move(grPaint),
|
||||
GrAA(paint.isAntiAlias()), this->localToDevice(), outer,
|
||||
GrStyle());
|
||||
fContext->priv().chooseAA(paint), this->localToDevice(),
|
||||
outer, GrStyle());
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -575,8 +586,9 @@ void SkGpuDevice::drawRegion(const SkRegion& region, const SkPaint& paint) {
|
||||
return;
|
||||
}
|
||||
|
||||
fSurfaceDrawContext->drawRegion(this->clip(), std::move(grPaint), GrAA(paint.isAntiAlias()),
|
||||
this->localToDevice(), region, GrStyle(paint));
|
||||
fSurfaceDrawContext->drawRegion(this->clip(), std::move(grPaint),
|
||||
fContext->priv().chooseAA(paint), this->localToDevice(), region,
|
||||
GrStyle(paint));
|
||||
}
|
||||
|
||||
void SkGpuDevice::drawOval(const SkRect& oval, const SkPaint& paint) {
|
||||
@ -595,8 +607,9 @@ void SkGpuDevice::drawOval(const SkRect& oval, const SkPaint& paint) {
|
||||
return;
|
||||
}
|
||||
|
||||
fSurfaceDrawContext->drawOval(this->clip(), std::move(grPaint), GrAA(paint.isAntiAlias()),
|
||||
this->localToDevice(), oval, GrStyle(paint));
|
||||
fSurfaceDrawContext->drawOval(this->clip(), std::move(grPaint),
|
||||
fContext->priv().chooseAA(paint), this->localToDevice(), oval,
|
||||
GrStyle(paint));
|
||||
}
|
||||
|
||||
void SkGpuDevice::drawArc(const SkRect& oval, SkScalar startAngle,
|
||||
@ -613,7 +626,7 @@ void SkGpuDevice::drawArc(const SkRect& oval, SkScalar startAngle,
|
||||
return;
|
||||
}
|
||||
|
||||
fSurfaceDrawContext->drawArc(this->clip(), std::move(grPaint), GrAA(paint.isAntiAlias()),
|
||||
fSurfaceDrawContext->drawArc(this->clip(), std::move(grPaint), fContext->priv().chooseAA(paint),
|
||||
this->localToDevice(), oval, startAngle, sweepAngle, useCenter,
|
||||
GrStyle(paint));
|
||||
}
|
||||
@ -637,8 +650,9 @@ void SkGpuDevice::drawPath(const SkPath& origSrcPath, const SkPaint& paint, bool
|
||||
this->asMatrixProvider(), &grPaint)) {
|
||||
return;
|
||||
}
|
||||
fSurfaceDrawContext->drawPath(this->clip(), std::move(grPaint), GrAA(paint.isAntiAlias()),
|
||||
this->localToDevice(), origSrcPath, GrStyle(paint));
|
||||
fSurfaceDrawContext->drawPath(this->clip(), std::move(grPaint),
|
||||
fContext->priv().chooseAA(paint), this->localToDevice(),
|
||||
origSrcPath, GrStyle(paint));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -748,9 +762,10 @@ void SkGpuDevice::drawImageRect(const SkImage* image, const SkRect* src, const S
|
||||
const SkSamplingOptions& sampling, const SkPaint& paint,
|
||||
SkCanvas::SrcRectConstraint constraint) {
|
||||
ASSERT_SINGLE_OWNER
|
||||
GrQuadAAFlags aaFlags = paint.isAntiAlias() ? GrQuadAAFlags::kAll : GrQuadAAFlags::kNone;
|
||||
this->drawImageQuad(image, src, &dst, nullptr, GrAA(paint.isAntiAlias()), aaFlags, nullptr,
|
||||
sampling, paint, constraint);
|
||||
GrAA aa = fContext->priv().chooseAA(paint);
|
||||
GrQuadAAFlags aaFlags = (aa == GrAA::kYes) ? GrQuadAAFlags::kAll : GrQuadAAFlags::kNone;
|
||||
this->drawImageQuad(image, src, &dst, nullptr, aa, aaFlags, nullptr, sampling, paint,
|
||||
constraint);
|
||||
}
|
||||
|
||||
void SkGpuDevice::drawViewLattice(GrSurfaceProxyView view,
|
||||
@ -1023,7 +1038,9 @@ bool SkGpuDevice::android_utils_clipWithStencil() {
|
||||
GrUserStencilOp::kReplace,
|
||||
0x1>()
|
||||
);
|
||||
sdc->drawRegion(nullptr, std::move(grPaint), GrAA::kNo, SkMatrix::I(), clipRegion,
|
||||
// Regions don't actually need AA, but in DMSAA mode everything is antialiased.
|
||||
GrAA aa = GrAA(fContext->priv().alwaysAntialias());
|
||||
sdc->drawRegion(nullptr, std::move(grPaint), aa, SkMatrix::I(), clipRegion,
|
||||
GrStyle::SimpleFill(), &kDrawToStencil);
|
||||
return true;
|
||||
}
|
||||
|
@ -673,8 +673,8 @@ void SkGpuDevice::drawSpecial(SkSpecialImage* special, const SkMatrix& localToDe
|
||||
SkMatrix srcToDst = SkMatrix::RectToRect(src, dst);
|
||||
|
||||
GrSamplerState sampler(GrSamplerState::WrapMode::kClamp, downgrade_to_filter(sampling));
|
||||
GrAA aa = paint.isAntiAlias() ? GrAA::kYes : GrAA::kNo;
|
||||
GrQuadAAFlags aaFlags = paint.isAntiAlias() ? GrQuadAAFlags::kAll : GrQuadAAFlags::kNone;
|
||||
GrAA aa = fContext->priv().chooseAA(paint);
|
||||
GrQuadAAFlags aaFlags = (aa == GrAA::kYes) ? GrQuadAAFlags::kAll : GrQuadAAFlags::kNone;
|
||||
|
||||
GrColorInfo colorInfo(SkColorTypeToGrColorType(special->colorType()),
|
||||
special->alphaType(), sk_ref_sp(special->getColorSpace()));
|
||||
|
@ -39,8 +39,8 @@ float4x3 unpack_rational_cubic(float2 p0, float2 p1, float2 p2, float2 p3) {
|
||||
if (isinf(P[3].y)) {
|
||||
// This patch is actually a conic. Convert to a rational cubic.
|
||||
float w = P[3].x;
|
||||
float3 c = P[1] * (2/3.0 * w);
|
||||
P = float4x3(P[0], fma(P[0], float3(1/3.0), c), fma(P[2], float3(1/3.0), c), P[2]);
|
||||
float3 c = P[1] * ((2.0/3.0) * w);
|
||||
P = float4x3(P[0], fma(P[0], float3(1.0/3.0), c), fma(P[2], float3(1.0/3.0), c), P[2]);
|
||||
}
|
||||
return P;
|
||||
})";
|
||||
@ -53,7 +53,7 @@ float3 safe_mix(float3 a, float3 b, float T, float one_minus_T) {
|
||||
return a*one_minus_T + b*T;
|
||||
}
|
||||
float2 eval_rational_cubic(float4x3 P, float T) {
|
||||
float one_minus_T = 1 - T;
|
||||
float one_minus_T = 1.0 - T;
|
||||
float3 ab = safe_mix(P[0], P[1], T, one_minus_T);
|
||||
float3 bc = safe_mix(P[1], P[2], T, one_minus_T);
|
||||
float3 cd = safe_mix(P[2], P[3], T, one_minus_T);
|
||||
|
@ -29,7 +29,7 @@ static const char* kCosineBetweenVectorsFn = R"(
|
||||
float cosine_between_vectors(float2 a, float2 b) {
|
||||
float ab_cosTheta = dot(a,b);
|
||||
float ab_pow2 = dot(a,a) * dot(b,b);
|
||||
return (ab_pow2 == 0) ? 1 : clamp(ab_cosTheta * inversesqrt(ab_pow2), -1, 1);
|
||||
return (ab_pow2 == 0.0) ? 1.0 : clamp(ab_cosTheta * inversesqrt(ab_pow2), -1.0, 1.0);
|
||||
})";
|
||||
|
||||
// Extends the middle radius to either the miter point, or the bevel edge if we surpassed the miter
|
||||
@ -77,7 +77,7 @@ static void append_wangs_formula_fn(SkString* code, bool hasConics) {
|
||||
if (hasConics) {
|
||||
code->appendf(R"(
|
||||
const float QUAD_TERM_POW2 = %f;
|
||||
m = (w > 0) ? QUAD_TERM_POW2 * l0 : m;)", GrWangsFormula::length_term_pow2<2>(1));
|
||||
m = (w > 0.0) ? QUAD_TERM_POW2 * l0 : m;)", GrWangsFormula::length_term_pow2<2>(1));
|
||||
}
|
||||
code->append(R"(
|
||||
return max(ceil(sqrt(parametricIntolerance * sqrt(m))), 1.0);
|
||||
@ -688,7 +688,7 @@ static void append_eval_stroke_edge_fn(SkString* code, bool hasConics) {
|
||||
// that we use to find a tangent.
|
||||
C *= w;
|
||||
B = .5*D - C;
|
||||
A = (w - 1) * D;
|
||||
A = (w - 1.0) * D;
|
||||
P[1] *= w;
|
||||
} else {)");
|
||||
} else {
|
||||
|
@ -38,6 +38,8 @@ static const struct {
|
||||
{ "gl", "gpu", "api=gl" },
|
||||
{ "gles", "gpu", "api=gles" },
|
||||
{ "glesfakev2", "gpu", "api=glesfakev2" },
|
||||
{ "gldmsaa", "gpu", "api=gl,dmsaa=true" },
|
||||
{ "glesdmsaa", "gpu", "api=gles,dmsaa=true" },
|
||||
{ "glmsaa4", "gpu", "api=gl,samples=4" },
|
||||
{ "glmsaa8" , "gpu", "api=gl,samples=8" },
|
||||
{ "glesmsaa4", "gpu", "api=gles,samples=4" },
|
||||
@ -143,7 +145,7 @@ static const char configExtendedHelp[] =
|
||||
"Extended form: 'backend(option=value,...)'\n\n"
|
||||
"Possible backends and options:\n"
|
||||
"\n"
|
||||
"gpu[api=string,color=string,dit=bool,samples=int]\n"
|
||||
"gpu[api=string,color=string,dit=bool,dmsaa=bool,samples=int]\n"
|
||||
"\tapi\ttype: string\trequired\n"
|
||||
"\t Select graphics API to use with gpu backend.\n"
|
||||
"\t Options:\n"
|
||||
@ -179,6 +181,8 @@ static const char configExtendedHelp[] =
|
||||
"\t\tf16\t\t\tLinearly blended 16-bit floating point.\n"
|
||||
"\tdit\ttype: bool\tdefault: false.\n"
|
||||
"\t Use device independent text.\n"
|
||||
"\tdmsaa\ttype: bool\tdefault: false.\n"
|
||||
"\t Use internal MSAA to render to non-MSAA surfaces.\n"
|
||||
"\tsamples\ttype: int\tdefault: 0.\n"
|
||||
"\t Use multisampling with N samples.\n"
|
||||
"\tstencils\ttype: bool\tdefault: true.\n"
|
||||
@ -470,6 +474,7 @@ SkCommandLineConfigGpu::SkCommandLineConfigGpu(const SkString& tag,
|
||||
bool fakeGLESVersion2,
|
||||
uint32_t surfaceFlags,
|
||||
int samples,
|
||||
bool useDMSAA,
|
||||
SkColorType colorType,
|
||||
SkAlphaType alphaType,
|
||||
sk_sp<SkColorSpace> colorSpace,
|
||||
@ -485,6 +490,7 @@ SkCommandLineConfigGpu::SkCommandLineConfigGpu(const SkString& tag,
|
||||
, fContextOverrides(ContextOverrides::kNone)
|
||||
, fSurfaceFlags(surfaceFlags)
|
||||
, fSamples(samples)
|
||||
, fUseDMSAA(samples)
|
||||
, fColorType(colorType)
|
||||
, fAlphaType(alphaType)
|
||||
, fColorSpace(std::move(colorSpace))
|
||||
@ -508,6 +514,7 @@ SkCommandLineConfigGpu* parse_command_line_config_gpu(const SkString&
|
||||
// Defaults for GPU backend.
|
||||
SkCommandLineConfigGpu::ContextType contextType = GrContextFactory::kGL_ContextType;
|
||||
bool useDIText = false;
|
||||
bool useDMSAA = false;
|
||||
int samples = 1;
|
||||
SkColorType colorType = kRGBA_8888_SkColorType;
|
||||
SkAlphaType alphaType = kPremul_SkAlphaType;
|
||||
@ -531,6 +538,7 @@ SkCommandLineConfigGpu* parse_command_line_config_gpu(const SkString&
|
||||
extendedOptions.get_option_gpu_api("api", &contextType, &fakeGLESVersion2, false) &&
|
||||
extendedOptions.get_option_bool("dit", &useDIText) &&
|
||||
extendedOptions.get_option_int("samples", &samples) &&
|
||||
extendedOptions.get_option_bool("dmsaa", &useDMSAA) &&
|
||||
extendedOptions.get_option_gpu_color("color", &colorType, &alphaType, &colorSpace) &&
|
||||
extendedOptions.get_option_bool("stencils", &useStencils) &&
|
||||
extendedOptions.get_option_bool("testThreading", &testThreading) &&
|
||||
@ -556,6 +564,7 @@ SkCommandLineConfigGpu* parse_command_line_config_gpu(const SkString&
|
||||
fakeGLESVersion2,
|
||||
surfaceFlags,
|
||||
samples,
|
||||
useDMSAA,
|
||||
colorType,
|
||||
alphaType,
|
||||
colorSpace,
|
||||
|
@ -57,6 +57,7 @@ public:
|
||||
bool fakeGLESVer2,
|
||||
uint32_t surfaceFlags,
|
||||
int samples,
|
||||
bool useDMSAA,
|
||||
SkColorType colorType,
|
||||
SkAlphaType alphaType,
|
||||
sk_sp<SkColorSpace> colorSpace,
|
||||
@ -73,6 +74,7 @@ public:
|
||||
ContextOverrides getContextOverrides() const { return fContextOverrides; }
|
||||
uint32_t getSurfaceFlags() const { return fSurfaceFlags; }
|
||||
int getSamples() const { return fSamples; }
|
||||
bool getUseDMSAA() const { return fUseDMSAA; }
|
||||
SkColorType getColorType() const { return fColorType; }
|
||||
SkAlphaType getAlphaType() const { return fAlphaType; }
|
||||
SkColorSpace* getColorSpace() const { return fColorSpace.get(); }
|
||||
@ -88,6 +90,7 @@ private:
|
||||
ContextOverrides fContextOverrides;
|
||||
uint32_t fSurfaceFlags;
|
||||
int fSamples;
|
||||
bool fUseDMSAA;
|
||||
SkColorType fColorType;
|
||||
SkAlphaType fAlphaType;
|
||||
sk_sp<SkColorSpace> fColorSpace;
|
||||
|
@ -566,6 +566,7 @@ int main(int argc, char** argv) {
|
||||
// Create a context.
|
||||
GrContextOptions ctxOptions;
|
||||
SetCtxOptionsFromCommonFlags(&ctxOptions);
|
||||
ctxOptions.fAlwaysAntialias = config->getUseDMSAA();
|
||||
sk_gpu_test::GrContextFactory factory(ctxOptions);
|
||||
sk_gpu_test::ContextInfo ctxInfo =
|
||||
factory.getContextInfo(config->getContextType(), config->getContextOverrides());
|
||||
|
@ -133,6 +133,7 @@ static DEFINE_bool(list, false, "List samples?");
|
||||
static DEFINE_string2(backend, b, "sw", "Backend to use. Allowed values are " BACKENDS_STR ".");
|
||||
|
||||
static DEFINE_int(msaa, 1, "Number of subpixel samples. 0 for no HW antialiasing.");
|
||||
static DEFINE_bool(dmsaa, false, "Use internal MSAA to render to non-MSAA surfaces?");
|
||||
|
||||
static DEFINE_string(bisect, "", "Path to a .skp or .svg file to bisect.");
|
||||
|
||||
@ -378,6 +379,7 @@ Viewer::Viewer(int argc, char** argv, void* platformData)
|
||||
GrContextOptions::ShaderCacheStrategy::kBackendSource;
|
||||
displayParams.fGrContextOptions.fShaderErrorHandler = &gShaderErrorHandler;
|
||||
displayParams.fGrContextOptions.fSuppressPrints = true;
|
||||
displayParams.fGrContextOptions.fAlwaysAntialias = FLAGS_dmsaa;
|
||||
fWindow->setRequestedDisplayParams(displayParams);
|
||||
fDisplay = fWindow->getRequestedDisplayParams();
|
||||
fRefresh = FLAGS_redraw;
|
||||
|
Loading…
Reference in New Issue
Block a user