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

Issue 15928002: GPU: Keep track of the last real context and real surface made current. (Closed)

Created:
7 years, 7 months ago by jonathan.backer
Modified:
7 years, 6 months ago
CC:
chromium-reviews, apatrick_chromium
Visibility:
Public.

Description

GPU: Keep track of the last real context and real surface made current. This allows us to set virtual contexts current, which allows us to restore from a GLStateRestorer in Scoped{Texture,Framebuffer}Binders with --enable-virtual-gl-contexts. BUG=241762, 163217 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=204500

Patch Set 1 #

Total comments: 7

Patch Set 2 : Rebase #

Patch Set 3 : Use ScopedMakeCurrent. #

Total comments: 2

Patch Set 4 : Rebase #

Patch Set 5 : Make GetRealCurrent protected. #

Total comments: 2

Patch Set 6 : No more IsVirtualContext. #

Patch Set 7 : Fix OSX #

Total comments: 6

Patch Set 8 : Address sievers@ comments. #

Patch Set 9 : Nix unnecessary changes. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+113 lines, -62 lines) Patch
M ui/gl/gl_context.h View 1 2 3 4 5 3 chunks +21 lines, -1 line 0 comments Download
M ui/gl/gl_context.cc View 1 2 3 4 5 6 7 4 chunks +20 lines, -3 lines 0 comments Download
M ui/gl/gl_context_android.cc View 1 2 3 4 5 2 chunks +3 lines, -3 lines 0 comments Download
M ui/gl/gl_context_cgl.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M ui/gl/gl_context_cgl.cc View 1 2 3 4 5 4 chunks +4 lines, -4 lines 0 comments Download
M ui/gl/gl_context_egl.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M ui/gl/gl_context_egl.cc View 1 2 3 4 5 4 chunks +4 lines, -4 lines 0 comments Download
M ui/gl/gl_context_glx.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M ui/gl/gl_context_glx.cc View 1 2 3 4 5 4 chunks +4 lines, -4 lines 0 comments Download
M ui/gl/gl_context_nsview.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M ui/gl/gl_context_nsview.mm View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M ui/gl/gl_context_osmesa.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M ui/gl/gl_context_osmesa.cc View 1 2 3 4 5 4 chunks +4 lines, -4 lines 0 comments Download
M ui/gl/gl_context_stub.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M ui/gl/gl_context_stub.cc View 1 2 3 4 5 2 chunks +3 lines, -2 lines 0 comments Download
M ui/gl/gl_context_wgl.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M ui/gl/gl_context_wgl.cc View 1 2 3 4 5 4 chunks +4 lines, -4 lines 0 comments Download
M ui/gl/gl_gl_api_implementation.cc View 1 2 3 4 5 6 7 2 chunks +14 lines, -11 lines 0 comments Download
M ui/gl/gl_surface_egl.cc View 1 2 3 4 4 chunks +16 lines, -9 lines 0 comments Download
M ui/gl/gl_surface_osmesa.cc View 1 2 3 4 3 chunks +8 lines, -5 lines 0 comments Download

Messages

Total messages: 33 (0 generated)
jonathan.backer
https://codereview.chromium.org/15928002/diff/1/ui/gl/gl_context.cc File ui/gl/gl_context.cc (right): https://codereview.chromium.org/15928002/diff/1/ui/gl/gl_context.cc#newcode144 ui/gl/gl_context.cc:144: SetCurrent(virtual_context, surface); Maybe SetCurrent(NULL, NULL) otherwise? https://codereview.chromium.org/15928002/diff/1/ui/gl/gl_gl_api_implementation.cc File ui/gl/gl_gl_api_implementation.cc ...
7 years, 7 months ago (2013-05-23 21:00:53 UTC) #1
no sievers
Do we need to track the real context and surface only for various DCHECKS()? https://codereview.chromium.org/15928002/diff/1/ui/gl/gl_context.cc ...
7 years, 7 months ago (2013-05-24 17:04:02 UTC) #2
jonathan.backer
On 2013/05/24 17:04:02, Daniel Sievers wrote: > Do we need to track the real context ...
7 years, 7 months ago (2013-05-24 20:36:27 UTC) #3
jonathan.backer
https://codereview.chromium.org/15928002/diff/1/ui/gl/gl_context.cc File ui/gl/gl_context.cc (right): https://codereview.chromium.org/15928002/diff/1/ui/gl/gl_context.cc#newcode101 ui/gl/gl_context.cc:101: if (!context || !context->IsVirtualContext()) { On 2013/05/24 17:04:02, Daniel ...
7 years, 7 months ago (2013-05-24 20:36:40 UTC) #4
no sievers
https://codereview.chromium.org/15928002/diff/1/ui/gl/gl_surface_osmesa.cc File ui/gl/gl_surface_osmesa.cc (right): https://codereview.chromium.org/15928002/diff/1/ui/gl/gl_surface_osmesa.cc#newcode26 ui/gl/gl_surface_osmesa.cc:26: GLContext* current_context = GLContext::GetRealCurrent(); Wait, why does this have ...
7 years, 7 months ago (2013-05-24 21:48:06 UTC) #5
jonathan.backer
https://codereview.chromium.org/15928002/diff/1/ui/gl/gl_context.cc File ui/gl/gl_context.cc (right): https://codereview.chromium.org/15928002/diff/1/ui/gl/gl_context.cc#newcode101 ui/gl/gl_context.cc:101: if (!context || !context->IsVirtualContext()) { On 2013/05/24 20:36:40, jonathan.backer ...
7 years, 7 months ago (2013-05-27 16:37:36 UTC) #6
no sievers
https://codereview.chromium.org/15928002/diff/1/ui/gl/gl_surface_osmesa.cc#newcode26 > ui/gl/gl_surface_osmesa.cc:26: GLContext* current_context = > GLContext::GetRealCurrent(); > On 2013/05/24 21:48:06, Daniel Sievers wrote: ...
7 years, 6 months ago (2013-05-28 18:59:49 UTC) #7
no sievers
On 2013/05/28 18:59:49, Daniel Sievers wrote: > currently in place just work too? GLContextVirtual::IsCurrent() and ...
7 years, 6 months ago (2013-05-28 19:01:36 UTC) #8
epenner
https://codereview.chromium.org/15928002/diff/10021/ui/gl/gl_context.cc File ui/gl/gl_context.cc (right): https://codereview.chromium.org/15928002/diff/10021/ui/gl/gl_context.cc#newcode102 ui/gl/gl_context.cc:102: if (!context || !context->IsVirtualContext()) { One drive-by comment: If ...
7 years, 6 months ago (2013-05-28 21:33:52 UTC) #9
jonathan.backer
On 2013/05/28 18:59:49, Daniel Sievers wrote: > https://codereview.chromium.org/15928002/diff/1/ui/gl/gl_surface_osmesa.cc#newcode26 > > ui/gl/gl_surface_osmesa.cc:26: GLContext* current_context = > ...
7 years, 6 months ago (2013-05-31 17:21:01 UTC) #10
jonathan.backer
https://codereview.chromium.org/15928002/diff/10021/ui/gl/gl_context.cc File ui/gl/gl_context.cc (right): https://codereview.chromium.org/15928002/diff/10021/ui/gl/gl_context.cc#newcode102 ui/gl/gl_context.cc:102: if (!context || !context->IsVirtualContext()) { On 2013/05/28 21:33:53, epenner ...
7 years, 6 months ago (2013-05-31 17:21:40 UTC) #11
no sievers
On 2013/05/31 17:21:01, jonathan.backer wrote: > On 2013/05/28 18:59:49, Daniel Sievers wrote: > > > ...
7 years, 6 months ago (2013-05-31 20:38:33 UTC) #12
no sievers
On 2013/05/31 20:38:33, Daniel Sievers wrote: > It seems more and more wrong to me. ...
7 years, 6 months ago (2013-05-31 20:41:30 UTC) #13
greggman
https://codereview.chromium.org/15928002/diff/47001/ui/gl/gl_context.cc File ui/gl/gl_context.cc (right): https://codereview.chromium.org/15928002/diff/47001/ui/gl/gl_context.cc#newcode102 ui/gl/gl_context.cc:102: if (!context || !context->IsVirtualContext()) { I feel like the ...
7 years, 6 months ago (2013-05-31 21:13:38 UTC) #14
no sievers
On 2013/05/31 21:13:38, greggman wrote: > https://codereview.chromium.org/15928002/diff/47001/ui/gl/gl_context.cc > File ui/gl/gl_context.cc (right): > > https://codereview.chromium.org/15928002/diff/47001/ui/gl/gl_context.cc#newcode102 > ...
7 years, 6 months ago (2013-05-31 21:34:03 UTC) #15
jonathan.backer
https://codereview.chromium.org/15928002/diff/47001/ui/gl/gl_context.cc File ui/gl/gl_context.cc (right): https://codereview.chromium.org/15928002/diff/47001/ui/gl/gl_context.cc#newcode102 ui/gl/gl_context.cc:102: if (!context || !context->IsVirtualContext()) { On 2013/05/31 21:13:38, greggman ...
7 years, 6 months ago (2013-06-03 14:57:23 UTC) #16
jonathan.backer
Yeah trybots. There was a failing DCHECK in ImageTransportSurfaceMac::UnrefIOSurface(). I've remedied this by calling SetCurrent ...
7 years, 6 months ago (2013-06-04 19:14:40 UTC) #17
greggman
lgtm
7 years, 6 months ago (2013-06-04 22:58:50 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/backer@chromium.org/15928002/66001
7 years, 6 months ago (2013-06-04 23:31:42 UTC) #19
no sievers
lgtm with one question. https://codereview.chromium.org/15928002/diff/66001/ui/gl/gl_context.cc File ui/gl/gl_context.cc (right): https://codereview.chromium.org/15928002/diff/66001/ui/gl/gl_context.cc#newcode141 ui/gl/gl_context.cc:141: surface->OnMakeCurrent(virtual_context); Wait, why add a ...
7 years, 6 months ago (2013-06-04 23:47:19 UTC) #20
jonathan.backer
https://codereview.chromium.org/15928002/diff/66001/ui/gl/gl_context.cc File ui/gl/gl_context.cc (right): https://codereview.chromium.org/15928002/diff/66001/ui/gl/gl_context.cc#newcode141 ui/gl/gl_context.cc:141: surface->OnMakeCurrent(virtual_context); On 2013/06/04 23:47:20, Daniel Sievers wrote: > Wait, ...
7 years, 6 months ago (2013-06-05 14:02:09 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/backer@chromium.org/15928002/66001
7 years, 6 months ago (2013-06-05 14:02:25 UTC) #22
boliu
Flyby comment: The android test failures are probably not flakes. I am seeing this DCHECK ...
7 years, 6 months ago (2013-06-05 15:43:56 UTC) #23
jonathan.backer
On 2013/06/05 15:43:56, boliu wrote: > Flyby comment: > > The android test failures are ...
7 years, 6 months ago (2013-06-05 15:48:46 UTC) #24
no sievers
On 2013/06/05 14:02:09, jonathan.backer wrote: > https://codereview.chromium.org/15928002/diff/66001/ui/gl/gl_context.cc > File ui/gl/gl_context.cc (right): > > https://codereview.chromium.org/15928002/diff/66001/ui/gl/gl_context.cc#newcode141 > ...
7 years, 6 months ago (2013-06-05 16:38:06 UTC) #25
no sievers
Few more thoughts: I think you need to add SetCurrent(NULL) to GLContextVirtual::ReleaseCurrent() now that we ...
7 years, 6 months ago (2013-06-05 16:43:37 UTC) #26
jonathan.backer
https://codereview.chromium.org/15928002/diff/66001/ui/gl/gl_context.h File ui/gl/gl_context.h (right): https://codereview.chromium.org/15928002/diff/66001/ui/gl/gl_context.h#newcode119 ui/gl/gl_context.h:119: static GLContext* GetRealCurrent(); On 2013/06/05 16:43:37, Daniel Sievers wrote: ...
7 years, 6 months ago (2013-06-05 20:40:10 UTC) #27
jonathan.backer
On 2013/06/05 16:43:37, Daniel Sievers wrote: > Few more thoughts: > > I think you ...
7 years, 6 months ago (2013-06-05 20:42:26 UTC) #28
no sievers
On 2013/06/05 20:42:26, jonathan.backer wrote: > On 2013/06/05 16:43:37, Daniel Sievers wrote: > > Few ...
7 years, 6 months ago (2013-06-05 20:49:31 UTC) #29
jonathan.backer
On 2013/06/05 20:49:31, Daniel Sievers wrote: > On 2013/06/05 20:42:26, jonathan.backer wrote: > > On ...
7 years, 6 months ago (2013-06-05 20:53:07 UTC) #30
no sievers
still lgtm. thanks!
7 years, 6 months ago (2013-06-05 21:20:53 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/backer@chromium.org/15928002/119005
7 years, 6 months ago (2013-06-06 12:37:44 UTC) #32
commit-bot: I haz the power
7 years, 6 months ago (2013-06-06 14:59:25 UTC) #33
Message was sent while issue was closed.
Change committed as 204500

Powered by Google App Engine
This is Rietveld 408576698