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

Issue 22876030: Remove using the Shell desktop Window when we don't have an acceleated widget. (Closed)

Created:
7 years, 4 months ago by cpu_(ooo_6.6-7.5)
Modified:
7 years, 3 months ago
CC:
chromium-reviews, miu+watch_chromium.org, sadrul, ben+watch_chromium.org
Visibility:
Public.

Description

Remove using the Shell desktop Window when we don't have an acceleated widget. For Windows Ash (metro mode) we did not had timely access to the real window (aka 'core window') so to keep the compositor from CHECKIing we gave the shell desktop Window when it wanted a window here RootWindow::RootWindow(const CreateParams& params) { ... compositor_.reset(new ui::Compositor(this, host_->GetAcceleratedWidget())); ... } This was called from: ash::DisplayController::AddRootWindowForDisplay ash::DisplayController::InitPrimaryDisplay ash::Shell::Init Because ash was always created. Later on when the viewer process had started it sends an IPC back with the core window which set the real window with void ChromeMetroViewerProcessHost::OnSetTargetSurface(..) { scoped_refptr<AcceleratedPresenter> any_window = AcceleratedPresenter::GetForWindow(NULL); any_window->SetNewTargetWindow(hwnd); .... } All this hackery can go away because now Ash starts on demand once the aforementioned IPC arrives. BUG=none TEST=chromes starts in metro mode. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=220694

Patch Set 1 #

Total comments: 7

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -39 lines) Patch
M ash/test/test_metro_viewer_process_host.cc View 1 chunk +1 line, -5 lines 0 comments Download
M chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.cc View 1 chunk +3 lines, -5 lines 0 comments Download
M ui/aura/remote_root_window_host_win.h View 1 2 chunks +6 lines, -2 lines 0 comments Download
M ui/aura/remote_root_window_host_win.cc View 2 chunks +13 lines, -8 lines 0 comments Download
M ui/surface/accelerated_surface_win.h View 1 chunk +0 lines, -6 lines 0 comments Download
M ui/surface/accelerated_surface_win.cc View 2 chunks +0 lines, -13 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
cpu_(ooo_6.6-7.5)
See my comments below for interesting spots. https://codereview.chromium.org/22876030/diff/1/ash/test/test_metro_viewer_process_host.cc File ash/test/test_metro_viewer_process_host.cc (left): https://codereview.chromium.org/22876030/diff/1/ash/test/test_metro_viewer_process_host.cc#oldcode34 ash/test/test_metro_viewer_process_host.cc:34: backing_surface_.reset(new AcceleratedSurface(hwnd)); ...
7 years, 3 months ago (2013-08-25 23:35:17 UTC) #1
gab
lgtm w/ comments below. https://codereview.chromium.org/22876030/diff/1/ui/aura/remote_root_window_host_win.h File ui/aura/remote_root_window_host_win.h (right): https://codereview.chromium.org/22876030/diff/1/ui/aura/remote_root_window_host_win.h#newcode89 ui/aura/remote_root_window_host_win.h:89: static RemoteRootWindowHostWin* Instance(); Document that ...
7 years, 3 months ago (2013-08-26 19:46:03 UTC) #2
cpu_(ooo_6.6-7.5)
Al, please take a look since you are owner in surface. gab, changes done.
7 years, 3 months ago (2013-08-27 23:58:54 UTC) #3
apatrick_chromium
lgtm https://codereview.chromium.org/22876030/diff/1/ui/surface/accelerated_surface_win.cc File ui/surface/accelerated_surface_win.cc (left): https://codereview.chromium.org/22876030/diff/1/ui/surface/accelerated_surface_win.cc#oldcode678 ui/surface/accelerated_surface_win.cc:678: swap_chain_ = NULL; On 2013/08/26 19:46:03, gab wrote: ...
7 years, 3 months ago (2013-08-28 00:03:28 UTC) #4
sky
Sorry, no idea either. I'm not familiar with this code.
7 years, 3 months ago (2013-08-28 20:34:48 UTC) #5
cpu_(ooo_6.6-7.5)
so should I commit?
7 years, 3 months ago (2013-08-29 02:30:45 UTC) #6
sky
Al said its ok, so commit away. LGTM
7 years, 3 months ago (2013-08-29 15:41:06 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cpu@chromium.org/22876030/30001
7 years, 3 months ago (2013-08-30 19:38:59 UTC) #8
commit-bot: I haz the power
Change committed as 220694
7 years, 3 months ago (2013-08-30 23:35:32 UTC) #9
scottmg
7 years, 3 months ago (2013-09-03 16:08:56 UTC) #10
Message was sent while issue was closed.
lgtm

https://codereview.chromium.org/22876030/diff/1/ui/surface/accelerated_surfac...
File ui/surface/accelerated_surface_win.cc (left):

https://codereview.chromium.org/22876030/diff/1/ui/surface/accelerated_surfac...
ui/surface/accelerated_surface_win.cc:678: swap_chain_ = NULL;
On 2013/08/25 23:35:17, cpu wrote:
> the new code does not null the swap chain, is that bad?

That was probably there to force the Present to create a new swapchain after the
window was changed (sort of behind its back). Since it's just getting the right
window via GetAcceleratedWidget now, should be OK.

Powered by Google App Engine
This is Rietveld 408576698