Add config options to run different GPU APIs to dm and nanobench
Add extended config specification form that can be used to run different
gpu backend with different APIs.
The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)
This replaces and removes the --gpuAPI flag.
All existing configs should still work.
Adds following documentation:
out/Debug/dm --help config
Flags:
--config: type: string default: 565 8888 gpu nonrendering
Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
xps or use extended form 'backend(option=value,...)'.
Extended form: 'backend(option=value,...)'
Possible backends and options:
gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
api type: string default: native.
Select graphics API to use with gpu backend.
Options:
native Use platform default OpenGL or OpenGL ES backend.
gl Use OpenGL.
gles Use OpenGL ES.
debug Use debug OpenGL.
null Use null OpenGL.
dit type: bool default: false.
Use device independent text.
nvpr type: bool default: false.
Use NV_path_rendering OpenGL and OpenGL ES extension.
samples type: int default: 0.
Use multisampling with N samples.
Predefined configs:
gpu = gpu()
msaa4 = gpu(samples=4)
msaa16 = gpu(samples=16)
nvprmsaa4 = gpu(nvpr=true,samples=4)
nvprmsaa16 = gpu(nvpr=true,samples=16)
gpudft = gpu(dit=true)
gpudebug = gpu(api=debug)
gpunull = gpu(api=null)
debug = gpu(api=debug)
nullgpu = gpu(api=null)
BUG=skia:2992
Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005
Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b
Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd
Review URL: https://codereview.chromium.org/1490113005
2015-12-23 09:33:00 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2015 Google Inc.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
|
|
* found in the LICENSE file.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "SkCommonFlagsConfig.h"
|
2016-09-13 17:41:49 +00:00
|
|
|
#include "SkImageInfo.h"
|
Add config options to run different GPU APIs to dm and nanobench
Add extended config specification form that can be used to run different
gpu backend with different APIs.
The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)
This replaces and removes the --gpuAPI flag.
All existing configs should still work.
Adds following documentation:
out/Debug/dm --help config
Flags:
--config: type: string default: 565 8888 gpu nonrendering
Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
xps or use extended form 'backend(option=value,...)'.
Extended form: 'backend(option=value,...)'
Possible backends and options:
gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
api type: string default: native.
Select graphics API to use with gpu backend.
Options:
native Use platform default OpenGL or OpenGL ES backend.
gl Use OpenGL.
gles Use OpenGL ES.
debug Use debug OpenGL.
null Use null OpenGL.
dit type: bool default: false.
Use device independent text.
nvpr type: bool default: false.
Use NV_path_rendering OpenGL and OpenGL ES extension.
samples type: int default: 0.
Use multisampling with N samples.
Predefined configs:
gpu = gpu()
msaa4 = gpu(samples=4)
msaa16 = gpu(samples=16)
nvprmsaa4 = gpu(nvpr=true,samples=4)
nvprmsaa16 = gpu(nvpr=true,samples=16)
gpudft = gpu(dit=true)
gpudebug = gpu(api=debug)
gpunull = gpu(api=null)
debug = gpu(api=debug)
nullgpu = gpu(api=null)
BUG=skia:2992
Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005
Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b
Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd
Review URL: https://codereview.chromium.org/1490113005
2015-12-23 09:33:00 +00:00
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
2016-03-31 01:56:19 +00:00
|
|
|
#if SK_SUPPORT_GPU
|
|
|
|
using sk_gpu_test::GrContextFactory;
|
|
|
|
#endif
|
|
|
|
|
2017-03-20 12:54:16 +00:00
|
|
|
#if defined(SK_BUILD_FOR_ANDROID) || defined(SK_BUILD_FOR_IOS)
|
|
|
|
# define DEFAULT_GPU_CONFIG "gles"
|
|
|
|
#else
|
|
|
|
# define DEFAULT_GPU_CONFIG "gl"
|
|
|
|
#endif
|
|
|
|
|
Add config options to run different GPU APIs to dm and nanobench
Add extended config specification form that can be used to run different
gpu backend with different APIs.
The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)
This replaces and removes the --gpuAPI flag.
All existing configs should still work.
Adds following documentation:
out/Debug/dm --help config
Flags:
--config: type: string default: 565 8888 gpu nonrendering
Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
xps or use extended form 'backend(option=value,...)'.
Extended form: 'backend(option=value,...)'
Possible backends and options:
gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
api type: string default: native.
Select graphics API to use with gpu backend.
Options:
native Use platform default OpenGL or OpenGL ES backend.
gl Use OpenGL.
gles Use OpenGL ES.
debug Use debug OpenGL.
null Use null OpenGL.
dit type: bool default: false.
Use device independent text.
nvpr type: bool default: false.
Use NV_path_rendering OpenGL and OpenGL ES extension.
samples type: int default: 0.
Use multisampling with N samples.
Predefined configs:
gpu = gpu()
msaa4 = gpu(samples=4)
msaa16 = gpu(samples=16)
nvprmsaa4 = gpu(nvpr=true,samples=4)
nvprmsaa16 = gpu(nvpr=true,samples=16)
gpudft = gpu(dit=true)
gpudebug = gpu(api=debug)
gpunull = gpu(api=null)
debug = gpu(api=debug)
nullgpu = gpu(api=null)
BUG=skia:2992
Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005
Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b
Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd
Review URL: https://codereview.chromium.org/1490113005
2015-12-23 09:33:00 +00:00
|
|
|
static const char defaultConfigs[] =
|
2017-03-20 12:54:16 +00:00
|
|
|
"8888 " DEFAULT_GPU_CONFIG " nonrendering "
|
2016-10-14 15:13:48 +00:00
|
|
|
#if defined(SK_BUILD_FOR_WIN)
|
|
|
|
" angle_d3d11_es2"
|
Add config options to run different GPU APIs to dm and nanobench
Add extended config specification form that can be used to run different
gpu backend with different APIs.
The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)
This replaces and removes the --gpuAPI flag.
All existing configs should still work.
Adds following documentation:
out/Debug/dm --help config
Flags:
--config: type: string default: 565 8888 gpu nonrendering
Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
xps or use extended form 'backend(option=value,...)'.
Extended form: 'backend(option=value,...)'
Possible backends and options:
gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
api type: string default: native.
Select graphics API to use with gpu backend.
Options:
native Use platform default OpenGL or OpenGL ES backend.
gl Use OpenGL.
gles Use OpenGL ES.
debug Use debug OpenGL.
null Use null OpenGL.
dit type: bool default: false.
Use device independent text.
nvpr type: bool default: false.
Use NV_path_rendering OpenGL and OpenGL ES extension.
samples type: int default: 0.
Use multisampling with N samples.
Predefined configs:
gpu = gpu()
msaa4 = gpu(samples=4)
msaa16 = gpu(samples=16)
nvprmsaa4 = gpu(nvpr=true,samples=4)
nvprmsaa16 = gpu(nvpr=true,samples=16)
gpudft = gpu(dit=true)
gpudebug = gpu(api=debug)
gpunull = gpu(api=null)
debug = gpu(api=debug)
nullgpu = gpu(api=null)
BUG=skia:2992
Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005
Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b
Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd
Review URL: https://codereview.chromium.org/1490113005
2015-12-23 09:33:00 +00:00
|
|
|
#endif
|
|
|
|
;
|
|
|
|
|
2017-03-20 12:54:16 +00:00
|
|
|
#undef DEFAULT_GPU_CONFIG
|
|
|
|
|
2016-09-20 15:06:30 +00:00
|
|
|
static const struct {
|
|
|
|
const char* predefinedConfig;
|
|
|
|
const char* backend;
|
|
|
|
const char* options;
|
|
|
|
} gPredefinedConfigs[] ={
|
|
|
|
#if SK_SUPPORT_GPU
|
2016-10-18 15:28:20 +00:00
|
|
|
{ "gl", "gpu", "api=gl" },
|
2017-03-17 18:32:05 +00:00
|
|
|
{ "gles", "gpu", "api=gles" },
|
2016-10-18 15:28:20 +00:00
|
|
|
{ "glmsaa4", "gpu", "api=gl,samples=4" },
|
2017-03-20 15:10:21 +00:00
|
|
|
{ "glmsaa8" , "gpu", "api=gl,samples=8" },
|
2017-03-17 18:32:05 +00:00
|
|
|
{ "glesmsaa4", "gpu", "api=gles,samples=4" },
|
2016-10-18 15:28:20 +00:00
|
|
|
{ "glnvpr4", "gpu", "api=gl,nvpr=true,samples=4" },
|
2017-03-20 15:10:21 +00:00
|
|
|
{ "glnvpr8" , "gpu", "api=gl,nvpr=true,samples=8" },
|
2016-10-18 15:28:20 +00:00
|
|
|
{ "glnvprdit4", "gpu", "api=gl,nvpr=true,samples=4,dit=true" },
|
2017-03-20 15:10:21 +00:00
|
|
|
{ "glnvprdit8" , "gpu", "api=gl,nvpr=true,samples=8,dit=true" },
|
2017-03-17 18:32:05 +00:00
|
|
|
{ "glesnvpr4", "gpu", "api=gles,nvpr=true,samples=4" },
|
|
|
|
{ "glesnvprdit4", "gpu", "api=gles,nvpr=true,samples=4,dit=true" },
|
2017-07-17 15:31:31 +00:00
|
|
|
{ "gl4444", "gpu", "api=gl,color=4444" },
|
|
|
|
{ "gl565", "gpu", "api=gl,color=565" },
|
2017-03-20 12:54:16 +00:00
|
|
|
{ "glf16", "gpu", "api=gl,color=f16" },
|
|
|
|
{ "glsrgb", "gpu", "api=gl,color=srgb" },
|
|
|
|
{ "glsrgbnl", "gpu", "api=gl,color=srgbnl" },
|
|
|
|
{ "glesf16", "gpu", "api=gles,color=f16" },
|
|
|
|
{ "glessrgb", "gpu", "api=gles,color=srgb" },
|
|
|
|
{ "glessrgbnl", "gpu", "api=gles,color=srgbnl" },
|
2016-10-18 15:28:20 +00:00
|
|
|
{ "glsrgb", "gpu", "api=gl,color=srgb" },
|
|
|
|
{ "glwide", "gpu", "api=gl,color=f16_wide" },
|
|
|
|
{ "glnarrow", "gpu", "api=gl,color=f16_narrow" },
|
2017-05-08 19:02:07 +00:00
|
|
|
{ "glnostencils", "gpu", "api=gl,stencils=false" },
|
2018-01-24 22:25:03 +00:00
|
|
|
{ "gles4444", "gpu", "api=gles,color=4444" },
|
2017-03-17 18:32:05 +00:00
|
|
|
{ "glessrgb", "gpu", "api=gles,color=srgb" },
|
|
|
|
{ "gleswide", "gpu", "api=gles,color=f16_wide" },
|
|
|
|
{ "glesnarrow", "gpu", "api=gles,color=f16_narrow" },
|
|
|
|
{ "gldft", "gpu", "api=gl,dit=true" },
|
|
|
|
{ "glesdft", "gpu", "api=gles,dit=true" },
|
2017-08-30 14:02:10 +00:00
|
|
|
{ "gltestthreading", "gpu", "api=gl,testThreading=true" },
|
2017-03-20 12:54:16 +00:00
|
|
|
{ "debuggl", "gpu", "api=debuggl" },
|
|
|
|
{ "nullgl", "gpu", "api=nullgl" },
|
2016-10-18 15:28:20 +00:00
|
|
|
{ "angle_d3d11_es2", "gpu", "api=angle_d3d11_es2" },
|
2017-01-10 18:31:33 +00:00
|
|
|
{ "angle_d3d11_es3", "gpu", "api=angle_d3d11_es3" },
|
2016-10-18 15:28:20 +00:00
|
|
|
{ "angle_d3d9_es2", "gpu", "api=angle_d3d9_es2" },
|
|
|
|
{ "angle_d3d11_es2_msaa4", "gpu", "api=angle_d3d11_es2,samples=4" },
|
2017-03-24 15:15:09 +00:00
|
|
|
{ "angle_d3d11_es2_msaa8", "gpu", "api=angle_d3d11_es2,samples=8" },
|
2017-06-22 13:56:24 +00:00
|
|
|
{ "angle_d3d11_es3_msaa4", "gpu", "api=angle_d3d11_es3,samples=4" },
|
|
|
|
{ "angle_d3d11_es3_msaa8", "gpu", "api=angle_d3d11_es3,samples=8" },
|
2016-10-18 15:28:20 +00:00
|
|
|
{ "angle_gl_es2", "gpu", "api=angle_gl_es2" },
|
2017-01-10 18:31:33 +00:00
|
|
|
{ "angle_gl_es3", "gpu", "api=angle_gl_es3" },
|
2017-07-07 16:56:11 +00:00
|
|
|
{ "commandbuffer", "gpu", "api=commandbuffer" },
|
|
|
|
{ "mock", "gpu", "api=mock" }
|
2016-09-20 15:06:30 +00:00
|
|
|
#ifdef SK_VULKAN
|
2016-10-18 15:28:20 +00:00
|
|
|
,{ "vk", "gpu", "api=vulkan" }
|
|
|
|
,{ "vksrgb", "gpu", "api=vulkan,color=srgb" }
|
|
|
|
,{ "vkwide", "gpu", "api=vulkan,color=f16_wide" }
|
|
|
|
,{ "vkmsaa4", "gpu", "api=vulkan,samples=4" }
|
2017-03-20 15:10:21 +00:00
|
|
|
,{ "vkmsaa8", "gpu", "api=vulkan,samples=8" }
|
2016-09-20 15:06:30 +00:00
|
|
|
#endif
|
2017-07-13 19:34:56 +00:00
|
|
|
#ifdef SK_METAL
|
|
|
|
,{ "mtl", "gpu", "api=metal" }
|
|
|
|
,{ "mtlsrgb", "gpu", "api=metal,color=srgb" }
|
|
|
|
,{ "mtlwide", "gpu", "api=metal,color=f16_wide" }
|
|
|
|
,{ "mtlmsaa4", "gpu", "api=metal,samples=4" }
|
|
|
|
,{ "mtlmsaa8", "gpu", "api=metal,samples=8" }
|
|
|
|
#endif
|
2016-09-20 15:06:30 +00:00
|
|
|
#else
|
2017-07-07 16:56:11 +00:00
|
|
|
{ "", "", "" }
|
Add config options to run different GPU APIs to dm and nanobench
Add extended config specification form that can be used to run different
gpu backend with different APIs.
The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)
This replaces and removes the --gpuAPI flag.
All existing configs should still work.
Adds following documentation:
out/Debug/dm --help config
Flags:
--config: type: string default: 565 8888 gpu nonrendering
Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
xps or use extended form 'backend(option=value,...)'.
Extended form: 'backend(option=value,...)'
Possible backends and options:
gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
api type: string default: native.
Select graphics API to use with gpu backend.
Options:
native Use platform default OpenGL or OpenGL ES backend.
gl Use OpenGL.
gles Use OpenGL ES.
debug Use debug OpenGL.
null Use null OpenGL.
dit type: bool default: false.
Use device independent text.
nvpr type: bool default: false.
Use NV_path_rendering OpenGL and OpenGL ES extension.
samples type: int default: 0.
Use multisampling with N samples.
Predefined configs:
gpu = gpu()
msaa4 = gpu(samples=4)
msaa16 = gpu(samples=16)
nvprmsaa4 = gpu(nvpr=true,samples=4)
nvprmsaa16 = gpu(nvpr=true,samples=16)
gpudft = gpu(dit=true)
gpudebug = gpu(api=debug)
gpunull = gpu(api=null)
debug = gpu(api=debug)
nullgpu = gpu(api=null)
BUG=skia:2992
Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005
Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b
Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd
Review URL: https://codereview.chromium.org/1490113005
2015-12-23 09:33:00 +00:00
|
|
|
#endif
|
2016-09-20 15:06:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static const char configHelp[] =
|
2017-01-05 14:50:22 +00:00
|
|
|
"Options: 565 8888 srgb f16 nonrendering null pdf pdfa skp pipe svg xps";
|
2016-09-20 15:06:30 +00:00
|
|
|
|
|
|
|
static const char* config_help_fn() {
|
|
|
|
static SkString helpString;
|
|
|
|
helpString.set(configHelp);
|
|
|
|
for (const auto& config : gPredefinedConfigs) {
|
|
|
|
helpString.appendf(" %s", config.predefinedConfig);
|
|
|
|
}
|
2016-09-28 19:40:22 +00:00
|
|
|
helpString.append(" or use extended form 'backend[option=value,...]'.\n");
|
2016-09-20 15:06:30 +00:00
|
|
|
return helpString.c_str();
|
|
|
|
}
|
Add config options to run different GPU APIs to dm and nanobench
Add extended config specification form that can be used to run different
gpu backend with different APIs.
The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)
This replaces and removes the --gpuAPI flag.
All existing configs should still work.
Adds following documentation:
out/Debug/dm --help config
Flags:
--config: type: string default: 565 8888 gpu nonrendering
Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
xps or use extended form 'backend(option=value,...)'.
Extended form: 'backend(option=value,...)'
Possible backends and options:
gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
api type: string default: native.
Select graphics API to use with gpu backend.
Options:
native Use platform default OpenGL or OpenGL ES backend.
gl Use OpenGL.
gles Use OpenGL ES.
debug Use debug OpenGL.
null Use null OpenGL.
dit type: bool default: false.
Use device independent text.
nvpr type: bool default: false.
Use NV_path_rendering OpenGL and OpenGL ES extension.
samples type: int default: 0.
Use multisampling with N samples.
Predefined configs:
gpu = gpu()
msaa4 = gpu(samples=4)
msaa16 = gpu(samples=16)
nvprmsaa4 = gpu(nvpr=true,samples=4)
nvprmsaa16 = gpu(nvpr=true,samples=16)
gpudft = gpu(dit=true)
gpudebug = gpu(api=debug)
gpunull = gpu(api=null)
debug = gpu(api=debug)
nullgpu = gpu(api=null)
BUG=skia:2992
Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005
Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b
Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd
Review URL: https://codereview.chromium.org/1490113005
2015-12-23 09:33:00 +00:00
|
|
|
|
|
|
|
static const char configExtendedHelp[] =
|
|
|
|
"Extended form: 'backend(option=value,...)'\n\n"
|
|
|
|
"Possible backends and options:\n"
|
|
|
|
#if SK_SUPPORT_GPU
|
|
|
|
"\n"
|
2016-09-28 19:40:22 +00:00
|
|
|
"gpu[api=string,color=string,dit=bool,nvpr=bool,inst=bool,samples=int]\n"
|
2017-03-20 12:54:16 +00:00
|
|
|
"\tapi\ttype: string\trequired\n"
|
Add config options to run different GPU APIs to dm and nanobench
Add extended config specification form that can be used to run different
gpu backend with different APIs.
The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)
This replaces and removes the --gpuAPI flag.
All existing configs should still work.
Adds following documentation:
out/Debug/dm --help config
Flags:
--config: type: string default: 565 8888 gpu nonrendering
Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
xps or use extended form 'backend(option=value,...)'.
Extended form: 'backend(option=value,...)'
Possible backends and options:
gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
api type: string default: native.
Select graphics API to use with gpu backend.
Options:
native Use platform default OpenGL or OpenGL ES backend.
gl Use OpenGL.
gles Use OpenGL ES.
debug Use debug OpenGL.
null Use null OpenGL.
dit type: bool default: false.
Use device independent text.
nvpr type: bool default: false.
Use NV_path_rendering OpenGL and OpenGL ES extension.
samples type: int default: 0.
Use multisampling with N samples.
Predefined configs:
gpu = gpu()
msaa4 = gpu(samples=4)
msaa16 = gpu(samples=16)
nvprmsaa4 = gpu(nvpr=true,samples=4)
nvprmsaa16 = gpu(nvpr=true,samples=16)
gpudft = gpu(dit=true)
gpudebug = gpu(api=debug)
gpunull = gpu(api=null)
debug = gpu(api=debug)
nullgpu = gpu(api=null)
BUG=skia:2992
Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005
Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b
Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd
Review URL: https://codereview.chromium.org/1490113005
2015-12-23 09:33:00 +00:00
|
|
|
"\t Select graphics API to use with gpu backend.\n"
|
|
|
|
"\t Options:\n"
|
|
|
|
"\t\tgl \t\t\tUse OpenGL.\n"
|
|
|
|
"\t\tgles \t\t\tUse OpenGL ES.\n"
|
2017-03-20 12:54:16 +00:00
|
|
|
"\t\tdebuggl \t\t\tUse debug OpenGL.\n"
|
|
|
|
"\t\tnullgl \t\t\tUse null OpenGL.\n"
|
2016-10-14 15:13:48 +00:00
|
|
|
"\t\tangle_d3d9_es2\t\t\tUse OpenGL ES2 on the ANGLE Direct3D9 backend.\n"
|
|
|
|
"\t\tangle_d3d11_es2\t\t\tUse OpenGL ES2 on the ANGLE Direct3D11 backend.\n"
|
|
|
|
"\t\tangle_d3d11_es3\t\t\tUse OpenGL ES3 on the ANGLE Direct3D11 backend.\n"
|
|
|
|
"\t\tangle_gl_es2\t\t\tUse OpenGL ES2 on the ANGLE OpenGL backend.\n"
|
|
|
|
"\t\tangle_gl_es3\t\t\tUse OpenGL ES3 on the ANGLE OpenGL backend.\n"
|
Add config options to run different GPU APIs to dm and nanobench
Add extended config specification form that can be used to run different
gpu backend with different APIs.
The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)
This replaces and removes the --gpuAPI flag.
All existing configs should still work.
Adds following documentation:
out/Debug/dm --help config
Flags:
--config: type: string default: 565 8888 gpu nonrendering
Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
xps or use extended form 'backend(option=value,...)'.
Extended form: 'backend(option=value,...)'
Possible backends and options:
gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
api type: string default: native.
Select graphics API to use with gpu backend.
Options:
native Use platform default OpenGL or OpenGL ES backend.
gl Use OpenGL.
gles Use OpenGL ES.
debug Use debug OpenGL.
null Use null OpenGL.
dit type: bool default: false.
Use device independent text.
nvpr type: bool default: false.
Use NV_path_rendering OpenGL and OpenGL ES extension.
samples type: int default: 0.
Use multisampling with N samples.
Predefined configs:
gpu = gpu()
msaa4 = gpu(samples=4)
msaa16 = gpu(samples=16)
nvprmsaa4 = gpu(nvpr=true,samples=4)
nvprmsaa16 = gpu(nvpr=true,samples=16)
gpudft = gpu(dit=true)
gpudebug = gpu(api=debug)
gpunull = gpu(api=null)
debug = gpu(api=debug)
nullgpu = gpu(api=null)
BUG=skia:2992
Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005
Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b
Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd
Review URL: https://codereview.chromium.org/1490113005
2015-12-23 09:33:00 +00:00
|
|
|
"\t\tcommandbuffer\t\tUse command buffer.\n"
|
2017-07-07 16:56:11 +00:00
|
|
|
"\t\tmock\t\tUse mock context.\n"
|
2016-04-11 21:21:33 +00:00
|
|
|
#ifdef SK_VULKAN
|
|
|
|
"\t\tvulkan\t\t\tUse Vulkan.\n"
|
2017-07-13 19:34:56 +00:00
|
|
|
#endif
|
|
|
|
#ifdef SK_METAL
|
|
|
|
"\t\tmetal\t\t\tUse Metal.\n"
|
Add config options to run different GPU APIs to dm and nanobench
Add extended config specification form that can be used to run different
gpu backend with different APIs.
The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)
This replaces and removes the --gpuAPI flag.
All existing configs should still work.
Adds following documentation:
out/Debug/dm --help config
Flags:
--config: type: string default: 565 8888 gpu nonrendering
Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
xps or use extended form 'backend(option=value,...)'.
Extended form: 'backend(option=value,...)'
Possible backends and options:
gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
api type: string default: native.
Select graphics API to use with gpu backend.
Options:
native Use platform default OpenGL or OpenGL ES backend.
gl Use OpenGL.
gles Use OpenGL ES.
debug Use debug OpenGL.
null Use null OpenGL.
dit type: bool default: false.
Use device independent text.
nvpr type: bool default: false.
Use NV_path_rendering OpenGL and OpenGL ES extension.
samples type: int default: 0.
Use multisampling with N samples.
Predefined configs:
gpu = gpu()
msaa4 = gpu(samples=4)
msaa16 = gpu(samples=16)
nvprmsaa4 = gpu(nvpr=true,samples=4)
nvprmsaa16 = gpu(nvpr=true,samples=16)
gpudft = gpu(dit=true)
gpudebug = gpu(api=debug)
gpunull = gpu(api=null)
debug = gpu(api=debug)
nullgpu = gpu(api=null)
BUG=skia:2992
Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005
Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b
Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd
Review URL: https://codereview.chromium.org/1490113005
2015-12-23 09:33:00 +00:00
|
|
|
#endif
|
2016-03-10 15:49:08 +00:00
|
|
|
"\tcolor\ttype: string\tdefault: 8888.\n"
|
|
|
|
"\t Select framebuffer color format.\n"
|
|
|
|
"\t Options:\n"
|
|
|
|
"\t\t8888\t\t\tLinear 8888.\n"
|
2017-07-17 15:31:31 +00:00
|
|
|
"\t\t4444\t\t\tLinear 4444.\n"
|
|
|
|
"\t\t565\t\t\tLinear 565.\n"
|
2016-09-19 21:42:04 +00:00
|
|
|
"\t\tf16{_gamut}\t\tLinear 16-bit floating point.\n"
|
|
|
|
"\t\tsrgb{_gamut}\t\tsRGB 8888.\n"
|
|
|
|
"\t gamut\ttype: string\tdefault: srgb.\n"
|
|
|
|
"\t Select color gamut for f16 or sRGB format buffers.\n"
|
|
|
|
"\t Options:\n"
|
|
|
|
"\t\tsrgb\t\t\tsRGB gamut.\n"
|
|
|
|
"\t\twide\t\t\tWide Gamut RGB.\n"
|
Add config options to run different GPU APIs to dm and nanobench
Add extended config specification form that can be used to run different
gpu backend with different APIs.
The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)
This replaces and removes the --gpuAPI flag.
All existing configs should still work.
Adds following documentation:
out/Debug/dm --help config
Flags:
--config: type: string default: 565 8888 gpu nonrendering
Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
xps or use extended form 'backend(option=value,...)'.
Extended form: 'backend(option=value,...)'
Possible backends and options:
gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
api type: string default: native.
Select graphics API to use with gpu backend.
Options:
native Use platform default OpenGL or OpenGL ES backend.
gl Use OpenGL.
gles Use OpenGL ES.
debug Use debug OpenGL.
null Use null OpenGL.
dit type: bool default: false.
Use device independent text.
nvpr type: bool default: false.
Use NV_path_rendering OpenGL and OpenGL ES extension.
samples type: int default: 0.
Use multisampling with N samples.
Predefined configs:
gpu = gpu()
msaa4 = gpu(samples=4)
msaa16 = gpu(samples=16)
nvprmsaa4 = gpu(nvpr=true,samples=4)
nvprmsaa16 = gpu(nvpr=true,samples=16)
gpudft = gpu(dit=true)
gpudebug = gpu(api=debug)
gpunull = gpu(api=null)
debug = gpu(api=debug)
nullgpu = gpu(api=null)
BUG=skia:2992
Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005
Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b
Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd
Review URL: https://codereview.chromium.org/1490113005
2015-12-23 09:33:00 +00:00
|
|
|
"\tdit\ttype: bool\tdefault: false.\n"
|
|
|
|
"\t Use device independent text.\n"
|
|
|
|
"\tnvpr\ttype: bool\tdefault: false.\n"
|
|
|
|
"\t Use NV_path_rendering OpenGL and OpenGL ES extension.\n"
|
|
|
|
"\tsamples\ttype: int\tdefault: 0.\n"
|
|
|
|
"\t Use multisampling with N samples.\n"
|
2017-05-08 19:02:07 +00:00
|
|
|
"\tstencils\ttype: bool\tdefault: true.\n"
|
|
|
|
"\t Allow the use of stencil buffers.\n"
|
2017-08-30 14:02:10 +00:00
|
|
|
"\ttestThreading\ttype: bool\tdefault: false.\n"
|
|
|
|
"\t Run config with and without worker threads, check that results match.\n"
|
Add config options to run different GPU APIs to dm and nanobench
Add extended config specification form that can be used to run different
gpu backend with different APIs.
The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)
This replaces and removes the --gpuAPI flag.
All existing configs should still work.
Adds following documentation:
out/Debug/dm --help config
Flags:
--config: type: string default: 565 8888 gpu nonrendering
Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
xps or use extended form 'backend(option=value,...)'.
Extended form: 'backend(option=value,...)'
Possible backends and options:
gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
api type: string default: native.
Select graphics API to use with gpu backend.
Options:
native Use platform default OpenGL or OpenGL ES backend.
gl Use OpenGL.
gles Use OpenGL ES.
debug Use debug OpenGL.
null Use null OpenGL.
dit type: bool default: false.
Use device independent text.
nvpr type: bool default: false.
Use NV_path_rendering OpenGL and OpenGL ES extension.
samples type: int default: 0.
Use multisampling with N samples.
Predefined configs:
gpu = gpu()
msaa4 = gpu(samples=4)
msaa16 = gpu(samples=16)
nvprmsaa4 = gpu(nvpr=true,samples=4)
nvprmsaa16 = gpu(nvpr=true,samples=16)
gpudft = gpu(dit=true)
gpudebug = gpu(api=debug)
gpunull = gpu(api=null)
debug = gpu(api=debug)
nullgpu = gpu(api=null)
BUG=skia:2992
Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005
Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b
Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd
Review URL: https://codereview.chromium.org/1490113005
2015-12-23 09:33:00 +00:00
|
|
|
"\n"
|
|
|
|
"Predefined configs:\n\n"
|
2016-09-20 15:06:30 +00:00
|
|
|
// Help text for pre-defined configs is auto-generated from gPredefinedConfigs
|
Add config options to run different GPU APIs to dm and nanobench
Add extended config specification form that can be used to run different
gpu backend with different APIs.
The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)
This replaces and removes the --gpuAPI flag.
All existing configs should still work.
Adds following documentation:
out/Debug/dm --help config
Flags:
--config: type: string default: 565 8888 gpu nonrendering
Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
xps or use extended form 'backend(option=value,...)'.
Extended form: 'backend(option=value,...)'
Possible backends and options:
gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
api type: string default: native.
Select graphics API to use with gpu backend.
Options:
native Use platform default OpenGL or OpenGL ES backend.
gl Use OpenGL.
gles Use OpenGL ES.
debug Use debug OpenGL.
null Use null OpenGL.
dit type: bool default: false.
Use device independent text.
nvpr type: bool default: false.
Use NV_path_rendering OpenGL and OpenGL ES extension.
samples type: int default: 0.
Use multisampling with N samples.
Predefined configs:
gpu = gpu()
msaa4 = gpu(samples=4)
msaa16 = gpu(samples=16)
nvprmsaa4 = gpu(nvpr=true,samples=4)
nvprmsaa16 = gpu(nvpr=true,samples=16)
gpudft = gpu(dit=true)
gpudebug = gpu(api=debug)
gpunull = gpu(api=null)
debug = gpu(api=debug)
nullgpu = gpu(api=null)
BUG=skia:2992
Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005
Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b
Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd
Review URL: https://codereview.chromium.org/1490113005
2015-12-23 09:33:00 +00:00
|
|
|
#endif
|
|
|
|
;
|
|
|
|
|
2016-09-20 15:06:30 +00:00
|
|
|
static const char* config_extended_help_fn() {
|
|
|
|
static SkString helpString;
|
|
|
|
helpString.set(configExtendedHelp);
|
|
|
|
for (const auto& config : gPredefinedConfigs) {
|
|
|
|
helpString.appendf("\t%-10s\t= gpu(%s)\n", config.predefinedConfig, config.options);
|
|
|
|
}
|
|
|
|
return helpString.c_str();
|
|
|
|
}
|
2016-04-11 21:21:33 +00:00
|
|
|
|
2016-09-20 15:06:30 +00:00
|
|
|
DEFINE_extended_string(config, defaultConfigs, config_help_fn(), config_extended_help_fn());
|
Add config options to run different GPU APIs to dm and nanobench
Add extended config specification form that can be used to run different
gpu backend with different APIs.
The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)
This replaces and removes the --gpuAPI flag.
All existing configs should still work.
Adds following documentation:
out/Debug/dm --help config
Flags:
--config: type: string default: 565 8888 gpu nonrendering
Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
xps or use extended form 'backend(option=value,...)'.
Extended form: 'backend(option=value,...)'
Possible backends and options:
gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
api type: string default: native.
Select graphics API to use with gpu backend.
Options:
native Use platform default OpenGL or OpenGL ES backend.
gl Use OpenGL.
gles Use OpenGL ES.
debug Use debug OpenGL.
null Use null OpenGL.
dit type: bool default: false.
Use device independent text.
nvpr type: bool default: false.
Use NV_path_rendering OpenGL and OpenGL ES extension.
samples type: int default: 0.
Use multisampling with N samples.
Predefined configs:
gpu = gpu()
msaa4 = gpu(samples=4)
msaa16 = gpu(samples=16)
nvprmsaa4 = gpu(nvpr=true,samples=4)
nvprmsaa16 = gpu(nvpr=true,samples=16)
gpudft = gpu(dit=true)
gpudebug = gpu(api=debug)
gpunull = gpu(api=null)
debug = gpu(api=debug)
nullgpu = gpu(api=null)
BUG=skia:2992
Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005
Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b
Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd
Review URL: https://codereview.chromium.org/1490113005
2015-12-23 09:33:00 +00:00
|
|
|
|
|
|
|
SkCommandLineConfig::SkCommandLineConfig(const SkString& tag, const SkString& backend,
|
|
|
|
const SkTArray<SkString>& viaParts)
|
|
|
|
: fTag(tag)
|
|
|
|
, fBackend(backend)
|
|
|
|
, fViaParts(viaParts) {
|
|
|
|
}
|
|
|
|
SkCommandLineConfig::~SkCommandLineConfig() {
|
|
|
|
}
|
|
|
|
|
|
|
|
#if SK_SUPPORT_GPU
|
|
|
|
SkCommandLineConfigGpu::SkCommandLineConfigGpu(
|
2016-07-29 15:14:20 +00:00
|
|
|
const SkString& tag, const SkTArray<SkString>& viaParts, ContextType contextType, bool useNVPR,
|
2017-12-07 19:34:36 +00:00
|
|
|
bool useDIText, int samples, SkColorType colorType, SkAlphaType alphaType,
|
2017-08-30 14:02:10 +00:00
|
|
|
sk_sp<SkColorSpace> colorSpace, bool useStencilBuffers, bool testThreading)
|
Add config options to run different GPU APIs to dm and nanobench
Add extended config specification form that can be used to run different
gpu backend with different APIs.
The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)
This replaces and removes the --gpuAPI flag.
All existing configs should still work.
Adds following documentation:
out/Debug/dm --help config
Flags:
--config: type: string default: 565 8888 gpu nonrendering
Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
xps or use extended form 'backend(option=value,...)'.
Extended form: 'backend(option=value,...)'
Possible backends and options:
gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
api type: string default: native.
Select graphics API to use with gpu backend.
Options:
native Use platform default OpenGL or OpenGL ES backend.
gl Use OpenGL.
gles Use OpenGL ES.
debug Use debug OpenGL.
null Use null OpenGL.
dit type: bool default: false.
Use device independent text.
nvpr type: bool default: false.
Use NV_path_rendering OpenGL and OpenGL ES extension.
samples type: int default: 0.
Use multisampling with N samples.
Predefined configs:
gpu = gpu()
msaa4 = gpu(samples=4)
msaa16 = gpu(samples=16)
nvprmsaa4 = gpu(nvpr=true,samples=4)
nvprmsaa16 = gpu(nvpr=true,samples=16)
gpudft = gpu(dit=true)
gpudebug = gpu(api=debug)
gpunull = gpu(api=null)
debug = gpu(api=debug)
nullgpu = gpu(api=null)
BUG=skia:2992
Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005
Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b
Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd
Review URL: https://codereview.chromium.org/1490113005
2015-12-23 09:33:00 +00:00
|
|
|
: SkCommandLineConfig(tag, SkString("gpu"), viaParts)
|
|
|
|
, fContextType(contextType)
|
2017-02-21 19:36:05 +00:00
|
|
|
, fContextOverrides(ContextOverrides::kNone)
|
Add config options to run different GPU APIs to dm and nanobench
Add extended config specification form that can be used to run different
gpu backend with different APIs.
The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)
This replaces and removes the --gpuAPI flag.
All existing configs should still work.
Adds following documentation:
out/Debug/dm --help config
Flags:
--config: type: string default: 565 8888 gpu nonrendering
Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
xps or use extended form 'backend(option=value,...)'.
Extended form: 'backend(option=value,...)'
Possible backends and options:
gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
api type: string default: native.
Select graphics API to use with gpu backend.
Options:
native Use platform default OpenGL or OpenGL ES backend.
gl Use OpenGL.
gles Use OpenGL ES.
debug Use debug OpenGL.
null Use null OpenGL.
dit type: bool default: false.
Use device independent text.
nvpr type: bool default: false.
Use NV_path_rendering OpenGL and OpenGL ES extension.
samples type: int default: 0.
Use multisampling with N samples.
Predefined configs:
gpu = gpu()
msaa4 = gpu(samples=4)
msaa16 = gpu(samples=16)
nvprmsaa4 = gpu(nvpr=true,samples=4)
nvprmsaa16 = gpu(nvpr=true,samples=16)
gpudft = gpu(dit=true)
gpudebug = gpu(api=debug)
gpunull = gpu(api=null)
debug = gpu(api=debug)
nullgpu = gpu(api=null)
BUG=skia:2992
Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005
Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b
Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd
Review URL: https://codereview.chromium.org/1490113005
2015-12-23 09:33:00 +00:00
|
|
|
, fUseDIText(useDIText)
|
2016-03-10 15:49:08 +00:00
|
|
|
, fSamples(samples)
|
|
|
|
, fColorType(colorType)
|
2017-07-17 15:31:31 +00:00
|
|
|
, fAlphaType(alphaType)
|
2017-08-30 14:02:10 +00:00
|
|
|
, fColorSpace(std::move(colorSpace))
|
|
|
|
, fTestThreading(testThreading) {
|
2016-09-13 17:41:49 +00:00
|
|
|
if (useNVPR) {
|
2017-02-21 19:36:05 +00:00
|
|
|
fContextOverrides |= ContextOverrides::kRequireNVPRSupport;
|
2017-12-07 19:34:36 +00:00
|
|
|
} else {
|
2017-02-21 19:36:05 +00:00
|
|
|
// We don't disable NVPR for instanced configs. Otherwise the caps wouldn't use mixed
|
|
|
|
// samples and we couldn't test the mixed samples backend for simple shapes.
|
|
|
|
fContextOverrides |= ContextOverrides::kDisableNVPR;
|
2016-09-13 17:41:49 +00:00
|
|
|
}
|
2016-12-02 14:43:32 +00:00
|
|
|
// Subtle logic: If the config has a color space attached, we're going to be rendering to sRGB,
|
|
|
|
// so we need that capability. In addition, to get the widest test coverage, we DO NOT require
|
|
|
|
// that we can disable sRGB decode. (That's for rendering sRGB sources to legacy surfaces).
|
|
|
|
//
|
|
|
|
// If the config doesn't have a color space attached, we're going to be rendering in legacy
|
2017-02-21 19:36:05 +00:00
|
|
|
// mode. In that case, we don't require sRGB capability and we defer to the client to decide on
|
|
|
|
// sRGB decode control.
|
2016-11-01 19:56:16 +00:00
|
|
|
if (fColorSpace) {
|
2017-02-21 19:36:05 +00:00
|
|
|
fContextOverrides |= ContextOverrides::kRequireSRGBSupport;
|
|
|
|
fContextOverrides |= ContextOverrides::kAllowSRGBWithoutDecodeControl;
|
2016-09-13 17:41:49 +00:00
|
|
|
}
|
2017-05-08 19:02:07 +00:00
|
|
|
if (!useStencilBuffers) {
|
|
|
|
fContextOverrides |= ContextOverrides::kAvoidStencilBuffers;
|
|
|
|
}
|
Add config options to run different GPU APIs to dm and nanobench
Add extended config specification form that can be used to run different
gpu backend with different APIs.
The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)
This replaces and removes the --gpuAPI flag.
All existing configs should still work.
Adds following documentation:
out/Debug/dm --help config
Flags:
--config: type: string default: 565 8888 gpu nonrendering
Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
xps or use extended form 'backend(option=value,...)'.
Extended form: 'backend(option=value,...)'
Possible backends and options:
gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
api type: string default: native.
Select graphics API to use with gpu backend.
Options:
native Use platform default OpenGL or OpenGL ES backend.
gl Use OpenGL.
gles Use OpenGL ES.
debug Use debug OpenGL.
null Use null OpenGL.
dit type: bool default: false.
Use device independent text.
nvpr type: bool default: false.
Use NV_path_rendering OpenGL and OpenGL ES extension.
samples type: int default: 0.
Use multisampling with N samples.
Predefined configs:
gpu = gpu()
msaa4 = gpu(samples=4)
msaa16 = gpu(samples=16)
nvprmsaa4 = gpu(nvpr=true,samples=4)
nvprmsaa16 = gpu(nvpr=true,samples=16)
gpudft = gpu(dit=true)
gpudebug = gpu(api=debug)
gpunull = gpu(api=null)
debug = gpu(api=debug)
nullgpu = gpu(api=null)
BUG=skia:2992
Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005
Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b
Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd
Review URL: https://codereview.chromium.org/1490113005
2015-12-23 09:33:00 +00:00
|
|
|
}
|
|
|
|
static bool parse_option_int(const SkString& value, int* outInt) {
|
|
|
|
if (value.isEmpty()) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
char* endptr = nullptr;
|
|
|
|
long intValue = strtol(value.c_str(), &endptr, 10);
|
|
|
|
if (*endptr != '\0') {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
*outInt = static_cast<int>(intValue);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
static bool parse_option_bool(const SkString& value, bool* outBool) {
|
|
|
|
if (value.equals("true")) {
|
|
|
|
*outBool = true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
if (value.equals("false")) {
|
|
|
|
*outBool = false;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
static bool parse_option_gpu_api(const SkString& value,
|
|
|
|
SkCommandLineConfigGpu::ContextType* outContextType) {
|
|
|
|
if (value.equals("gl")) {
|
2016-04-05 18:06:27 +00:00
|
|
|
*outContextType = GrContextFactory::kGL_ContextType;
|
Add config options to run different GPU APIs to dm and nanobench
Add extended config specification form that can be used to run different
gpu backend with different APIs.
The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)
This replaces and removes the --gpuAPI flag.
All existing configs should still work.
Adds following documentation:
out/Debug/dm --help config
Flags:
--config: type: string default: 565 8888 gpu nonrendering
Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
xps or use extended form 'backend(option=value,...)'.
Extended form: 'backend(option=value,...)'
Possible backends and options:
gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
api type: string default: native.
Select graphics API to use with gpu backend.
Options:
native Use platform default OpenGL or OpenGL ES backend.
gl Use OpenGL.
gles Use OpenGL ES.
debug Use debug OpenGL.
null Use null OpenGL.
dit type: bool default: false.
Use device independent text.
nvpr type: bool default: false.
Use NV_path_rendering OpenGL and OpenGL ES extension.
samples type: int default: 0.
Use multisampling with N samples.
Predefined configs:
gpu = gpu()
msaa4 = gpu(samples=4)
msaa16 = gpu(samples=16)
nvprmsaa4 = gpu(nvpr=true,samples=4)
nvprmsaa16 = gpu(nvpr=true,samples=16)
gpudft = gpu(dit=true)
gpudebug = gpu(api=debug)
gpunull = gpu(api=null)
debug = gpu(api=debug)
nullgpu = gpu(api=null)
BUG=skia:2992
Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005
Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b
Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd
Review URL: https://codereview.chromium.org/1490113005
2015-12-23 09:33:00 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
if (value.equals("gles")) {
|
2016-04-05 18:06:27 +00:00
|
|
|
*outContextType = GrContextFactory::kGLES_ContextType;
|
Add config options to run different GPU APIs to dm and nanobench
Add extended config specification form that can be used to run different
gpu backend with different APIs.
The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)
This replaces and removes the --gpuAPI flag.
All existing configs should still work.
Adds following documentation:
out/Debug/dm --help config
Flags:
--config: type: string default: 565 8888 gpu nonrendering
Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
xps or use extended form 'backend(option=value,...)'.
Extended form: 'backend(option=value,...)'
Possible backends and options:
gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
api type: string default: native.
Select graphics API to use with gpu backend.
Options:
native Use platform default OpenGL or OpenGL ES backend.
gl Use OpenGL.
gles Use OpenGL ES.
debug Use debug OpenGL.
null Use null OpenGL.
dit type: bool default: false.
Use device independent text.
nvpr type: bool default: false.
Use NV_path_rendering OpenGL and OpenGL ES extension.
samples type: int default: 0.
Use multisampling with N samples.
Predefined configs:
gpu = gpu()
msaa4 = gpu(samples=4)
msaa16 = gpu(samples=16)
nvprmsaa4 = gpu(nvpr=true,samples=4)
nvprmsaa16 = gpu(nvpr=true,samples=16)
gpudft = gpu(dit=true)
gpudebug = gpu(api=debug)
gpunull = gpu(api=null)
debug = gpu(api=debug)
nullgpu = gpu(api=null)
BUG=skia:2992
Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005
Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b
Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd
Review URL: https://codereview.chromium.org/1490113005
2015-12-23 09:33:00 +00:00
|
|
|
return true;
|
|
|
|
}
|
2017-03-20 12:54:16 +00:00
|
|
|
if (value.equals("debuggl")) {
|
2016-04-05 18:06:27 +00:00
|
|
|
*outContextType = GrContextFactory::kDebugGL_ContextType;
|
Add config options to run different GPU APIs to dm and nanobench
Add extended config specification form that can be used to run different
gpu backend with different APIs.
The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)
This replaces and removes the --gpuAPI flag.
All existing configs should still work.
Adds following documentation:
out/Debug/dm --help config
Flags:
--config: type: string default: 565 8888 gpu nonrendering
Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
xps or use extended form 'backend(option=value,...)'.
Extended form: 'backend(option=value,...)'
Possible backends and options:
gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
api type: string default: native.
Select graphics API to use with gpu backend.
Options:
native Use platform default OpenGL or OpenGL ES backend.
gl Use OpenGL.
gles Use OpenGL ES.
debug Use debug OpenGL.
null Use null OpenGL.
dit type: bool default: false.
Use device independent text.
nvpr type: bool default: false.
Use NV_path_rendering OpenGL and OpenGL ES extension.
samples type: int default: 0.
Use multisampling with N samples.
Predefined configs:
gpu = gpu()
msaa4 = gpu(samples=4)
msaa16 = gpu(samples=16)
nvprmsaa4 = gpu(nvpr=true,samples=4)
nvprmsaa16 = gpu(nvpr=true,samples=16)
gpudft = gpu(dit=true)
gpudebug = gpu(api=debug)
gpunull = gpu(api=null)
debug = gpu(api=debug)
nullgpu = gpu(api=null)
BUG=skia:2992
Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005
Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b
Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd
Review URL: https://codereview.chromium.org/1490113005
2015-12-23 09:33:00 +00:00
|
|
|
return true;
|
|
|
|
}
|
2017-03-20 12:54:16 +00:00
|
|
|
if (value.equals("nullgl")) {
|
2016-04-05 18:06:27 +00:00
|
|
|
*outContextType = GrContextFactory::kNullGL_ContextType;
|
Add config options to run different GPU APIs to dm and nanobench
Add extended config specification form that can be used to run different
gpu backend with different APIs.
The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)
This replaces and removes the --gpuAPI flag.
All existing configs should still work.
Adds following documentation:
out/Debug/dm --help config
Flags:
--config: type: string default: 565 8888 gpu nonrendering
Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
xps or use extended form 'backend(option=value,...)'.
Extended form: 'backend(option=value,...)'
Possible backends and options:
gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
api type: string default: native.
Select graphics API to use with gpu backend.
Options:
native Use platform default OpenGL or OpenGL ES backend.
gl Use OpenGL.
gles Use OpenGL ES.
debug Use debug OpenGL.
null Use null OpenGL.
dit type: bool default: false.
Use device independent text.
nvpr type: bool default: false.
Use NV_path_rendering OpenGL and OpenGL ES extension.
samples type: int default: 0.
Use multisampling with N samples.
Predefined configs:
gpu = gpu()
msaa4 = gpu(samples=4)
msaa16 = gpu(samples=16)
nvprmsaa4 = gpu(nvpr=true,samples=4)
nvprmsaa16 = gpu(nvpr=true,samples=16)
gpudft = gpu(dit=true)
gpudebug = gpu(api=debug)
gpunull = gpu(api=null)
debug = gpu(api=debug)
nullgpu = gpu(api=null)
BUG=skia:2992
Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005
Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b
Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd
Review URL: https://codereview.chromium.org/1490113005
2015-12-23 09:33:00 +00:00
|
|
|
return true;
|
|
|
|
}
|
2016-10-14 15:13:48 +00:00
|
|
|
if (value.equals("angle_d3d9_es2")) {
|
|
|
|
*outContextType = GrContextFactory::kANGLE_D3D9_ES2_ContextType;
|
2016-09-29 16:49:06 +00:00
|
|
|
return true;
|
|
|
|
}
|
2016-10-14 15:13:48 +00:00
|
|
|
if (value.equals("angle_d3d11_es2")) {
|
|
|
|
*outContextType = GrContextFactory::kANGLE_D3D11_ES2_ContextType;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
if (value.equals("angle_d3d11_es3")) {
|
|
|
|
*outContextType = GrContextFactory::kANGLE_D3D11_ES3_ContextType;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
if (value.equals("angle_gl_es2")) {
|
|
|
|
*outContextType = GrContextFactory::kANGLE_GL_ES2_ContextType;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
if (value.equals("angle_gl_es3")) {
|
|
|
|
*outContextType = GrContextFactory::kANGLE_GL_ES3_ContextType;
|
Add config options to run different GPU APIs to dm and nanobench
Add extended config specification form that can be used to run different
gpu backend with different APIs.
The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)
This replaces and removes the --gpuAPI flag.
All existing configs should still work.
Adds following documentation:
out/Debug/dm --help config
Flags:
--config: type: string default: 565 8888 gpu nonrendering
Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
xps or use extended form 'backend(option=value,...)'.
Extended form: 'backend(option=value,...)'
Possible backends and options:
gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
api type: string default: native.
Select graphics API to use with gpu backend.
Options:
native Use platform default OpenGL or OpenGL ES backend.
gl Use OpenGL.
gles Use OpenGL ES.
debug Use debug OpenGL.
null Use null OpenGL.
dit type: bool default: false.
Use device independent text.
nvpr type: bool default: false.
Use NV_path_rendering OpenGL and OpenGL ES extension.
samples type: int default: 0.
Use multisampling with N samples.
Predefined configs:
gpu = gpu()
msaa4 = gpu(samples=4)
msaa16 = gpu(samples=16)
nvprmsaa4 = gpu(nvpr=true,samples=4)
nvprmsaa16 = gpu(nvpr=true,samples=16)
gpudft = gpu(dit=true)
gpudebug = gpu(api=debug)
gpunull = gpu(api=null)
debug = gpu(api=debug)
nullgpu = gpu(api=null)
BUG=skia:2992
Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005
Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b
Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd
Review URL: https://codereview.chromium.org/1490113005
2015-12-23 09:33:00 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
if (value.equals("commandbuffer")) {
|
2016-04-05 18:06:27 +00:00
|
|
|
*outContextType = GrContextFactory::kCommandBuffer_ContextType;
|
Add config options to run different GPU APIs to dm and nanobench
Add extended config specification form that can be used to run different
gpu backend with different APIs.
The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)
This replaces and removes the --gpuAPI flag.
All existing configs should still work.
Adds following documentation:
out/Debug/dm --help config
Flags:
--config: type: string default: 565 8888 gpu nonrendering
Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
xps or use extended form 'backend(option=value,...)'.
Extended form: 'backend(option=value,...)'
Possible backends and options:
gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
api type: string default: native.
Select graphics API to use with gpu backend.
Options:
native Use platform default OpenGL or OpenGL ES backend.
gl Use OpenGL.
gles Use OpenGL ES.
debug Use debug OpenGL.
null Use null OpenGL.
dit type: bool default: false.
Use device independent text.
nvpr type: bool default: false.
Use NV_path_rendering OpenGL and OpenGL ES extension.
samples type: int default: 0.
Use multisampling with N samples.
Predefined configs:
gpu = gpu()
msaa4 = gpu(samples=4)
msaa16 = gpu(samples=16)
nvprmsaa4 = gpu(nvpr=true,samples=4)
nvprmsaa16 = gpu(nvpr=true,samples=16)
gpudft = gpu(dit=true)
gpudebug = gpu(api=debug)
gpunull = gpu(api=null)
debug = gpu(api=debug)
nullgpu = gpu(api=null)
BUG=skia:2992
Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005
Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b
Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd
Review URL: https://codereview.chromium.org/1490113005
2015-12-23 09:33:00 +00:00
|
|
|
return true;
|
|
|
|
}
|
2017-07-07 16:56:11 +00:00
|
|
|
if (value.equals("mock")) {
|
|
|
|
*outContextType = GrContextFactory::kMock_ContextType;
|
|
|
|
return true;
|
|
|
|
}
|
2016-04-11 21:21:33 +00:00
|
|
|
#ifdef SK_VULKAN
|
|
|
|
if (value.equals("vulkan")) {
|
|
|
|
*outContextType = GrContextFactory::kVulkan_ContextType;
|
|
|
|
return true;
|
|
|
|
}
|
2017-07-13 19:34:56 +00:00
|
|
|
#endif
|
|
|
|
#ifdef SK_METAL
|
|
|
|
if (value.equals("metal")) {
|
|
|
|
*outContextType = GrContextFactory::kMetal_ContextType;
|
|
|
|
return true;
|
|
|
|
}
|
Add config options to run different GPU APIs to dm and nanobench
Add extended config specification form that can be used to run different
gpu backend with different APIs.
The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)
This replaces and removes the --gpuAPI flag.
All existing configs should still work.
Adds following documentation:
out/Debug/dm --help config
Flags:
--config: type: string default: 565 8888 gpu nonrendering
Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
xps or use extended form 'backend(option=value,...)'.
Extended form: 'backend(option=value,...)'
Possible backends and options:
gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
api type: string default: native.
Select graphics API to use with gpu backend.
Options:
native Use platform default OpenGL or OpenGL ES backend.
gl Use OpenGL.
gles Use OpenGL ES.
debug Use debug OpenGL.
null Use null OpenGL.
dit type: bool default: false.
Use device independent text.
nvpr type: bool default: false.
Use NV_path_rendering OpenGL and OpenGL ES extension.
samples type: int default: 0.
Use multisampling with N samples.
Predefined configs:
gpu = gpu()
msaa4 = gpu(samples=4)
msaa16 = gpu(samples=16)
nvprmsaa4 = gpu(nvpr=true,samples=4)
nvprmsaa16 = gpu(nvpr=true,samples=16)
gpudft = gpu(dit=true)
gpudebug = gpu(api=debug)
gpunull = gpu(api=null)
debug = gpu(api=debug)
nullgpu = gpu(api=null)
BUG=skia:2992
Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005
Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b
Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd
Review URL: https://codereview.chromium.org/1490113005
2015-12-23 09:33:00 +00:00
|
|
|
#endif
|
|
|
|
return false;
|
|
|
|
}
|
2016-03-10 15:49:08 +00:00
|
|
|
static bool parse_option_gpu_color(const SkString& value,
|
|
|
|
SkColorType* outColorType,
|
2017-07-17 15:31:31 +00:00
|
|
|
SkAlphaType* alphaType,
|
2016-06-16 20:03:24 +00:00
|
|
|
sk_sp<SkColorSpace>* outColorSpace) {
|
2017-07-17 15:31:31 +00:00
|
|
|
// We always use premul unless the color type is 565.
|
|
|
|
*alphaType = kPremul_SkAlphaType;
|
|
|
|
|
2016-03-10 15:49:08 +00:00
|
|
|
if (value.equals("8888")) {
|
2016-09-28 15:49:53 +00:00
|
|
|
*outColorType = kRGBA_8888_SkColorType;
|
2016-06-16 20:03:24 +00:00
|
|
|
*outColorSpace = nullptr;
|
2016-03-10 15:49:08 +00:00
|
|
|
return true;
|
2017-07-17 15:31:31 +00:00
|
|
|
} else if (value.equals("4444")) {
|
|
|
|
*outColorType = kARGB_4444_SkColorType;
|
|
|
|
*outColorSpace = nullptr;
|
|
|
|
return true;
|
|
|
|
} else if (value.equals("565")) {
|
|
|
|
*outColorType = kRGB_565_SkColorType;
|
|
|
|
*alphaType = kOpaque_SkAlphaType;
|
|
|
|
*outColorSpace = nullptr;
|
|
|
|
return true;
|
2016-03-10 15:49:08 +00:00
|
|
|
}
|
2016-09-19 21:42:04 +00:00
|
|
|
|
|
|
|
SkTArray<SkString> commands;
|
|
|
|
SkStrSplit(value.c_str(), "_", &commands);
|
|
|
|
if (commands.count() < 1 || commands.count() > 2) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2016-10-18 17:02:51 +00:00
|
|
|
const bool linearGamma = commands[0].equals("f16");
|
2017-03-02 13:53:46 +00:00
|
|
|
SkColorSpace::Gamut gamut = SkColorSpace::kSRGB_Gamut;
|
|
|
|
SkColorSpace::RenderTargetGamma gamma = linearGamma ? SkColorSpace::kLinear_RenderTargetGamma
|
|
|
|
: SkColorSpace::kSRGB_RenderTargetGamma;
|
2017-03-24 14:06:03 +00:00
|
|
|
*outColorSpace = SkColorSpace::MakeRGB(gamma, gamut);
|
2017-03-02 13:53:46 +00:00
|
|
|
|
2016-09-19 21:42:04 +00:00
|
|
|
if (commands.count() == 2) {
|
|
|
|
if (commands[1].equals("srgb")) {
|
|
|
|
// sRGB gamut (which is our default)
|
|
|
|
} else if (commands[1].equals("wide")) {
|
|
|
|
// WideGamut RGB
|
|
|
|
const float gWideGamutRGB_toXYZD50[]{
|
|
|
|
0.7161046f, 0.1009296f, 0.1471858f, // -> X
|
|
|
|
0.2581874f, 0.7249378f, 0.0168748f, // -> Y
|
|
|
|
0.0000000f, 0.0517813f, 0.7734287f, // -> Z
|
|
|
|
};
|
|
|
|
SkMatrix44 wideGamutRGBMatrix(SkMatrix44::kUninitialized_Constructor);
|
|
|
|
wideGamutRGBMatrix.set3x3RowMajorf(gWideGamutRGB_toXYZD50);
|
2017-03-24 14:06:03 +00:00
|
|
|
*outColorSpace = SkColorSpace::MakeRGB(gamma, wideGamutRGBMatrix);
|
2016-10-17 15:14:02 +00:00
|
|
|
} else if (commands[1].equals("narrow")) {
|
|
|
|
// NarrowGamut RGB (an artifically smaller than sRGB gamut)
|
|
|
|
SkColorSpacePrimaries primaries ={
|
|
|
|
0.54f, 0.33f, // Rx, Ry
|
|
|
|
0.33f, 0.50f, // Gx, Gy
|
|
|
|
0.25f, 0.20f, // Bx, By
|
|
|
|
0.3127f, 0.3290f, // Wx, Wy
|
|
|
|
};
|
|
|
|
SkMatrix44 narrowGamutRGBMatrix(SkMatrix44::kUninitialized_Constructor);
|
|
|
|
primaries.toXYZD50(&narrowGamutRGBMatrix);
|
2017-03-24 14:06:03 +00:00
|
|
|
*outColorSpace = SkColorSpace::MakeRGB(gamma, narrowGamutRGBMatrix);
|
2016-09-19 21:42:04 +00:00
|
|
|
} else {
|
|
|
|
// Unknown color gamut
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Now pick a color type
|
|
|
|
if (commands[0].equals("f16")) {
|
2016-03-10 15:49:08 +00:00
|
|
|
*outColorType = kRGBA_F16_SkColorType;
|
|
|
|
return true;
|
|
|
|
}
|
2017-03-02 13:53:46 +00:00
|
|
|
if (commands[0].equals("srgb") || commands[0].equals("srgbnl")) {
|
2016-09-28 15:49:53 +00:00
|
|
|
*outColorType = kRGBA_8888_SkColorType;
|
2016-03-10 15:49:08 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
Add config options to run different GPU APIs to dm and nanobench
Add extended config specification form that can be used to run different
gpu backend with different APIs.
The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)
This replaces and removes the --gpuAPI flag.
All existing configs should still work.
Adds following documentation:
out/Debug/dm --help config
Flags:
--config: type: string default: 565 8888 gpu nonrendering
Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
xps or use extended form 'backend(option=value,...)'.
Extended form: 'backend(option=value,...)'
Possible backends and options:
gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
api type: string default: native.
Select graphics API to use with gpu backend.
Options:
native Use platform default OpenGL or OpenGL ES backend.
gl Use OpenGL.
gles Use OpenGL ES.
debug Use debug OpenGL.
null Use null OpenGL.
dit type: bool default: false.
Use device independent text.
nvpr type: bool default: false.
Use NV_path_rendering OpenGL and OpenGL ES extension.
samples type: int default: 0.
Use multisampling with N samples.
Predefined configs:
gpu = gpu()
msaa4 = gpu(samples=4)
msaa16 = gpu(samples=16)
nvprmsaa4 = gpu(nvpr=true,samples=4)
nvprmsaa16 = gpu(nvpr=true,samples=16)
gpudft = gpu(dit=true)
gpudebug = gpu(api=debug)
gpunull = gpu(api=null)
debug = gpu(api=debug)
nullgpu = gpu(api=null)
BUG=skia:2992
Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005
Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b
Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd
Review URL: https://codereview.chromium.org/1490113005
2015-12-23 09:33:00 +00:00
|
|
|
|
|
|
|
SkCommandLineConfigGpu* parse_command_line_config_gpu(const SkString& tag,
|
|
|
|
const SkTArray<SkString>& vias,
|
|
|
|
const SkString& options) {
|
|
|
|
// Defaults for GPU backend.
|
|
|
|
bool seenAPI = false;
|
2017-03-20 12:54:16 +00:00
|
|
|
SkCommandLineConfigGpu::ContextType contextType = GrContextFactory::kGL_ContextType;
|
Add config options to run different GPU APIs to dm and nanobench
Add extended config specification form that can be used to run different
gpu backend with different APIs.
The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)
This replaces and removes the --gpuAPI flag.
All existing configs should still work.
Adds following documentation:
out/Debug/dm --help config
Flags:
--config: type: string default: 565 8888 gpu nonrendering
Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
xps or use extended form 'backend(option=value,...)'.
Extended form: 'backend(option=value,...)'
Possible backends and options:
gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
api type: string default: native.
Select graphics API to use with gpu backend.
Options:
native Use platform default OpenGL or OpenGL ES backend.
gl Use OpenGL.
gles Use OpenGL ES.
debug Use debug OpenGL.
null Use null OpenGL.
dit type: bool default: false.
Use device independent text.
nvpr type: bool default: false.
Use NV_path_rendering OpenGL and OpenGL ES extension.
samples type: int default: 0.
Use multisampling with N samples.
Predefined configs:
gpu = gpu()
msaa4 = gpu(samples=4)
msaa16 = gpu(samples=16)
nvprmsaa4 = gpu(nvpr=true,samples=4)
nvprmsaa16 = gpu(nvpr=true,samples=16)
gpudft = gpu(dit=true)
gpudebug = gpu(api=debug)
gpunull = gpu(api=null)
debug = gpu(api=debug)
nullgpu = gpu(api=null)
BUG=skia:2992
Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005
Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b
Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd
Review URL: https://codereview.chromium.org/1490113005
2015-12-23 09:33:00 +00:00
|
|
|
bool seenUseNVPR = false;
|
|
|
|
bool useNVPR = false;
|
|
|
|
bool seenUseDIText =false;
|
|
|
|
bool useDIText = false;
|
|
|
|
bool seenSamples = false;
|
2018-02-03 00:25:12 +00:00
|
|
|
int samples = 0;
|
2016-03-10 15:49:08 +00:00
|
|
|
bool seenColor = false;
|
2016-09-28 15:49:53 +00:00
|
|
|
SkColorType colorType = kRGBA_8888_SkColorType;
|
2017-07-17 15:31:31 +00:00
|
|
|
SkAlphaType alphaType = kPremul_SkAlphaType;
|
2016-06-16 20:03:24 +00:00
|
|
|
sk_sp<SkColorSpace> colorSpace = nullptr;
|
2017-05-08 19:02:07 +00:00
|
|
|
bool seenUseStencils = false;
|
|
|
|
bool useStencils = true;
|
2017-08-30 14:02:10 +00:00
|
|
|
bool seenTestThreading = false;
|
|
|
|
bool testThreading = false;
|
Add config options to run different GPU APIs to dm and nanobench
Add extended config specification form that can be used to run different
gpu backend with different APIs.
The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)
This replaces and removes the --gpuAPI flag.
All existing configs should still work.
Adds following documentation:
out/Debug/dm --help config
Flags:
--config: type: string default: 565 8888 gpu nonrendering
Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
xps or use extended form 'backend(option=value,...)'.
Extended form: 'backend(option=value,...)'
Possible backends and options:
gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
api type: string default: native.
Select graphics API to use with gpu backend.
Options:
native Use platform default OpenGL or OpenGL ES backend.
gl Use OpenGL.
gles Use OpenGL ES.
debug Use debug OpenGL.
null Use null OpenGL.
dit type: bool default: false.
Use device independent text.
nvpr type: bool default: false.
Use NV_path_rendering OpenGL and OpenGL ES extension.
samples type: int default: 0.
Use multisampling with N samples.
Predefined configs:
gpu = gpu()
msaa4 = gpu(samples=4)
msaa16 = gpu(samples=16)
nvprmsaa4 = gpu(nvpr=true,samples=4)
nvprmsaa16 = gpu(nvpr=true,samples=16)
gpudft = gpu(dit=true)
gpudebug = gpu(api=debug)
gpunull = gpu(api=null)
debug = gpu(api=debug)
nullgpu = gpu(api=null)
BUG=skia:2992
Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005
Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b
Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd
Review URL: https://codereview.chromium.org/1490113005
2015-12-23 09:33:00 +00:00
|
|
|
|
|
|
|
SkTArray<SkString> optionParts;
|
|
|
|
SkStrSplit(options.c_str(), ",", kStrict_SkStrSplitMode, &optionParts);
|
|
|
|
for (int i = 0; i < optionParts.count(); ++i) {
|
|
|
|
SkTArray<SkString> keyValueParts;
|
|
|
|
SkStrSplit(optionParts[i].c_str(), "=", kStrict_SkStrSplitMode, &keyValueParts);
|
|
|
|
if (keyValueParts.count() != 2) {
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
const SkString& key = keyValueParts[0];
|
|
|
|
const SkString& value = keyValueParts[1];
|
|
|
|
bool valueOk = false;
|
|
|
|
if (key.equals("api") && !seenAPI) {
|
|
|
|
valueOk = parse_option_gpu_api(value, &contextType);
|
|
|
|
seenAPI = true;
|
|
|
|
} else if (key.equals("nvpr") && !seenUseNVPR) {
|
|
|
|
valueOk = parse_option_bool(value, &useNVPR);
|
|
|
|
seenUseNVPR = true;
|
|
|
|
} else if (key.equals("dit") && !seenUseDIText) {
|
|
|
|
valueOk = parse_option_bool(value, &useDIText);
|
|
|
|
seenUseDIText = true;
|
|
|
|
} else if (key.equals("samples") && !seenSamples) {
|
|
|
|
valueOk = parse_option_int(value, &samples);
|
|
|
|
seenSamples = true;
|
2016-03-10 15:49:08 +00:00
|
|
|
} else if (key.equals("color") && !seenColor) {
|
2017-07-17 15:31:31 +00:00
|
|
|
valueOk = parse_option_gpu_color(value, &colorType, &alphaType, &colorSpace);
|
2016-03-10 15:49:08 +00:00
|
|
|
seenColor = true;
|
2017-05-08 19:02:07 +00:00
|
|
|
} else if (key.equals("stencils") && !seenUseStencils) {
|
|
|
|
valueOk = parse_option_bool(value, &useStencils);
|
|
|
|
seenUseStencils = true;
|
2017-08-30 14:02:10 +00:00
|
|
|
} else if (key.equals("testThreading") && !seenTestThreading) {
|
|
|
|
valueOk = parse_option_bool(value, &testThreading);
|
|
|
|
seenTestThreading = true;
|
Add config options to run different GPU APIs to dm and nanobench
Add extended config specification form that can be used to run different
gpu backend with different APIs.
The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)
This replaces and removes the --gpuAPI flag.
All existing configs should still work.
Adds following documentation:
out/Debug/dm --help config
Flags:
--config: type: string default: 565 8888 gpu nonrendering
Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
xps or use extended form 'backend(option=value,...)'.
Extended form: 'backend(option=value,...)'
Possible backends and options:
gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
api type: string default: native.
Select graphics API to use with gpu backend.
Options:
native Use platform default OpenGL or OpenGL ES backend.
gl Use OpenGL.
gles Use OpenGL ES.
debug Use debug OpenGL.
null Use null OpenGL.
dit type: bool default: false.
Use device independent text.
nvpr type: bool default: false.
Use NV_path_rendering OpenGL and OpenGL ES extension.
samples type: int default: 0.
Use multisampling with N samples.
Predefined configs:
gpu = gpu()
msaa4 = gpu(samples=4)
msaa16 = gpu(samples=16)
nvprmsaa4 = gpu(nvpr=true,samples=4)
nvprmsaa16 = gpu(nvpr=true,samples=16)
gpudft = gpu(dit=true)
gpudebug = gpu(api=debug)
gpunull = gpu(api=null)
debug = gpu(api=debug)
nullgpu = gpu(api=null)
BUG=skia:2992
Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005
Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b
Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd
Review URL: https://codereview.chromium.org/1490113005
2015-12-23 09:33:00 +00:00
|
|
|
}
|
|
|
|
if (!valueOk) {
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
}
|
2017-03-20 12:54:16 +00:00
|
|
|
if (!seenAPI) {
|
|
|
|
return nullptr;
|
|
|
|
}
|
2017-12-07 19:34:36 +00:00
|
|
|
return new SkCommandLineConfigGpu(tag, vias, contextType, useNVPR, useDIText,
|
2017-08-30 14:02:10 +00:00
|
|
|
samples, colorType, alphaType, colorSpace, useStencils,
|
|
|
|
testThreading);
|
Add config options to run different GPU APIs to dm and nanobench
Add extended config specification form that can be used to run different
gpu backend with different APIs.
The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)
This replaces and removes the --gpuAPI flag.
All existing configs should still work.
Adds following documentation:
out/Debug/dm --help config
Flags:
--config: type: string default: 565 8888 gpu nonrendering
Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
xps or use extended form 'backend(option=value,...)'.
Extended form: 'backend(option=value,...)'
Possible backends and options:
gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
api type: string default: native.
Select graphics API to use with gpu backend.
Options:
native Use platform default OpenGL or OpenGL ES backend.
gl Use OpenGL.
gles Use OpenGL ES.
debug Use debug OpenGL.
null Use null OpenGL.
dit type: bool default: false.
Use device independent text.
nvpr type: bool default: false.
Use NV_path_rendering OpenGL and OpenGL ES extension.
samples type: int default: 0.
Use multisampling with N samples.
Predefined configs:
gpu = gpu()
msaa4 = gpu(samples=4)
msaa16 = gpu(samples=16)
nvprmsaa4 = gpu(nvpr=true,samples=4)
nvprmsaa16 = gpu(nvpr=true,samples=16)
gpudft = gpu(dit=true)
gpudebug = gpu(api=debug)
gpunull = gpu(api=null)
debug = gpu(api=debug)
nullgpu = gpu(api=null)
BUG=skia:2992
Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005
Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b
Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd
Review URL: https://codereview.chromium.org/1490113005
2015-12-23 09:33:00 +00:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
void ParseConfigs(const SkCommandLineFlags::StringArray& configs,
|
|
|
|
SkCommandLineConfigArray* outResult) {
|
|
|
|
outResult->reset();
|
|
|
|
for (int i = 0; i < configs.count(); ++i) {
|
|
|
|
SkString extendedBackend;
|
|
|
|
SkString extendedOptions;
|
|
|
|
SkString simpleBackend;
|
|
|
|
SkTArray<SkString> vias;
|
|
|
|
|
|
|
|
SkString tag(configs[i]);
|
|
|
|
SkTArray<SkString> parts;
|
2016-09-28 19:40:22 +00:00
|
|
|
SkStrSplit(tag.c_str(), "[", kStrict_SkStrSplitMode, &parts);
|
Add config options to run different GPU APIs to dm and nanobench
Add extended config specification form that can be used to run different
gpu backend with different APIs.
The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)
This replaces and removes the --gpuAPI flag.
All existing configs should still work.
Adds following documentation:
out/Debug/dm --help config
Flags:
--config: type: string default: 565 8888 gpu nonrendering
Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
xps or use extended form 'backend(option=value,...)'.
Extended form: 'backend(option=value,...)'
Possible backends and options:
gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
api type: string default: native.
Select graphics API to use with gpu backend.
Options:
native Use platform default OpenGL or OpenGL ES backend.
gl Use OpenGL.
gles Use OpenGL ES.
debug Use debug OpenGL.
null Use null OpenGL.
dit type: bool default: false.
Use device independent text.
nvpr type: bool default: false.
Use NV_path_rendering OpenGL and OpenGL ES extension.
samples type: int default: 0.
Use multisampling with N samples.
Predefined configs:
gpu = gpu()
msaa4 = gpu(samples=4)
msaa16 = gpu(samples=16)
nvprmsaa4 = gpu(nvpr=true,samples=4)
nvprmsaa16 = gpu(nvpr=true,samples=16)
gpudft = gpu(dit=true)
gpudebug = gpu(api=debug)
gpunull = gpu(api=null)
debug = gpu(api=debug)
nullgpu = gpu(api=null)
BUG=skia:2992
Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005
Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b
Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd
Review URL: https://codereview.chromium.org/1490113005
2015-12-23 09:33:00 +00:00
|
|
|
if (parts.count() == 2) {
|
|
|
|
SkTArray<SkString> parts2;
|
2016-09-28 19:40:22 +00:00
|
|
|
SkStrSplit(parts[1].c_str(), "]", kStrict_SkStrSplitMode, &parts2);
|
Add config options to run different GPU APIs to dm and nanobench
Add extended config specification form that can be used to run different
gpu backend with different APIs.
The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)
This replaces and removes the --gpuAPI flag.
All existing configs should still work.
Adds following documentation:
out/Debug/dm --help config
Flags:
--config: type: string default: 565 8888 gpu nonrendering
Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
xps or use extended form 'backend(option=value,...)'.
Extended form: 'backend(option=value,...)'
Possible backends and options:
gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
api type: string default: native.
Select graphics API to use with gpu backend.
Options:
native Use platform default OpenGL or OpenGL ES backend.
gl Use OpenGL.
gles Use OpenGL ES.
debug Use debug OpenGL.
null Use null OpenGL.
dit type: bool default: false.
Use device independent text.
nvpr type: bool default: false.
Use NV_path_rendering OpenGL and OpenGL ES extension.
samples type: int default: 0.
Use multisampling with N samples.
Predefined configs:
gpu = gpu()
msaa4 = gpu(samples=4)
msaa16 = gpu(samples=16)
nvprmsaa4 = gpu(nvpr=true,samples=4)
nvprmsaa16 = gpu(nvpr=true,samples=16)
gpudft = gpu(dit=true)
gpudebug = gpu(api=debug)
gpunull = gpu(api=null)
debug = gpu(api=debug)
nullgpu = gpu(api=null)
BUG=skia:2992
Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005
Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b
Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd
Review URL: https://codereview.chromium.org/1490113005
2015-12-23 09:33:00 +00:00
|
|
|
if (parts2.count() == 2 && parts2[1].isEmpty()) {
|
|
|
|
SkStrSplit(parts[0].c_str(), "-", kStrict_SkStrSplitMode, &vias);
|
|
|
|
if (vias.count()) {
|
|
|
|
extendedBackend = vias[vias.count() - 1];
|
|
|
|
vias.pop_back();
|
|
|
|
} else {
|
|
|
|
extendedBackend = parts[0];
|
|
|
|
}
|
|
|
|
extendedOptions = parts2[0];
|
2016-09-28 19:40:22 +00:00
|
|
|
simpleBackend.printf("%s[%s]", extendedBackend.c_str(), extendedOptions.c_str());
|
Add config options to run different GPU APIs to dm and nanobench
Add extended config specification form that can be used to run different
gpu backend with different APIs.
The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)
This replaces and removes the --gpuAPI flag.
All existing configs should still work.
Adds following documentation:
out/Debug/dm --help config
Flags:
--config: type: string default: 565 8888 gpu nonrendering
Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
xps or use extended form 'backend(option=value,...)'.
Extended form: 'backend(option=value,...)'
Possible backends and options:
gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
api type: string default: native.
Select graphics API to use with gpu backend.
Options:
native Use platform default OpenGL or OpenGL ES backend.
gl Use OpenGL.
gles Use OpenGL ES.
debug Use debug OpenGL.
null Use null OpenGL.
dit type: bool default: false.
Use device independent text.
nvpr type: bool default: false.
Use NV_path_rendering OpenGL and OpenGL ES extension.
samples type: int default: 0.
Use multisampling with N samples.
Predefined configs:
gpu = gpu()
msaa4 = gpu(samples=4)
msaa16 = gpu(samples=16)
nvprmsaa4 = gpu(nvpr=true,samples=4)
nvprmsaa16 = gpu(nvpr=true,samples=16)
gpudft = gpu(dit=true)
gpudebug = gpu(api=debug)
gpunull = gpu(api=null)
debug = gpu(api=debug)
nullgpu = gpu(api=null)
BUG=skia:2992
Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005
Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b
Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd
Review URL: https://codereview.chromium.org/1490113005
2015-12-23 09:33:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (extendedBackend.isEmpty()) {
|
|
|
|
simpleBackend = tag;
|
|
|
|
SkStrSplit(tag.c_str(), "-", kStrict_SkStrSplitMode, &vias);
|
|
|
|
if (vias.count()) {
|
|
|
|
simpleBackend = vias[vias.count() - 1];
|
|
|
|
vias.pop_back();
|
|
|
|
}
|
|
|
|
for (auto& predefinedConfig : gPredefinedConfigs) {
|
|
|
|
if (simpleBackend.equals(predefinedConfig.predefinedConfig)) {
|
|
|
|
extendedBackend = predefinedConfig.backend;
|
|
|
|
extendedOptions = predefinedConfig.options;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
SkCommandLineConfig* parsedConfig = nullptr;
|
|
|
|
#if SK_SUPPORT_GPU
|
|
|
|
if (extendedBackend.equals("gpu")) {
|
|
|
|
parsedConfig = parse_command_line_config_gpu(tag, vias, extendedOptions);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
if (!parsedConfig) {
|
|
|
|
parsedConfig = new SkCommandLineConfig(tag, simpleBackend, vias);
|
|
|
|
}
|
|
|
|
outResult->emplace_back(parsedConfig);
|
|
|
|
}
|
|
|
|
}
|