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

Issue 2083853002: exo: Recreate Surface resources on context lost. (Closed)

Created:
4 years, 6 months ago by jbauman
Modified:
4 years, 6 months ago
Reviewers:
reveman, sky, piman
CC:
cc-bugs_chromium.org, chromium-reviews, danakj+watch_chromium.org, darin-cc_chromium.org, jam, jbauman+watch_chromium.org, kalyank, piman+watch_chromium.org, sievers+watch_chromium.org, Ian Vollick
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

exo: Recreate Surface resources on context lost. When the GPU context is lost the GpuMemoryBuffers may remain valid, but the textures pointed to be the cc::Surface's frame are invalid. The Surface should create a new TransferableResource from the Buffer and submit it in a new frame to the cc::Surface. Also add a ui::ContextFactoryObserver so the Surface can be notified when the SharedMainThreadContextProvider it relies on is lost. Other users of ImageTransportFactoryObserver are converted to the new interface. BUG=b/29239573 Committed: https://crrev.com/45c06866093fa86f96da6e8da0dee04740b7aee1 Cr-Commit-Position: refs/heads/master@{#401684}

Patch Set 1 #

Patch Set 2 : fix browser test #

Total comments: 4

Patch Set 3 : Make ContextFactory pure; hold on to buffer reference #

Total comments: 8

Patch Set 4 : Add OnAttach and OnDetach #

Patch Set 5 : fix deps #

Total comments: 7

Patch Set 6 : fix nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+355 lines, -204 lines) Patch
M ash/sysui/stub_context_factory.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M components/exo/BUILD.gn View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M components/exo/buffer.h View 1 2 3 4 5 3 chunks +12 lines, -0 lines 0 comments Download
M components/exo/buffer.cc View 1 2 3 4 5 3 chunks +19 lines, -7 lines 0 comments Download
M components/exo/buffer_unittest.cc View 1 2 3 4 chunks +12 lines, -4 lines 0 comments Download
M components/exo/surface.h View 1 2 3 4 5 9 chunks +37 lines, -5 lines 0 comments Download
M components/exo/surface.cc View 1 2 3 4 5 10 chunks +176 lines, -126 lines 0 comments Download
M components/exo/surface_unittest.cc View 1 2 3 3 chunks +22 lines, -1 line 0 comments Download
M content/browser/compositor/gpu_process_transport_factory.h View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M content/browser/compositor/gpu_process_transport_factory.cc View 1 2 4 chunks +13 lines, -14 lines 0 comments Download
M content/browser/compositor/image_transport_factory.h View 3 chunks +1 line, -17 lines 0 comments Download
M content/browser/compositor/image_transport_factory_browsertest.cc View 1 3 chunks +4 lines, -4 lines 0 comments Download
M content/browser/compositor/owned_mailbox.h View 2 chunks +2 lines, -1 line 0 comments Download
M content/browser/compositor/owned_mailbox.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M content/browser/compositor/test/no_transport_image_transport_factory.h View 4 chunks +5 lines, -5 lines 0 comments Download
M content/browser/compositor/test/no_transport_image_transport_factory.cc View 2 chunks +1 line, -12 lines 0 comments Download
M content/browser/renderer_host/delegated_frame_host.h View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/delegated_frame_host.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M ui/compositor/compositor.h View 1 2 2 chunks +18 lines, -0 lines 0 comments Download
M ui/compositor/test/in_process_context_factory.h View 1 2 3 chunks +7 lines, -0 lines 0 comments Download
M ui/compositor/test/in_process_context_factory.cc View 1 2 2 chunks +12 lines, -0 lines 0 comments Download
M ui/views/mus/surface_context_factory.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 21 (7 generated)
jbauman
4 years, 6 months ago (2016-06-21 00:46:35 UTC) #3
piman
https://codereview.chromium.org/2083853002/diff/20001/ui/compositor/compositor.h File ui/compositor/compositor.h (right): https://codereview.chromium.org/2083853002/diff/20001/ui/compositor/compositor.h#newcode152 ui/compositor/compositor.h:152: base::ObserverList<ContextFactoryObserver> observer_list_; Can we keep this class pure virtual? ...
4 years, 6 months ago (2016-06-21 01:14:14 UTC) #4
reveman
https://codereview.chromium.org/2083853002/diff/20001/components/exo/surface.cc File components/exo/surface.cc (right): https://codereview.chromium.org/2083853002/diff/20001/components/exo/surface.cc#newcode669 components/exo/surface.cc:669: // This can fail even if there's a buffer ...
4 years, 6 months ago (2016-06-21 16:25:47 UTC) #5
jbauman
On 2016/06/21 16:25:47, reveman wrote: > https://codereview.chromium.org/2083853002/diff/20001/components/exo/surface.cc > File components/exo/surface.cc (right): > > https://codereview.chromium.org/2083853002/diff/20001/components/exo/surface.cc#newcode669 > ...
4 years, 6 months ago (2016-06-21 23:31:03 UTC) #6
jbauman
On 2016/06/21 01:14:14, piman wrote: > https://codereview.chromium.org/2083853002/diff/20001/ui/compositor/compositor.h > File ui/compositor/compositor.h (right): > > https://codereview.chromium.org/2083853002/diff/20001/ui/compositor/compositor.h#newcode152 > ...
4 years, 6 months ago (2016-06-21 23:31:48 UTC) #7
piman
lgtm
4 years, 6 months ago (2016-06-22 00:59:16 UTC) #8
reveman
On 2016/06/21 at 23:31:03, jbauman wrote: > On 2016/06/21 16:25:47, reveman wrote: > > https://codereview.chromium.org/2083853002/diff/20001/components/exo/surface.cc ...
4 years, 6 months ago (2016-06-22 17:15:26 UTC) #9
jbauman
PTAL On 2016/06/22 17:15:26, reveman wrote: > On 2016/06/21 at 23:31:03, jbauman wrote: > > ...
4 years, 6 months ago (2016-06-22 23:45:48 UTC) #10
reveman
very nice. lgtm % a minor request and some nits https://codereview.chromium.org/2083853002/diff/80001/components/exo/buffer.h File components/exo/buffer.h (right): https://codereview.chromium.org/2083853002/diff/80001/components/exo/buffer.h#newcode66 ...
4 years, 6 months ago (2016-06-23 00:44:39 UTC) #11
jbauman
sky: ash/sysui and ui/views/ OWNERS review.
4 years, 6 months ago (2016-06-23 01:35:19 UTC) #13
sky
LGTM
4 years, 6 months ago (2016-06-23 15:29:06 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2083853002/100001
4 years, 6 months ago (2016-06-23 19:29:48 UTC) #17
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 6 months ago (2016-06-23 19:35:16 UTC) #19
commit-bot: I haz the power
4 years, 6 months ago (2016-06-23 19:37:01 UTC) #21
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/45c06866093fa86f96da6e8da0dee04740b7aee1
Cr-Commit-Position: refs/heads/master@{#401684}

Powered by Google App Engine
This is Rietveld 408576698