Add instanced rendering command line flag to viewer.
Previously this could only be turned on at runtime. Change-Id: I1b626584fba17fcf8ff64135dd93f98c7f40821d Reviewed-on: https://skia-review.googlesource.com/9445 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
This commit is contained in:
parent
3139de39d7
commit
41eac798f8
@ -153,6 +153,8 @@ static DEFINE_bool(atrace, false, "Enable support for using ATrace. ATrace is on
|
||||
DEFINE_int32(msaa, 0, "Number of subpixel samples. 0 for no HW antialiasing.");
|
||||
DEFINE_pathrenderer_flag;
|
||||
|
||||
DEFINE_bool(instancedRendering, false, "Enable instanced rendering on GPU backends.");
|
||||
|
||||
const char *kBackendTypeStrings[sk_app::Window::kBackendTypeCount] = {
|
||||
"OpenGL",
|
||||
#ifdef SK_VULKAN
|
||||
@ -284,6 +286,7 @@ Viewer::Viewer(int argc, char** argv, void* platformData)
|
||||
|
||||
DisplayParams displayParams;
|
||||
displayParams.fMSAASampleCount = FLAGS_msaa;
|
||||
displayParams.fGrContextOptions.fEnableInstancedRendering = FLAGS_instancedRendering;
|
||||
displayParams.fGrContextOptions.fGpuPathRenderers = CollectGpuPathRenderersFromFlags();
|
||||
fWindow->setRequestedDisplayParams(displayParams);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user