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

Issue 11606012: cc: Unify context losing machinery (Closed)

Created:
8 years ago by danakj
Modified:
7 years, 11 months ago
Reviewers:
jamesr, jamesr1
CC:
chromium-reviews, piman, backer, cc-bugs_chromium.org
Visibility:
Public.

Description

cc: Unify context losing machinery The lost context callback is only used in the thread proxy, and it ends up calling all the way into the scheduler, which can cause some weird re-entrancy. Instead, post a task to check for the lost context both in the single and threaded proxy classes. Tested by cc_unittests:LayerTreeHostContextTest* unit tests. I beefed up the tests some to also test losing the context during draw. BUG=123444 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=178239

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 10

Patch Set 4 : #

Patch Set 5 : #

Total comments: 6

Patch Set 6 : #

Patch Set 7 : reboot #

Unified diffs Side-by-side diffs Delta from patch set Stats (+181 lines, -46 lines) Patch
M cc/gl_renderer.cc View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M cc/layer_tree_host_impl.cc View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M cc/layer_tree_host_unittest_context.cc View 1 2 3 4 5 6 9 chunks +149 lines, -37 lines 0 comments Download
M cc/single_thread_proxy.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M cc/single_thread_proxy.cc View 1 2 3 4 5 3 chunks +15 lines, -6 lines 0 comments Download
M cc/thread_proxy.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M cc/thread_proxy.cc View 1 2 3 4 5 2 chunks +12 lines, -0 lines 0 comments Download

Messages

Total messages: 30 (0 generated)
danakj
8 years ago (2012-12-17 23:47:18 UTC) #1
danakj
Something happened to cc-bugs..
8 years ago (2012-12-17 23:48:08 UTC) #2
jamesr
I like fixing the timing but think we should still route this call down through ...
8 years ago (2012-12-17 23:50:50 UTC) #3
jamesr1
Gregg recently added a glLoseContextCHROMIUM() call to the command buffer: http://code.google.com/p/chromium/issues/detail?id=166020 / http://src.chromium.org/viewvc/chrome?view=rev&revision=173441. What if ...
8 years ago (2012-12-17 23:55:43 UTC) #4
danakj
PTAL
8 years ago (2012-12-18 01:50:29 UTC) #5
jamesr
https://codereview.chromium.org/11606012/diff/9024/cc/layer_tree_host.h File cc/layer_tree_host.h (left): https://codereview.chromium.org/11606012/diff/9024/cc/layer_tree_host.h#oldcode139 cc/layer_tree_host.h:139: void loseOutputSurface(int numTimes); webkit/compositor_bindings/web_layer_tree_view_impl.cc#214: void WebLayerTreeViewImpl::loseCompositorContext(int numTimes) { m_layerTreeHost->loseOutputSurface(numTimes); ...
8 years ago (2012-12-18 02:00:16 UTC) #6
danakj
https://codereview.chromium.org/11606012/diff/9024/cc/layer_tree_host.h File cc/layer_tree_host.h (left): https://codereview.chromium.org/11606012/diff/9024/cc/layer_tree_host.h#oldcode139 cc/layer_tree_host.h:139: void loseOutputSurface(int numTimes); On 2012/12/18 02:00:16, jamesr wrote: > ...
8 years ago (2012-12-18 02:01:19 UTC) #7
jamesr1
On Mon, Dec 17, 2012 at 6:01 PM, <danakj@chromium.org> wrote: > > https://codereview.chromium.**org/11606012/diff/9024/cc/** > layer_tree_host.h<https://codereview.chromium.org/11606012/diff/9024/cc/layer_tree_host.h> ...
8 years ago (2012-12-18 02:03:30 UTC) #8
danakj
On 2012/12/18 02:03:30, jamesr1 wrote: > On Mon, Dec 17, 2012 at 6:01 PM, <mailto:danakj@chromium.org> ...
8 years ago (2012-12-18 02:04:18 UTC) #9
jamesr1
On Mon, Dec 17, 2012 at 6:04 PM, <danakj@chromium.org> wrote: > On 2012/12/18 02:03:30, jamesr1 ...
8 years ago (2012-12-18 02:10:15 UTC) #10
danakj
Okay, this depends on https://bugs.webkit.org/show_bug.cgi?id=105238 I verified the layout tests still work. They actually lose ...
8 years ago (2012-12-18 02:40:38 UTC) #11
danakj
+gman for gpu/
8 years ago (2012-12-18 02:41:13 UTC) #12
danakj
Am I hitting the wrong command_buffer_impl though? It doesn't seem to be part of the ...
8 years ago (2012-12-18 02:44:07 UTC) #13
danakj
Ok, it seems that the DRT tests for lost context don't actually test anything at ...
8 years ago (2012-12-18 03:25:17 UTC) #14
jamesr
On 2012/12/18 02:44:07, danakj wrote: > Am I hitting the wrong command_buffer_impl though? It doesn't ...
8 years ago (2012-12-18 03:25:33 UTC) #15
danakj
OK! I have this now losing the context with DRT and things failed once I ...
8 years ago (2012-12-18 04:57:11 UTC) #16
jamesr
https://codereview.chromium.org/11606012/diff/8/cc/gl_renderer.cc File cc/gl_renderer.cc (right): https://codereview.chromium.org/11606012/diff/8/cc/gl_renderer.cc#newcode1513 cc/gl_renderer.cc:1513: if (m_context->checkFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) this is a sync call ...
8 years ago (2012-12-18 05:40:11 UTC) #17
jamesr
https://codereview.chromium.org/11606012/diff/8/cc/thread_proxy.cc File cc/thread_proxy.cc (right): https://codereview.chromium.org/11606012/diff/8/cc/thread_proxy.cc#newcode313 cc/thread_proxy.cc:313: Proxy::implThread()->postTask(base::Bind(&ThreadProxy::checkLostOutputSurfaceOnImplThread, base::Unretained(this))); hmmm - how is this base::Unretained(this) safe? ...
8 years ago (2012-12-18 05:44:40 UTC) #18
danakj
https://codereview.chromium.org/11606012/diff/8/cc/gl_renderer.cc File cc/gl_renderer.cc (right): https://codereview.chromium.org/11606012/diff/8/cc/gl_renderer.cc#newcode1513 cc/gl_renderer.cc:1513: if (m_context->checkFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) On 2012/12/18 05:40:11, jamesr wrote: ...
8 years ago (2012-12-18 06:06:57 UTC) #19
jamesr
On 2012/12/18 06:06:57, danakj wrote: > https://codereview.chromium.org/11606012/diff/8/cc/gl_renderer.cc > File cc/gl_renderer.cc (right): > > https://codereview.chromium.org/11606012/diff/8/cc/gl_renderer.cc#newcode1513 > ...
8 years ago (2012-12-18 06:07:56 UTC) #20
danakj
On Tue, Dec 18, 2012 at 1:07 AM, <jamesr@chromium.org> wrote: > On 2012/12/18 06:06:57, danakj ...
8 years ago (2012-12-18 06:11:30 UTC) #21
ccameron
https://codereview.chromium.org/11606012/diff/17001/cc/prioritized_resource_manager.cc File cc/prioritized_resource_manager.cc (right): https://codereview.chromium.org/11606012/diff/17001/cc/prioritized_resource_manager.cc#newcode314 cc/prioritized_resource_manager.cc:314: DCHECK(m_proxy->isImplThread() && m_proxy->isMainThreadBlocked()); Or alternatively, if resourceProvider is NULL, ...
8 years ago (2012-12-18 19:24:01 UTC) #22
jamesr
https://codereview.chromium.org/11606012/diff/17001/cc/prioritized_resource.cc File cc/prioritized_resource.cc (right): https://codereview.chromium.org/11606012/diff/17001/cc/prioritized_resource.cc#newcode161 cc/prioritized_resource.cc:161: resourceProvider->deleteResource(id()); this is a 4-space indent file https://codereview.chromium.org/11606012/diff/17001/cc/resource_provider.cc File ...
8 years ago (2012-12-18 21:24:01 UTC) #23
danakj
Sorry don't worry about this CL too much. I'm going to delete all the layout ...
8 years ago (2012-12-18 21:26:59 UTC) #24
danakj
I rebooted this CL now that all the context loss testing has has been moved ...
7 years, 11 months ago (2013-01-18 19:42:05 UTC) #25
jamesr
lgtm
7 years, 11 months ago (2013-01-23 00:39:52 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/11606012/30001
7 years, 11 months ago (2013-01-23 00:42:57 UTC) #27
commit-bot: I haz the power
Step "update" is always a major failure. Look at the try server FAQ for more ...
7 years, 11 months ago (2013-01-23 00:51:52 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/11606012/30001
7 years, 11 months ago (2013-01-23 02:08:43 UTC) #29
commit-bot: I haz the power
7 years, 11 months ago (2013-01-23 03:57:09 UTC) #30
Message was sent while issue was closed.
Change committed as 178239

Powered by Google App Engine
This is Rietveld 408576698