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

Issue 1511773005: Make SkGLContext lifetime more well-defined (Closed)

Created:
5 years ago by Kimmo Kinnunen
Modified:
4 years, 11 months ago
Reviewers:
bsalomon
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Make SkGLContext lifetime more well-defined Remove refcounting from SkGLContext. SkGLContext is expected to behave like GrContextFactory would own it, as implied by the GrContextFactory function. If it is refcounted, this does not hold. Also other use sites, such as in SkOSWindow_win (command buffer gl object), confirm the behavior. The object is explicitly owned and destroyed, not shared. Also fixes potential crashes from using GL context of an abandoned context. Also fixes potential crashes in DM/nanobench, if the GrContext lives longer than GLContext through internal refing of GrContext. Moves the non-trivial implementations from GrContextFactory.h to .cpp, just for consistency sake. Changes pathops_unittest.gyp. The pathops_unittest uses GrContextFactory, but did not link to its implementation. The reason they worked was that the implementation used (constructors, destructors) happened to be in the .h file. This works towards being able to use command buffer and NVPR from the SampleApp. BUG=skia:2992 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1511773005 Committed: https://skia.googlesource.com/skia/+/830e012187f951d49d7e46e196ac8d1e653a25da Committed: https://skia.googlesource.com/skia/+/3405800d7a5407365143eed93e300fd5896cacee

Patch Set 1 #

Patch Set 2 : simplify, fences can be deleted without current #

Patch Set 3 : simplify, fences can be deleted without current #

Patch Set 4 : whitespace #

Patch Set 5 : #

Patch Set 6 : rebase #

Patch Set 7 : rebase for commit #

Patch Set 8 : fix the test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+127 lines, -70 lines) Patch
M bench/nanobench.cpp View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M dm/DM.cpp View 1 2 3 4 5 6 2 chunks +10 lines, -8 lines 0 comments Download
M gyp/pathops_unittest.gyp View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M include/gpu/gl/SkGLContext.h View 2 chunks +2 lines, -4 lines 0 comments Download
M src/gpu/GrContextFactory.h View 1 2 3 4 5 1 chunk +26 lines, -38 lines 0 comments Download
M src/gpu/GrContextFactory.cpp View 1 2 3 4 5 4 chunks +57 lines, -17 lines 0 comments Download
M tests/EGLImageTest.cpp View 2 chunks +1 line, -2 lines 0 comments Download
M tests/GrContextFactoryTest.cpp View 1 2 3 4 5 6 7 1 chunk +26 lines, -0 lines 0 comments Download

Messages

Total messages: 21 (11 generated)
Kimmo Kinnunen
Sorry to dwell on these helper related issues.
5 years ago (2015-12-09 14:08:20 UTC) #2
Kimmo Kinnunen
Brian, what do you think about this?
5 years ago (2015-12-18 13:11:55 UTC) #6
bsalomon
On 2015/12/18 13:11:55, Kimmo Kinnunen wrote: > Brian, what do you think about this? Sorry! ...
5 years ago (2015-12-18 14:24:33 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1511773005/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1511773005/120001
4 years, 11 months ago (2016-01-05 08:11:02 UTC) #10
commit-bot: I haz the power
Committed patchset #7 (id:120001) as https://skia.googlesource.com/skia/+/830e012187f951d49d7e46e196ac8d1e653a25da
4 years, 11 months ago (2016-01-05 08:30:36 UTC) #12
jcgregorio
A revert of this CL (patchset #7 id:120001) has been created in https://codereview.chromium.org/1555053003/ by jcgregorio@google.com. ...
4 years, 11 months ago (2016-01-05 12:15:10 UTC) #13
mtklein
A revert of this CL (patchset #7 id:120001) has been created in https://codereview.chromium.org/1560643002/ by mtklein@google.com. ...
4 years, 11 months ago (2016-01-05 12:16:15 UTC) #14
mtklein
On 2016/01/05 12:16:15, mtklein wrote: > A revert of this CL (patchset #7 id:120001) has ...
4 years, 11 months ago (2016-01-05 12:30:16 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1511773005/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1511773005/140001
4 years, 11 months ago (2016-01-07 07:33:25 UTC) #19
commit-bot: I haz the power
4 years, 11 months ago (2016-01-07 07:49:34 UTC) #21
Message was sent while issue was closed.
Committed patchset #8 (id:140001) as
https://skia.googlesource.com/skia/+/3405800d7a5407365143eed93e300fd5896cacee

Powered by Google App Engine
This is Rietveld 408576698