New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 914521 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Yesterday
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

SkiaRenderer cache GrBackendTexture

Project Member Reported by backer@chromium.org, Dec 12

Issue description

Skia is going to try to do some caching of GrTexture objects when the same GrBackendTexture is used to fulfill a promise. We currently create a new GrBackendTexture object on demand in  SharedImageRepresentationSkia::BeginReadAccess. We should cache the GrBackendTexture so that we return the same GrBET object for the duration of the SharedImageBacking lifetime.
 
Cc: ericrk@chromium.org
Related bug on the Skia side: skbug.com/8613
Cc: backer@chromium.org
Owner: bsalo...@google.com
Sounds like bsalomon is working on this. Passing over ownership.
Project Member

Comment 4 by bugdroid1@chromium.org, Jan 17 (5 days ago)

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1879d9a2a37ad64d979b98bf640af891e62b1e99

commit 1879d9a2a37ad64d979b98bf640af891e62b1e99
Author: Brian Salomon <bsalomon@google.com>
Date: Thu Jan 17 18:16:04 2019

Use new callback interface for promise SkImage textures.

This allows Skia to avoid recreating internal structures representing
textures when a promise image is refulfilled by the same texture
and thereby improves performance.


Bug:  914521 
Change-Id: I878c8bd41e45d61d0325a191bbd9448f48153594
Reviewed-on: https://chromium-review.googlesource.com/c/1403180
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Peng Huang <penghuang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623752}
[modify] https://crrev.com/1879d9a2a37ad64d979b98bf640af891e62b1e99/components/viz/service/display_embedder/skia_output_surface_impl.cc
[modify] https://crrev.com/1879d9a2a37ad64d979b98bf640af891e62b1e99/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc
[modify] https://crrev.com/1879d9a2a37ad64d979b98bf640af891e62b1e99/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.h
[modify] https://crrev.com/1879d9a2a37ad64d979b98bf640af891e62b1e99/gpu/command_buffer/service/shared_image_backing_factory_ahardwarebuffer.cc
[modify] https://crrev.com/1879d9a2a37ad64d979b98bf640af891e62b1e99/gpu/command_buffer/service/shared_image_backing_factory_ahardwarebuffer_unittest.cc
[modify] https://crrev.com/1879d9a2a37ad64d979b98bf640af891e62b1e99/gpu/command_buffer/service/shared_image_backing_factory_gl_texture.cc
[modify] https://crrev.com/1879d9a2a37ad64d979b98bf640af891e62b1e99/gpu/command_buffer/service/shared_image_backing_factory_gl_texture_unittest.cc
[modify] https://crrev.com/1879d9a2a37ad64d979b98bf640af891e62b1e99/gpu/command_buffer/service/shared_image_representation.h
[modify] https://crrev.com/1879d9a2a37ad64d979b98bf640af891e62b1e99/gpu/command_buffer/service/wrapped_sk_image.cc

Project Member

Comment 5 by bugdroid1@chromium.org, Jan 18 (5 days ago)

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/58d6ac581d1b72dbce5c65bfb55d35693b1dbb17

commit 58d6ac581d1b72dbce5c65bfb55d35693b1dbb17
Author: Jonathan Backer <backer@chromium.org>
Date: Fri Jan 18 02:16:27 2019

Cache SkPromiseImageTexture

SkPromiseImageTexture is valid as long as the metadata does not
change (e.g. side, pixel format, texture ID).

This is true for the lifetime of a SharedImage. SharedImages are reused
by renderers as part of their cc::ResourcePool. Caching saves some
work for Skia during SkiaRenderer compositing.

Change-Id: I67b6f6f138509096e2b3ec2a3cc1555e00bd23f6
Bug:  914521 
Reviewed-on: https://chromium-review.googlesource.com/c/1418735
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jonathan Backer <backer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623960}
[modify] https://crrev.com/58d6ac581d1b72dbce5c65bfb55d35693b1dbb17/gpu/command_buffer/service/shared_image_backing_factory_ahardwarebuffer.cc
[modify] https://crrev.com/58d6ac581d1b72dbce5c65bfb55d35693b1dbb17/gpu/command_buffer/service/shared_image_backing_factory_gl_texture.cc
[modify] https://crrev.com/58d6ac581d1b72dbce5c65bfb55d35693b1dbb17/gpu/command_buffer/service/wrapped_sk_image.cc

Comment 6 by backer@chromium.org, Yesterday (33 hours ago)

Status: Fixed (was: Available)
Fixed?

Comment 7 by bsalo...@google.com, Today (16 hours ago)

yep, thanks!

Sign in to add a comment