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

Issue 2961403002: WIP fix for Ozone cursor woes in Mushrome: Numéro deux

Created:
3 years, 5 months ago by mfomitchev
Modified:
3 years, 5 months ago
Reviewers:
sadrul, sky, erg
CC:
chromium-reviews, rjkroege, kalyank, ozone-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

WIP fix for Ozone cursor woes in Mushrome: Numéro deux This makes CursorFactoryOzone TLS, so that both the UI Service thread, and the browser thread cad maintain an instance. Additionally, CursorLoaderOzoner saves the factory when created via CursorFactoryOzone::GetInstance(), and then uses it through its lifetime. This means that CursorLoaderOzone ends up using the factory corresponding to the thread it was created on. Now, for Mus, we create the ImageCursors object on the Mus thread, but then pass the ownership to the browser thread via a helper ImageCursorsHolder class. This ensures that this ImageCursors object uses Mus's factory, even though it's used on the browser thread. BUG=722527

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+147 lines, -73 lines) Patch
M chrome/browser/chrome_content_browser_client.h View 3 chunks +4 lines, -7 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 2 chunks +2 lines, -4 lines 0 comments Download
M services/ui/service.h View 4 chunks +5 lines, -5 lines 0 comments Download
M services/ui/service.cc View 3 chunks +9 lines, -7 lines 0 comments Download
M services/ui/ws/display.cc View 1 chunk +1 line, -1 line 0 comments Download
M services/ui/ws/platform_display.h View 2 chunks +2 lines, -2 lines 0 comments Download
M services/ui/ws/platform_display.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M services/ui/ws/threaded_image_cursors.h View 2 chunks +2 lines, -2 lines 0 comments Download
M services/ui/ws/threaded_image_cursors.cc View 4 chunks +39 lines, -17 lines 0 comments Download
M services/ui/ws/window_server.h View 2 chunks +2 lines, -2 lines 0 comments Download
M services/ui/ws/window_server.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M services/ui/ws/window_server_delegate.h View 2 chunks +3 lines, -2 lines 0 comments Download
M ui/base/cursor/cursor_loader_ozone.h View 2 chunks +3 lines, -0 lines 0 comments Download
M ui/base/cursor/cursor_loader_ozone.cc View 4 chunks +11 lines, -9 lines 0 comments Download
M ui/base/cursor/image_cursors.h View 2 chunks +21 lines, -0 lines 0 comments Download
M ui/base/cursor/image_cursors.cc View 2 chunks +24 lines, -0 lines 0 comments Download
M ui/ozone/public/cursor_factory_ozone.h View 1 chunk +0 lines, -3 lines 0 comments Download
M ui/ozone/public/cursor_factory_ozone.cc View 1 chunk +14 lines, -8 lines 0 comments Download

Messages

Total messages: 10 (4 generated)
sky
On 2017/06/29 21:25:16, mfomitchev wrote: > Description was changed from > > ========== > WIP ...
3 years, 5 months ago (2017-07-11 20:34:26 UTC) #4
mfomitchev
> Does CursorFactoryOzone have any potential code that requires it to be used on > ...
3 years, 5 months ago (2017-07-11 21:29:24 UTC) #6
sky
On Tue, Jul 11, 2017 at 2:29 PM, <mfomitchev@chromium.org> wrote: > Reviewers: sadrul, erg, sky ...
3 years, 5 months ago (2017-07-11 22:14:16 UTC) #7
chromium-reviews
Good idea, I will do that. On Tue, Jul 11, 2017, 6:14 PM Scott Violet ...
3 years, 5 months ago (2017-07-11 22:30:18 UTC) #8
mfomitchev
I have just realized there is an issue with this code: we may have multiple ...
3 years, 5 months ago (2017-07-12 03:12:34 UTC) #9
sky
3 years, 5 months ago (2017-07-12 15:38:32 UTC) #10
I agree with your assessment. ImageCursorsCollection SGTM

On Tue, Jul 11, 2017 at 8:12 PM, <mfomitchev@chromium.org> wrote:

> I have just realized there is an issue with this code: we may have multiple
> displays, and each of them needs its own ImageCursors. Furthermore,
> displays may
> be added and removed at runtime, so these ImageCursors objects need to be
> added/removed accordingly. So I think instead of an ImageCursorsHolder with
> SetImageCursors, we need something like an ImageCursorsCollection with
> Add/Remove. We could still go the callback route, supplying two callbacks:
> one
> for adding and another for removing, but at that point I am not sure the
> callback approach looks simpler anymore. We'd also need separate callbacks
> implementations for the tests, but if we use ImageCursorsCollection, we'd
> be
> able to reuse it in tests. So I am leaning towards using
> ImageCursorsCollection.
> WDYT?
>
> https://codereview.chromium.org/2961403002/
>

-- 
You received this message because you are subscribed to the Google Groups
"Chromium-reviews" group.
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