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

Issue 205433005: ozone: Add OzoneWindowFactory & OzoneWindow (Closed)

Created:
6 years, 9 months ago by spang
Modified:
6 years, 8 months ago
Reviewers:
rjkroege, dnicoara, sadrul
CC:
chromium-reviews, joi+watch-content_chromium.org, ben+aura_chromium.org, ozone-reviews_chromium.org, Ian Vollick, jam, sievers+watch_chromium.org, jbauman+watch_chromium.org, darin-cc_chromium.org, kalyank, piman+watch_chromium.org, danakj+watch_chromium.org
Visibility:
Public.

Description

ozone: Add OzoneWindowFactory & OzoneWindow This adds window a creation API to ozone & adds a new OzoneWindow interface for window operations. The OzoneWindow gets various window-related methods that were previously on SurfaceFactoryOzone, CursorFactoryOzone, & EventFactoryOzone. All of those functions used to take an intptr_t AcceleratedWidget, and were expected to coordinate behind the scenes in order to function. This centralizes all window operations in one place. The window is owned by WindowTreeHostOzone so that it is cleaned up correctly when we destroy the host. TEST=ui_unittests, content_shell --ozone-platform={test,dri} BUG=none

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+384 lines, -69 lines) Patch
M content/browser/compositor/software_output_device_ozone_unittest.cc View 2 chunks +2 lines, -3 lines 0 comments Download
M ui/aura/window_tree_host_ozone.h View 2 chunks +6 lines, -3 lines 0 comments Download
M ui/aura/window_tree_host_ozone.cc View 6 chunks +18 lines, -23 lines 0 comments Download
M ui/base/cursor/ozone/cursor_factory_ozone.h View 1 chunk +0 lines, -4 lines 0 comments Download
M ui/base/cursor/ozone/cursor_factory_ozone.cc View 1 chunk +0 lines, -5 lines 0 comments Download
M ui/compositor/test/test_compositor_host_ozone.cc View 2 chunks +3 lines, -1 line 0 comments Download
M ui/events/ozone/event_factory_ozone.h View 1 chunk +0 lines, -6 lines 0 comments Download
M ui/events/ozone/event_factory_ozone.cc View 1 chunk +0 lines, -5 lines 0 comments Download
M ui/gfx/ozone/dri/dri_surface_factory.h View 1 chunk +1 line, -1 line 0 comments Download
M ui/gfx/ozone/dri/dri_surface_factory.cc View 3 chunks +8 lines, -7 lines 0 comments Download
M ui/gfx/ozone/impl/file_surface_factory.h View 1 chunk +0 lines, -1 line 0 comments Download
M ui/gfx/ozone/impl/file_surface_factory.cc View 1 chunk +0 lines, -4 lines 0 comments Download
M ui/gfx/ozone/surface_factory_ozone.h View 2 chunks +6 lines, -5 lines 0 comments Download
M ui/gfx/ozone/surface_factory_ozone.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M ui/ozone/ozone.gyp View 1 chunk +8 lines, -0 lines 0 comments Download
M ui/ozone/ozone_platform.h View 2 chunks +2 lines, -0 lines 0 comments Download
M ui/ozone/ozone_platform.cc View 3 chunks +3 lines, -0 lines 0 comments Download
M ui/ozone/platform/dri/ozone_platform_dri.h View 3 chunks +3 lines, -0 lines 0 comments Download
M ui/ozone/platform/dri/ozone_platform_dri.cc View 2 chunks +6 lines, -1 line 0 comments Download
A ui/ozone/platform/dri/ozone_window_dri.h View 1 chunk +33 lines, -0 lines 0 comments Download
A ui/ozone/platform/dri/ozone_window_dri.cc View 1 chunk +24 lines, -0 lines 0 comments Download
A ui/ozone/platform/dri/window_factory_dri.h View 1 chunk +33 lines, -0 lines 0 comments Download
A ui/ozone/platform/dri/window_factory_dri.cc View 1 chunk +23 lines, -0 lines 0 comments Download
M ui/ozone/platform/test/ozone_platform_test.h View 2 chunks +3 lines, -0 lines 0 comments Download
M ui/ozone/platform/test/ozone_platform_test.cc View 1 chunk +4 lines, -0 lines 0 comments Download
A ui/ozone/window/ozone_window.h View 1 chunk +60 lines, -0 lines 3 comments Download
A ui/ozone/window/ozone_window.cc View 1 chunk +42 lines, -0 lines 0 comments Download
A ui/ozone/window/window_factory_ozone.h View 1 chunk +42 lines, -0 lines 0 comments Download
A ui/ozone/window/window_factory_ozone.cc View 1 chunk +52 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
spang
6 years, 9 months ago (2014-03-20 00:39:52 UTC) #1
spang
OzoneWindow is probably now the same object as in sadrul's proposal. Maybe we should rename ...
6 years, 9 months ago (2014-03-20 17:16:37 UTC) #2
spang
This depends on https://codereview.chromium.org/205433002/
6 years, 9 months ago (2014-03-20 17:22:04 UTC) #3
rjkroege
https://codereview.chromium.org/205433005/diff/1/ui/ozone/window/ozone_window.h File ui/ozone/window/ozone_window.h (right): https://codereview.chromium.org/205433005/diff/1/ui/ozone/window/ozone_window.h#newcode35 ui/ozone/window/ozone_window.h:35: class OZONE_EXPORT OzoneWindow { this needs to be coupled ...
6 years, 9 months ago (2014-03-24 16:11:51 UTC) #4
spang
https://codereview.chromium.org/205433005/diff/1/ui/ozone/window/ozone_window.h File ui/ozone/window/ozone_window.h (right): https://codereview.chromium.org/205433005/diff/1/ui/ozone/window/ozone_window.h#newcode35 ui/ozone/window/ozone_window.h:35: class OZONE_EXPORT OzoneWindow { On 2014/03/24 16:11:51, rjkroege wrote: ...
6 years, 9 months ago (2014-03-24 18:15:29 UTC) #5
rjkroege
On 2014/03/24 18:15:29, spang wrote: > https://codereview.chromium.org/205433005/diff/1/ui/ozone/window/ozone_window.h > File ui/ozone/window/ozone_window.h (right): > > https://codereview.chromium.org/205433005/diff/1/ui/ozone/window/ozone_window.h#newcode35 > ...
6 years, 9 months ago (2014-03-24 20:08:59 UTC) #6
dnicoara
https://codereview.chromium.org/205433005/diff/1/ui/ozone/window/ozone_window.h File ui/ozone/window/ozone_window.h (right): https://codereview.chromium.org/205433005/diff/1/ui/ozone/window/ozone_window.h#newcode35 ui/ozone/window/ozone_window.h:35: class OZONE_EXPORT OzoneWindow { On 2014/03/24 18:15:29, spang wrote: ...
6 years, 9 months ago (2014-03-24 21:04:26 UTC) #7
spang
On 2014/03/24 20:08:59, rjkroege wrote: > On 2014/03/24 18:15:29, spang wrote: > > > https://codereview.chromium.org/205433005/diff/1/ui/ozone/window/ozone_window.h ...
6 years, 9 months ago (2014-03-24 23:59:00 UTC) #8
spang
On 2014/03/24 23:59:00, spang wrote: > On 2014/03/24 20:08:59, rjkroege wrote: > > On 2014/03/24 ...
6 years, 9 months ago (2014-03-25 00:04:38 UTC) #9
sadrul
On 2014/03/25 00:04:38, spang wrote: > On 2014/03/24 23:59:00, spang wrote: > > On 2014/03/24 ...
6 years, 9 months ago (2014-03-25 22:49:53 UTC) #10
spang
On 2014/03/25 22:49:53, sadrul wrote: > On 2014/03/25 00:04:38, spang wrote: > > On 2014/03/24 ...
6 years, 9 months ago (2014-03-26 14:25:32 UTC) #11
rjkroege
On 2014/03/26 14:25:32, spang wrote: > On 2014/03/25 22:49:53, sadrul wrote: > > On 2014/03/25 ...
6 years, 8 months ago (2014-03-31 15:45:40 UTC) #12
spang
6 years, 8 months ago (2014-03-31 18:52:02 UTC) #13
On 2014/03/31 15:45:40, rjkroege wrote:
> On 2014/03/26 14:25:32, spang wrote:
> > On 2014/03/25 22:49:53, sadrul wrote:
> > > On 2014/03/25 00:04:38, spang wrote:
> > > > On 2014/03/24 23:59:00, spang wrote:
> > > > > On 2014/03/24 20:08:59, rjkroege wrote:
> > > > > > On 2014/03/24 18:15:29, spang wrote:
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
https://codereview.chromium.org/205433005/diff/1/ui/ozone/window/ozone_window.h
> > > > > > > File ui/ozone/window/ozone_window.h (right):
> > > > > > > 
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
https://codereview.chromium.org/205433005/diff/1/ui/ozone/window/ozone_window...
> > > > > > > ui/ozone/window/ozone_window.h:35: class OZONE_EXPORT OzoneWindow
{
> > > > > > > On 2014/03/24 16:11:51, rjkroege wrote:
> > > > > > > > this needs to be coupled to the backing Display in some fashion.
I
> > > need
> > > > to
> > > > > > > think
> > > > > > > > about how. dnicora@: what do you think?
> > > > > > > 
> > > > > > > 
> > > > > > > Yes. I think this must happen behind the scenes in
> WindowFactoryOzone
> > > > > though:
> > > > > > 
> > > > > > Hm. I'm not convinced.
> > > > > > 
> > > > > > > 
> > > > > > > - WindowFactoryOzone gets the initial screen bounds in
> CreateWindow()
> > > > > > > - WindowFactoryOzone finds the right display from screen bounds
> > > > > > 
> > > > > > what if you have two identical monitors?
> > > > > > 
> > > > > 
> > > > > Don't the windows exist in "screen" space? So you find the display by
> > > looking
> > > > at
> > > > > which display it sits on in screen space. Two identical monitors
surely
> > have
> > > > > different bounds in the screen.
> > > > >
> > > > 
> > > > Screen::GetDisplayNearestWindow yeah?
> > > 
> > > This apparently doesn't work for mirror modes, where there are two
displays,
> > and
> > > both are in the same coordinate space. Yufeng has been working in related
> > areas
> > > for the touch-calibration patch. He might have more details.
> > 
> > For mirroring, the window is on both displays, right? Shouldn't you find
both
> > displays?
> 
> hardware-assisted mirroring or software-enabled mirroring?
> 
> I've lost track of the details here. We have screens, displays, windows, SFOz,
> SOz. Draw me a picture?

I am zeroing in on the aura<->ozone bits in this CL. Forget about displays
because that doesn't even show up in the interface.

For ozone, a "window" should just be whatever semantics aura requires. So 1:1
strict owning relationship between [Desktop]WindowTreeHostOzone
(platform-independent) and WindowOzone (platform-dependent).

Similarly, SurfaceOzone is the semantics compositor & gpu need, with strict
owning 1:1 relationship between SoftwareOutputDeviceOzone/GLSurface
(platform-independent) and SurfaceOzone (platform-independent). Surface is for
painting only so narrower in scope than window.

This mostly all just falls out of the modularity requirements placed on ozone by
the design of chrome.

Powered by Google App Engine
This is Rietveld 408576698