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

Issue 251373005: WebGL: Refactor active context management. (Closed)

Created:
6 years, 8 months ago by dshwang
Modified:
6 years, 5 months ago
CC:
blink-reviews, aandrey+blink_chromium.org, dglazkov+blink, Rik, adamk+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

WebGL: Refactor active context management. This CL makes WebGL lost&retore code more succinct. 1. Deactive a context in loseContextImpl(), instead of dispatchContextLostEvent(). Because of a) Prevent inconsistent state. Currently, activeContext() vector can store a lost context due to this, so oldestContextIndex() needs to check if active context is lost. Now we don't need redundant lostContext check. In addition, it does not make sense that active context list can store a lost context. b) In the same sense, only maybeRestoreContext() actives a context like loseContextImpl() in this CL. 2. Don't call activeContexts().remove() adhoc. Only deactiveContext() calls activeContexts().remove() like only activeContext() calls activeContexts().append(). 3. Change the logic of dispatchContextLostEvent(). Currently, when m_contextLostMode != RealLostContext, a context is added to forcibly evicted list, in which the context will be restored when another context is destructed. However, we start the restore-timer when the context is lost due to AutoRecoverSyntheticLostContext also. It means AutoRecoverSyntheticLostContext can restore twice. So this CL changes a context to be added into forcibly evicted list only if SyntheticLostContext. BUG=392274 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=177833

Patch Set 1 #

Patch Set 2 : Rebase to ToT, and add two ASSERT more. #

Patch Set 3 : rebase to ToT #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -18 lines) Patch
M Source/core/html/canvas/WebGLRenderingContextBase.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M Source/core/html/canvas/WebGLRenderingContextBase.cpp View 1 2 6 chunks +20 lines, -17 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
dshwang
I clean up some messy logic. Could you review?
6 years, 8 months ago (2014-04-24 08:25:56 UTC) #1
bajones
On 2014/04/24 08:25:56, dshwang wrote: > I clean up some messy logic. > Could you ...
6 years, 8 months ago (2014-04-24 18:09:40 UTC) #2
dshwang
On 2014/04/24 18:09:40, bajones wrote: > On 2014/04/24 08:25:56, dshwang wrote: > > I clean ...
6 years, 8 months ago (2014-04-24 18:45:50 UTC) #3
Ken Russell (switch to Gerrit)
Sorry for the holdup on reviewing this, but we are still investigating flakiness of the ...
6 years, 7 months ago (2014-05-02 23:04:19 UTC) #4
dshwang
Hi, could you re-review because flakiness was fixed? Speaking test, #1 and #2 preserve the ...
6 years, 6 months ago (2014-06-02 14:40:52 UTC) #5
Ken Russell (switch to Gerrit)
I apologize for the long delay, but until the root cause of Issue 374086 was ...
6 years, 5 months ago (2014-07-08 21:01:03 UTC) #6
dshwang
On 2014/07/08 21:01:03, Ken Russell wrote: > I apologize for the long delay, but until ...
6 years, 5 months ago (2014-07-09 07:55:21 UTC) #7
Ken Russell (switch to Gerrit)
Thanks. This improves the understandability of the code. LGTM
6 years, 5 months ago (2014-07-09 21:34:46 UTC) #8
dshwang
The CQ bit was checked by dongseong.hwang@intel.com
6 years, 5 months ago (2014-07-10 13:32:10 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dongseong.hwang@intel.com/251373005/40001
6 years, 5 months ago (2014-07-10 13:33:50 UTC) #10
commit-bot: I haz the power
Change committed as 177833
6 years, 5 months ago (2014-07-10 14:09:49 UTC) #11
ccameron
On 2014/07/10 14:09:49, I haz the power (commit-bot) wrote: > Change committed as 177833 I ...
6 years, 5 months ago (2014-07-10 19:13:36 UTC) #12
Ken Russell (switch to Gerrit)
On 2014/07/10 19:13:36, ccameron1 wrote: > On 2014/07/10 14:09:49, I haz the power (commit-bot) wrote: ...
6 years, 5 months ago (2014-07-10 19:20:35 UTC) #13
ccameron
6 years, 5 months ago (2014-07-10 19:26:15 UTC) #14
Message was sent while issue was closed.
A revert of this CL has been created in
https://codereview.chromium.org/388573004/ by ccameron@chromium.org.

The reason for reverting is: This is likely to be the cause of crashes observed
in
http://build.chromium.org/p/chromium.gpu/builders/Mac%20Debug%20%28Intel%29/b....

Powered by Google App Engine
This is Rietveld 408576698