Commit 0cb76248 authored by Peng Huang's avatar Peng Huang Committed by Commit Bot

Skia: Enable ExplicitlyAllocateGPUResources & SortRenderTargets.

Enable those two options which may improve skia performance.

Bug: 894492

Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I80a1b9d1ce018d90ab91e5e676b6d09a7dc23d8d
Reviewed-on: https://chromium-review.googlesource.com/c/1273267
Commit-Queue: Peng Huang <penghuang@chromium.org>
Reviewed-by: default avatarAntoine Labour <piman@chromium.org>
Reviewed-by: default avatarRobert Phillips <robertphillips@google.com>
Cr-Commit-Position: refs/heads/master@{#599321}
parent 845a997f
......@@ -343,6 +343,7 @@ bool GpuServiceImpl::GetGrContextForGLSurface(gl::GLSurface* surface,
GrContextOptions options;
options.fExplicitlyAllocateGPUResources = GrContextOptions::Enable::kYes;
options.fSortRenderTargets = GrContextOptions::Enable::kYes;
options.fUseGLBufferDataNullHint = GrContextOptions::Enable::kYes;
data.gr_context = GrContext::MakeGL(std::move(native_interface), options);
DCHECK(data.gr_context);
......
......@@ -38,6 +38,8 @@ GrContextForGLES2Interface::GrContextForGLES2Interface(
options.fAvoidStencilBuffers = capabilities.avoid_stencil_buffers;
options.fAllowPathMaskCaching = false;
options.fSharpenMipmappedTextures = true;
options.fExplicitlyAllocateGPUResources = GrContextOptions::Enable::kYes;
options.fSortRenderTargets = GrContextOptions::Enable::kYes;
sk_sp<GrGLInterface> interface(
skia_bindings::CreateGLES2InterfaceBindings(gl, context_support));
gr_context_ = GrContext::MakeGL(std::move(interface), options);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment