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

Issue 3176027: Mac: Well-behaved accelerated plugins, actual fix (Closed)

Created:
10 years, 4 months ago by Nico
Modified:
9 years, 7 months ago
CC:
chromium-reviews, John Grabowski, ben+cc_chromium.org, brettw-cc_chromium.org, pam+watch_chromium.org, darin-cc_chromium.org, rohitrao (ping after 24h), Ken Russell (switch to Gerrit), Avi (use Gerrit), jam, stuartmorgan+watch_chromium.org
Visibility:
Public.

Description

Mac: Well-behaved accelerated plugins, actual fix Configure the opengl view to draw below the window, draw the view with NSClearColor so that's transparent, and make the window non-opaque while plugins are showing, so that the opengl surface can show through. This is a bit slower than previously without this patch, but it's about as fast as it was when we used CoreAnimation to show IOSurfaces. Parts of this code are from Simon Fraser's MacTierra code (with permission). BUG=44087, 51748 TEST= * Go to youtube. Findbar should show up on top of video. Go fullscreen. Tab overlay should show up on top of video. * Go to youtube, drag tab with video out and to a new window. Video should continue playing. * Install https://chrome.google.com/extensions/detail/bdnkaenpadjoldiddfdidinjmjeagaji , click browser action. Should still work. * Install a transparent theme such as https://tools.google.com/chrome/intl/cy/themes/theme_at_mecko.html or http://chromium.googlecode.com/issues/attachment?aid=3778755830122130591&name=theme-bug.crx&token=27908ca7e699a023c8446657b24c4696 . Browser window shouldn't become transparent while videos are playing. (This is actually not yet working) Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=57201

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 6

Patch Set 3 : '' #

Patch Set 4 : chaos #

Patch Set 5 : transparent #

Patch Set 6 : '' #

Patch Set 7 : test #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+127 lines, -24 lines) Patch
M chrome/browser/cocoa/chrome_browser_window.h View 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/chrome_browser_window.mm View 1 chunk +18 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/render_widget_host.h View 1 chunk +5 lines, -3 lines 0 comments Download
M chrome/browser/renderer_host/render_widget_host.cc View 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/renderer_host/render_widget_host_view.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/renderer_host/render_widget_host_view_mac.h View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/renderer_host/render_widget_host_view_mac.mm View 1 2 3 4 5 8 chunks +72 lines, -9 lines 6 comments Download
M chrome/browser/renderer_host/test/test_render_view_host.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/renderer_host/test/test_render_view_host.cc View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/chrome_switches.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/chrome_switches.cc View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/common/render_messages_internal.h View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/renderer/render_view.h View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/renderer/render_view.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/renderer/webgles2context_impl.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/renderer/webplugin_delegate_proxy.cc View 4 1 chunk +4 lines, -2 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
Nico
The CL introduces a regression as-is: When a theme with transparent images is installed, the ...
10 years, 4 months ago (2010-08-20 21:57:06 UTC) #1
Nico
Forgot to say: I added a flag which can be used to disable hole-punching, as ...
10 years, 4 months ago (2010-08-20 22:00:33 UTC) #2
stuartmorgan
I don't see anything here that accounts for plugins that are marked as transparent.
10 years, 4 months ago (2010-08-20 23:31:41 UTC) #3
Nico
Transparent plugins depend on plugins being drawn by the compositor, as discussed previously. On Fri, ...
10 years, 4 months ago (2010-08-20 23:33:30 UTC) #4
stuartmorgan
On 2010/08/20 23:33:30, Nico wrote: > Transparent plugins depend on plugins being drawn by the ...
10 years, 4 months ago (2010-08-20 23:45:43 UTC) #5
Nico
On Fri, Aug 20, 2010 at 4:45 PM, <stuartmorgan@chromium.org> wrote: > On 2010/08/20 23:33:30, Nico ...
10 years, 4 months ago (2010-08-20 23:47:03 UTC) #6
Nico
> >> Transparent plugins depend on plugins being drawn by the compositor, > >> as ...
10 years, 4 months ago (2010-08-23 22:34:21 UTC) #7
Nico
After some more consideration, I think we shouldn't add all that "can_draw_transparent" in this CL ...
10 years, 4 months ago (2010-08-24 00:21:54 UTC) #8
stuartmorgan
LGTM http://codereview.chromium.org/3176027/diff/2001/3003 File chrome/browser/renderer_host/render_widget_host_view_mac.mm (right): http://codereview.chromium.org/3176027/diff/2001/3003#newcode138 chrome/browser/renderer_host/render_widget_host_view_mac.mm:138: // Informat protocol implemented by windows that need ...
10 years, 4 months ago (2010-08-24 16:38:42 UTC) #9
stuartmorgan
Sorry, I should have said specifically: Patch Set 2 LGTM I agree that we should ...
10 years, 4 months ago (2010-08-24 17:08:26 UTC) #10
Nico
thanks, committing http://codereview.chromium.org/3176027/diff/2001/3003 File chrome/browser/renderer_host/render_widget_host_view_mac.mm (right): http://codereview.chromium.org/3176027/diff/2001/3003#newcode138 chrome/browser/renderer_host/render_widget_host_view_mac.mm:138: // Informat protocol implemented by windows that ...
10 years, 4 months ago (2010-08-24 17:08:46 UTC) #11
pink (ping after 24hrs)
lgtm http://codereview.chromium.org/3176027/diff/18001/19007 File chrome/browser/renderer_host/render_widget_host_view_mac.mm (right): http://codereview.chromium.org/3176027/diff/18001/19007#newcode140 chrome/browser/renderer_host/render_widget_host_view_mac.mm:140: @protocol UnderlayableSurface If it's a @protocol, then it's ...
10 years, 4 months ago (2010-08-24 17:18:54 UTC) #12
Nico
Filed http://crbug.com/53217 for the themes glitch this introduces http://codereview.chromium.org/3176027/diff/18001/19007 File chrome/browser/renderer_host/render_widget_host_view_mac.mm (right): http://codereview.chromium.org/3176027/diff/18001/19007#newcode140 chrome/browser/renderer_host/render_widget_host_view_mac.mm:140: @protocol ...
10 years, 4 months ago (2010-08-24 17:27:55 UTC) #13
pink (ping after 24hrs)
10 years, 4 months ago (2010-08-24 17:39:57 UTC) #14
> Not really, since nothing implements this protocol. It's just here to
> get rid of the "unknow method -underlaySurfaceAdded, assuming int return
> type and ... parameters" warning.

We generally use @category for this type of thing, since @protocol
really has a meaning like a pure-virtual interface in C++. There's an
expectation that someone is implementing it, not just to make the
compiler happy.

-- 
Mike Pinkerton
Mac Weenie
pinkerton@google.com

Powered by Google App Engine
This is Rietveld 408576698