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

Issue 25367003: aura: Attach lost context callback to the shared main thread context (Closed)

Created:
7 years, 2 months ago by piman
Modified:
7 years, 2 months ago
Reviewers:
jamesr, danakj1
CC:
chromium-reviews, joi+watch-content_chromium.org, jam, sievers+watch_chromium.org, jbauman+watch_chromium.org, darin-cc_chromium.org, piman+watch_chromium.org, danakj+watch_chromium.org
Visibility:
Public.

Description

aura: Attach lost context callback to the shared main thread context r225643 broke lost context recovery on Aura with the thread (i.e. Chrome OS). The lost context callback needs to be attached to the shared main thread context, since that's what creates the resources - the offscreen one may not even exist / be used. BUG=none Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=226610

Patch Set 1 #

Patch Set 2 : add test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+69 lines, -13 lines) Patch
M content/browser/aura/gpu_process_transport_factory.cc View 1 2 chunks +8 lines, -13 lines 0 comments Download
A content/browser/aura/image_transport_factory_browsertest.cc View 1 1 chunk +56 lines, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 chunks +5 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
piman
7 years, 2 months ago (2013-10-02 04:00:00 UTC) #1
jamesr
Doh. lgtm Guess we don't have a way to test this? On Oct 1, 2013 ...
7 years, 2 months ago (2013-10-02 05:37:51 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/piman@chromium.org/25367003/10001
7 years, 2 months ago (2013-10-02 20:37:12 UTC) #3
piman
Added test.
7 years, 2 months ago (2013-10-02 20:46:31 UTC) #4
commit-bot: I haz the power
Change committed as 226610
7 years, 2 months ago (2013-10-02 23:21:13 UTC) #5
vignatti (out of this project)
On 2013/10/02 23:21:13, I haz the power (commit-bot) wrote: > Change committed as 226610 there's ...
7 years, 2 months ago (2013-10-10 12:34:02 UTC) #6
vignatti (out of this project)
On 2013/10/10 12:34:02, vignatti wrote: > On 2013/10/02 23:21:13, I haz the power (commit-bot) wrote: ...
7 years, 2 months ago (2013-10-10 12:58:53 UTC) #7
piman
On 2013/10/10 12:34:02, vignatti wrote: > On 2013/10/02 23:21:13, I haz the power (commit-bot) wrote: ...
7 years, 2 months ago (2013-10-10 20:11:58 UTC) #8
danakj1
On Thu, Oct 10, 2013 at 4:11 PM, <piman@chromium.org> wrote: > On 2013/10/10 12:34:02, vignatti ...
7 years, 2 months ago (2013-10-10 20:13:36 UTC) #9
piman
7 years, 2 months ago (2013-10-10 20:20:28 UTC) #10
On Thu, Oct 10, 2013 at 1:13 PM, Dana Jansens <danakj@google.com> wrote:

> On Thu, Oct 10, 2013 at 4:11 PM, <piman@chromium.org> wrote:
>
>> On 2013/10/10 12:34:02, vignatti wrote:
>>
>>> On 2013/10/02 23:21:13, I haz the power (commit-bot) wrote:
>>> > Change committed as 226610
>>>
>>
>>  there's problem I think with this CL, that I'm seeing with Chrome on
>>> Ozone-Wayland:
>>>
https://github.com/01org/**ozone-wayland/issues/106<https://github.com/01org/...
>>>
>>
>>  My implementation doesn't provide the offscreen implementation.
>>>
>>
>> I'm confused. You need this context for proper behavior. It's used to
>> manage the
>> textures that come from the renderer.
>>
>>
>>  So in the snip
>>> that has been changed, SetLostContextCallback() is performed and then
>>> BindToCurrentThread() returns false (falls in makeContextCurrent()).
>>> That now
>>> means that ContextProviderCommandBuffer::**lost_context_callback_ will
>>> be set
>>>
>> but
>>
>>> never scheduled to run.
>>>
>>
>> I'm more confused. If BindToCurrentThread fails, we reset
>> shared_main_thread_contexts_, so the next time around we would recreate
>> it.
>
>
> I believe it is re-using the offscreen compositor context, which will now
> have a LostContextHandler set on it.
>

Oh, I see. I suppose in the single-threaded case we could reset both. But
the point above stands.

>
>
>>
>>
>>  Next when another context is being created (a new tab is
>>> opened in Chrome), SetLostContextCallback() will fail because
>>> lost_context_callback_ is dirty:
>>>
>>
>>  [783:783:1010/150304:FATAL:**context_provider_command_**buffer.cc(299)]
>>> Check
>>> failed: lost_context_callback_.is_**null() ||
>>> lost_context_callback.is_null(**).
>>>   [0x7fca2b8db41c] base::debug::StackTrace::**StackTrace()
>>>   [0x7fca2b9166f3] logging::LogMessage::~**LogMessage()
>>>   [0x7fca30169413]
>>> content::**ContextProviderCommandBuffer::**SetLostContextCallback()
>>>   [0x7fca2f0bab0a]
>>> content::**GpuProcessTransportFactory::**SharedMainThreadContextProvide*
>>> *r()
>>>   [0x7fca2f0ba2ea]
>>> content::**GpuProcessTransportFactory::**CreateSharedSurfaceHandle()
>>>   [0x7fca2ee6d2cf] content::**RenderWidgetHostViewAura::**
>>> GetCompositingSurface()
>>>   [0x7fca2ee4f981] content::RenderWidgetHostImpl:**
>>> :GetCompositingSurface()
>>>   [0x7fca2ee30eaf] content::RenderViewHostImpl::**CreateRenderView()
>>>   [0x7fca2eedfba3] content::WebContentsImpl::**
>>> CreateRenderViewForRenderManag**er()
>>>   [0x7fca2f09a77e] content::**RenderViewHostManager::**InitRenderView()
>>>
>>
>>  I think a method like ContextProviderCommandBuffer::**
>>> UnsetLostContextCallback()
>>> could be the trick to clean that pointer. @piman?
>>>
>>
>>
>>
https://codereview.chromium.**org/25367003/<https://codereview.chromium.org/2...
>>
>
>

To unsubscribe from this group and stop receiving emails from it, send an email
to chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698