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

Issue 1534033002: Improve Ganesh helpers. (Closed)

Created:
5 years ago by jeffbrown
Modified:
4 years, 11 months ago
Reviewers:
abarth, viettrungluu, jamesr
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, darin (slow to review), gregsimon, mojo-reviews_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org
Base URL:
git@github.com:domokit/mojo.git@moz-8
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Improve Ganesh helpers. Properly reset and flush the Ganesh context when needed. When intermixing Ganesh rendering with other GL operations, the Ganesh renderer's cached GPU state can get out of sync with the actual state of the GL context, resulting in broken behavior. To fix this problem, reset the Ganesh context when entering its scope and flush it when exiting its scope. This operation has a small performance cost but only when entering and exiting the scope which should be infrequent (ideally no more than once per frame). Added a helper for creating SkImages from a texture and updated the GaneshTextureSurface to use the new GrGLTextureInfo type which was introduced in the latest Skia roll. Moved helpers into the mojo::skia namespace. R=abarth@google.com Committed: https://chromium.googlesource.com/external/mojo/+/297d5e5e81b07d9a0a0576a86fd43e4efbbe2d70

Patch Set 1 #

Patch Set 2 : catch up to a recent Skia roll, moved namespaces, cleanups #

Patch Set 3 : fix include order #

Patch Set 4 : fix includes #

Total comments: 7

Patch Set 5 : improve scope's scoping powers per review comments #

Patch Set 6 : #

Patch Set 7 : rebase #

Total comments: 1

Patch Set 8 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+456 lines, -79 lines) Patch
M mojo/skia/BUILD.gn View 1 2 3 4 5 6 7 2 chunks +5 lines, -0 lines 0 comments Download
M mojo/skia/ganesh_context.h View 1 2 3 4 1 chunk +52 lines, -16 lines 0 comments Download
M mojo/skia/ganesh_context.cc View 1 2 3 4 1 chunk +49 lines, -32 lines 0 comments Download
M mojo/skia/ganesh_framebuffer_surface.h View 1 2 3 4 2 chunks +5 lines, -5 lines 0 comments Download
M mojo/skia/ganesh_framebuffer_surface.cc View 1 2 3 4 2 chunks +8 lines, -9 lines 0 comments Download
A mojo/skia/ganesh_image_factory.h View 1 2 3 4 5 6 7 1 chunk +56 lines, -0 lines 0 comments Download
A mojo/skia/ganesh_image_factory.cc View 1 2 3 4 5 6 7 1 chunk +95 lines, -0 lines 0 comments Download
M mojo/skia/ganesh_texture_surface.h View 1 2 3 4 3 chunks +7 lines, -3 lines 0 comments Download
M mojo/skia/ganesh_texture_surface.cc View 1 2 3 4 2 chunks +17 lines, -11 lines 0 comments Download
M mojo/skia/gl_bindings_skia.h View 1 1 chunk +4 lines, -2 lines 0 comments Download
M mojo/skia/gl_bindings_skia.cc View 1 2 chunks +3 lines, -1 line 0 comments Download
A mojo/skia/type_converters.h View 1 2 3 4 5 6 7 1 chunk +56 lines, -0 lines 0 comments Download
A mojo/skia/type_converters.cc View 1 2 3 4 5 6 7 1 chunk +99 lines, -0 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 14 (4 generated)
jeffbrown
5 years ago (2015-12-17 22:03:06 UTC) #1
jeffbrown
5 years ago (2015-12-18 00:06:38 UTC) #4
viettrungluu
https://codereview.chromium.org/1534033002/diff/60001/mojo/skia/ganesh_context.cc File mojo/skia/ganesh_context.cc (right): https://codereview.chromium.org/1534033002/diff/60001/mojo/skia/ganesh_context.cc#newcode23 mojo/skia/ganesh_context.cc:23: DCHECK(context_); I wonder if we shouldn't just inline the ...
5 years ago (2015-12-18 16:34:48 UTC) #5
jeffbrown
https://codereview.chromium.org/1534033002/diff/60001/mojo/skia/ganesh_context.cc File mojo/skia/ganesh_context.cc (right): https://codereview.chromium.org/1534033002/diff/60001/mojo/skia/ganesh_context.cc#newcode23 mojo/skia/ganesh_context.cc:23: DCHECK(context_); On 2015/12/18 16:34:48, viettrungluu wrote: > I wonder ...
5 years ago (2015-12-18 17:48:24 UTC) #6
viettrungluu
https://codereview.chromium.org/1534033002/diff/60001/mojo/skia/ganesh_context.cc File mojo/skia/ganesh_context.cc (right): https://codereview.chromium.org/1534033002/diff/60001/mojo/skia/ganesh_context.cc#newcode81 mojo/skia/ganesh_context.cc:81: gr_context_->resetContext(); On 2015/12/18 17:48:24, jeffbrown wrote: > On 2015/12/18 ...
5 years ago (2015-12-18 18:05:41 UTC) #7
jeffbrown
https://codereview.chromium.org/1534033002/diff/60001/mojo/skia/ganesh_context.cc File mojo/skia/ganesh_context.cc (right): https://codereview.chromium.org/1534033002/diff/60001/mojo/skia/ganesh_context.cc#newcode81 mojo/skia/ganesh_context.cc:81: gr_context_->resetContext(); On 2015/12/18 18:05:41, viettrungluu wrote: > On 2015/12/18 ...
5 years ago (2015-12-18 18:12:57 UTC) #8
jeffbrown
Can someone take a quick look at this? I applied Trung's feedback from before the ...
4 years, 11 months ago (2016-01-16 01:14:53 UTC) #10
abarth
LGTM Not sure if you want to hear back from trung before landing. https://codereview.chromium.org/1534033002/diff/110001/mojo/skia/ganesh_helpers.h File ...
4 years, 11 months ago (2016-01-18 04:18:40 UTC) #11
jeffbrown
rebase
4 years, 11 months ago (2016-01-26 09:02:46 UTC) #12
jeffbrown
4 years, 11 months ago (2016-01-26 23:50:17 UTC) #14
Message was sent while issue was closed.
Committed patchset #8 (id:130001) manually as
297d5e5e81b07d9a0a0576a86fd43e4efbbe2d70 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698