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

Issue 210005: Rewrote full-screen support on Windows. O3D now always creates its own... (Closed)

Created:
11 years, 3 months ago by Ken Russell (Google)
Modified:
9 years, 7 months ago
Reviewers:
gman1, vangelis, maf, apatrick
CC:
o3d-review_googlegroups.com
Visibility:
Public.

Description

Rewrote full-screen support on Windows. O3D now always creates its own window in which to render, rather than rendering into either the browser's window or a separate full-screen window. The O3D window is removed from the browser's hierarchy and made top-level in order to go to full-screen mode via Direct3D. This solves fundamental focus fighting problems seen on Windows Vista. This change allowed the event forwarding code in the plugin's window message loop to be deleted, but a new workaround for a flicker upon the first mouse click in O3D in Firefox was required. Split the Renderer's fullscreen API into GoFullscreen and CancelFullscreen to solve chicken-and-egg problems with coming out of full-screen mode. Changed how the plugin detects resize events. Rather than responding to WM_SIZE messages, NPP_SetWindow is now responsible for propagating resize events to the client. Changed the ActiveX host control to call NPP_SetWindow in response to SetObjectRects. Fixed RendererGL::IsCurrent() on non-Mac platforms. Removed the bogus current_renderer_ static variable. Tested the following scenarios in IE and Firefox on Windows: - Full-screen involving display mode change, Escape to exit. - Full-screen involving display mode change, Alt-Tab to exit. - Full-screen involving display mode change, Alt-F4 to exit. - Full-screen involving display mode change, timeout to exit. - Full-screen with no display mode change, Escape to exit. - Full-screen with no display mode change, Alt-Tab to exit. - Full-screen with no display mode change, Alt-F4 to exit. - Full-screen with no display mode change, timeout to exit. - Beach demo, particle demo, other tests. Tested the following scenarios on the Mac in Safari (for which the code path didn't change): - Full-screen, escape to exit. - Full-screen, Alt-Tab to exit. - Full-screen, timeout to exit. When http://crbug.com/21921 is fixed, full-screen mode will work on Windows Vista with Aero on in Chrome. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=26489

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 22

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+353 lines, -313 lines) Patch
M core/cross/gl/renderer_gl.h View 1 2 3 4 3 chunks +27 lines, -24 lines 0 comments Download
M core/cross/gl/renderer_gl.cc View 5 chunks +9 lines, -13 lines 0 comments Download
M core/cross/renderer.h View 1 2 3 3 chunks +26 lines, -7 lines 0 comments Download
M core/cross/renderer.cc View 2 chunks +3 lines, -1 line 0 comments Download
M core/win/d3d9/renderer_d3d9.h View 1 2 3 4 1 chunk +7 lines, -9 lines 0 comments Download
M core/win/d3d9/renderer_d3d9.cc View 1 2 2 chunks +52 lines, -28 lines 0 comments Download
M plugin/cross/o3d_glue.h View 1 2 2 chunks +9 lines, -23 lines 0 comments Download
M plugin/cross/o3d_glue.cc View 1 2 2 chunks +2 lines, -4 lines 0 comments Download
M plugin/npapi_host_control/win/host_control.h View 1 chunk +3 lines, -0 lines 0 comments Download
M plugin/npapi_host_control/win/host_control.cc View 1 chunk +19 lines, -0 lines 0 comments Download
M plugin/npapi_host_control/win/np_plugin_proxy.h View 1 chunk +5 lines, -0 lines 0 comments Download
M plugin/npapi_host_control/win/np_plugin_proxy.cc View 1 2 1 chunk +13 lines, -0 lines 0 comments Download
M plugin/win/main_win.cc View 1 2 11 chunks +178 lines, -204 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Ken Russell (Google)
11 years, 3 months ago (2009-09-17 01:15:19 UTC) #1
vangelis
nicely done. A few inline comments and thoughts. http://codereview.chromium.org/210005/diff/3007/3020 File plugin/win/main_win.cc (right): http://codereview.chromium.org/210005/diff/3007/3020#newcode668 Line 668: ...
11 years, 3 months ago (2009-09-17 01:56:22 UTC) #2
apatrick
A few additional things... http://codereview.chromium.org/210005/diff/3007/3013 File core/win/d3d9/renderer_d3d9.cc (right): http://codereview.chromium.org/210005/diff/3007/3013#newcode1337 Line 1337: if (true != fullscreen_) ...
11 years, 3 months ago (2009-09-17 18:32:35 UTC) #3
Ken Russell (Google)
http://codereview.chromium.org/210005/diff/3007/3013 File core/win/d3d9/renderer_d3d9.cc (right): http://codereview.chromium.org/210005/diff/3007/3013#newcode1337 Line 1337: if (true != fullscreen_) { On 2009/09/17 18:32:35, ...
11 years, 3 months ago (2009-09-17 19:03:07 UTC) #4
apatrick
I'll leave it to vangelis. LGTM for my comments.
11 years, 3 months ago (2009-09-17 19:12:39 UTC) #5
vangelis
LGTM for me too.
11 years, 3 months ago (2009-09-17 19:55:49 UTC) #6
maf
LGTM
11 years, 3 months ago (2009-09-17 20:25:24 UTC) #7
gman
LGTM http://codereview.chromium.org/210005/diff/3007/3012 File core/win/d3d9/renderer_d3d9.h (right): http://codereview.chromium.org/210005/diff/3007/3012#newcode95 Line 95: virtual bool CancelFullscreen(const DisplayWindow& display, Personal style ...
11 years, 3 months ago (2009-09-17 21:30:55 UTC) #8
Ken Russell (Google)
11 years, 3 months ago (2009-09-17 21:42:15 UTC) #9
http://codereview.chromium.org/210005/diff/3007/3012
File core/win/d3d9/renderer_d3d9.h (right):

http://codereview.chromium.org/210005/diff/3007/3012#newcode95
Line 95: virtual bool CancelFullscreen(const DisplayWindow& display,
On 2009/09/17 21:30:55, gman wrote:
> Personal style but I'm a big fan of not documenting things twice which makes
> more work (have to maintain multiple sets of docs) and makes it more likely
for
> one to get out of sync. So, I usually just say 
> 
> // Overridden from Renderer
> 
> That way I know where to find the one and only correct docs.

Sounds good. Done here and in renderer_gl.h.

http://codereview.chromium.org/210005/diff/3007/3020
File plugin/win/main_win.cc (right):

http://codereview.chromium.org/210005/diff/3007/3020#newcode555
Line 555: // TODO(kbr): consider doing this somehow more asynchronously;
On 2009/09/17 21:30:55, gman wrote:
> Is this important? You can send yourself a message which will happen async.

It doesn't appear to be important -- the code works -- and would complicate the
logic. For that reason I left it as is.

Powered by Google App Engine
This is Rietveld 408576698