Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Issue 1810323002: Cache render targets that render to wrapped textures

Created:
4 years, 9 months ago by Kimmo Kinnunen
Modified:
4 years, 8 months ago
Reviewers:
bsalomon
CC:
reviews_skia.org, Sami Väisänen, Chris Dalton, robertphillips
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Cache render targets that render to wrapped textures Store render targets to the cache if they are created with SkSurface:wrapBackendTextureAsRenderTarget(). This avoids expensive creation and deletion of FBO objects (FBOs, renderbuffers) on cache hit. Leaves the wrapped texture bound to the FBO when the surface is destroyed. The texture will not be used, rather the FBO will be re-assigned when new surface needs it. NOTE: if some drivers have problems with textures bound to FBOs, then this will happen here. Speeds up cases where MSAA SkSurface is created for rendering and then destroyed in repeated manner. Mostly benefits HW which uses renderbuffers. WIP: Vulkan parts missing. BUG=594928 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1810323002

Patch Set 1 #

Total comments: 1

Patch Set 2 : #

Patch Set 3 : moved the refactoring to another patch #

Unified diffs Side-by-side diffs Delta from patch set Stats (+130 lines, -7 lines) Patch
M include/gpu/GrTextureProvider.h View 1 chunk +4 lines, -0 lines 0 comments Download
M src/gpu/GrGpu.h View 1 2 2 chunks +9 lines, -0 lines 0 comments Download
M src/gpu/GrGpu.cpp View 1 2 1 chunk +21 lines, -0 lines 0 comments Download
M src/gpu/GrResourceProvider.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M src/gpu/GrResourceProvider.cpp View 1 2 1 chunk +9 lines, -0 lines 0 comments Download
M src/gpu/GrTextureProvider.cpp View 1 chunk +11 lines, -0 lines 0 comments Download
M src/gpu/gl/GrGLGpu.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M src/gpu/gl/GrGLGpu.cpp View 1 2 3 chunks +63 lines, -7 lines 0 comments Download
M tools/gpu/GrTest.cpp View 1 2 1 chunk +8 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 20 (4 generated)
Kimmo Kinnunen
Submitting this for review to see if the use-case is ok, before investing time in ...
4 years, 9 months ago (2016-03-18 12:13:28 UTC) #3
bsalomon
On 2016/03/18 12:13:28, Kimmo Kinnunen wrote: > Submitting this for review to see if the ...
4 years, 9 months ago (2016-03-18 13:29:58 UTC) #5
Kimmo Kinnunen
On 2016/03/18 13:29:58, bsalomon wrote: > On 2016/03/18 12:13:28, Kimmo Kinnunen wrote: > > Submitting ...
4 years, 9 months ago (2016-03-18 20:00:13 UTC) #6
Kimmo Kinnunen
It improves chromium MSAA quite substantially https://codereview.chromium.org/1810323002/diff/1/src/gpu/gl/GrGLGpu.cpp File src/gpu/gl/GrGLGpu.cpp (right): https://codereview.chromium.org/1810323002/diff/1/src/gpu/gl/GrGLGpu.cpp#newcode665 src/gpu/gl/GrGLGpu.cpp:665: GrWrapOwnership ownership) { ...
4 years, 9 months ago (2016-03-18 20:02:19 UTC) #7
Kimmo Kinnunen
I can also make this applicable only to platforms that use renderbuffers, if needed.
4 years, 9 months ago (2016-03-21 12:44:51 UTC) #8
bsalomon
On 2016/03/21 12:44:51, Kimmo Kinnunen wrote: > I can also make this applicable only to ...
4 years, 9 months ago (2016-03-21 13:58:07 UTC) #9
Kimmo Kinnunen
On 2016/03/21 13:58:07, bsalomon wrote: > If we need to resolve the performance issues in ...
4 years, 9 months ago (2016-03-21 14:20:02 UTC) #10
Kimmo Kinnunen
On 2016/03/21 13:58:07, bsalomon wrote: > If we need to resolve the performance issues in ...
4 years, 9 months ago (2016-03-21 14:20:02 UTC) #11
Kimmo Kinnunen
On 2016/03/21 13:58:07, bsalomon wrote: > If we need to resolve the performance issues in ...
4 years, 9 months ago (2016-03-21 14:20:03 UTC) #12
Kimmo Kinnunen
I could imagine holding some common Skia render target in CC, and re-seating it to ...
4 years, 9 months ago (2016-03-21 14:30:54 UTC) #13
bsalomon
+Robert I think we need to consider how MSAA render buffers will interact with the ...
4 years, 9 months ago (2016-03-22 13:21:17 UTC) #14
Kimmo Kinnunen
On 2016/03/22 13:21:17, bsalomon wrote: > +Robert > > I think we need to consider ...
4 years, 9 months ago (2016-03-22 14:17:59 UTC) #15
Kimmo Kinnunen
Just to highlight: this particular change does not affect that much NVPR -- this is ...
4 years, 9 months ago (2016-03-22 17:56:29 UTC) #16
Kimmo Kinnunen
moved the budgeting related changes to the other patch. moved the resourceprovider access to resourceprovider, ...
4 years, 8 months ago (2016-04-06 14:30:38 UTC) #17
bsalomon
On 2016/04/06 14:30:38, Kimmo Kinnunen wrote: > moved the budgeting related changes to the other ...
4 years, 8 months ago (2016-04-06 14:42:48 UTC) #19
Kimmo Kinnunen
4 years, 8 months ago (2016-04-07 06:25:14 UTC) #20
On 2016/04/06 14:42:48, bsalomon wrote:
> On 2016/04/06 14:30:38, Kimmo Kinnunen wrote:
> > Do you have a suggestion how should I work forward in getting the underlying
> > issue fixed?
> 
> Can this not be fixed on the Chromium side by retaining the SkSurfaces for
> tiles? I'd much prefer that.

Would this mean that it is ok to hold multisample renderbuffers for color and
stecil for separately for each tile?

Powered by Google App Engine
This is Rietveld 408576698