summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gpu_process_host.h
Commit message (Collapse)AuthorAgeFilesLines
* Revert 61718 - GPU process terminates on hang.mnissler@chromium.org2010-10-071-5/+2
| | | | | | | | | | | | | | | | | | I added a watchdog thread that intermitently checks the main thread can respond to tasks posted on its message queue. I fixed some bugs that preventede GGL from failing when the GPU channel was lost. Added a command line swith to disable the watchdog thread for debugging purposes. TEST=try, check WebGL works, check about:gpuhang terminates process. BUG=38739,53871 Review URL: http://codereview.chromium.org/3528012 TBR=apatrick@chromium.org Review URL: http://codereview.chromium.org/3616011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61782 0039d316-1c4b-4281-b951-d872f2087c98
* GPU process terminates on hang.apatrick@chromium.org2010-10-061-2/+5
| | | | | | | | | | | | | | | I added a watchdog thread that intermitently checks the main thread can respond to tasks posted on its message queue. I fixed some bugs that preventede GGL from failing when the GPU channel was lost. Added a command line swith to disable the watchdog thread for debugging purposes. TEST=try, check WebGL works, check about:gpuhang terminates process. BUG=38739,53871 Review URL: http://codereview.chromium.org/3528012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61718 0039d316-1c4b-4281-b951-d872f2087c98
* Create an X window overlay with static ID for GL contexts.piman@chromium.org2010-10-061-1/+1
| | | | | | | | | | | | | | | | | | This code creates an X window that overlays where tab contents are drawn. The handle associated with this window never changes (unlike the X window associated with a GTK widget that is created and destroyed whenever the widget is realized and unrealized respectively). This is helpful when creating a GL context associated with an X window. Also, having a floating overlay allows us to handle detaching GPU accelerated tabs. This code seems to have uncovered a race condition within the GPU process. When a tab that uses accelerated compositing is detached (e.g. http://webkit.org/blog/386/3d-transforms/), the tab contents often don't get displayed even though the tab is redrawn. A slight delay of about 100ms in the GPU process on the call to glXSwapBuffers (in gl_context_linux.cc) fixes this. To witness that GL can draw to the overlay after delay, try it with a tab with constant animation (e.g. http://webkit.org/blog-files/3d-transforms/poster-circle.html). I've written a bare bones test (about 150 lines of C) of the overlay technique, and it requires no such delay b/w reparenting the glXSwapBuffers. I've also confirmed that there is no synchronization issues w.r.t. the X server between my patch and GL draw commands. I propose filing a new bug for the race, if this patch gets accepted. BUG=53345,56419 TEST=Open two tabs, one with GPU rendered content (http://webkit.org/blog/386/3d-transforms/). Detach the tab with GPU rendered content. GPU process shouldn't crash. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=61561 Review URL: http://codereview.chromium.org/3509004 Patch from Jonathan Backer <backer@google.com>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61695 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 61561 - Create an X window overlay with static ID for GL contexts.dhollowa@chromium.org2010-10-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reverting due to Valgrind issues on Linux tests: http://build.chromium.org/buildbot/memory/builders/Linux%20Tests%20(valgrind)(2)/builds/7671/steps/memory%20test:%20ui/logs/stdio Suppression (error hash=#000000007803F359#): { <insert_a_suppression_name_here> Memcheck:Addr4 fun:_ZN20GtkNativeViewManager9OnDestroyEP10_GtkWidget fun:_ZN62_GLOBAL__N_gfx_gtk_native_view_id_manager.cc_00000000_E72B30A69OnDestroyEP10_GtkObjectPv fun:g_cclosure_marshal_VOID__VOID fun:g_closure_invoke fun:signal_emit_unlocked_R fun:g_signal_emit_valist fun:g_signal_emit fun:gtk_object_dispose fun:gtk_widget_dispose fun:g_object_run_dispose fun:gtk_object_destroy fun:_ZN23RenderWidgetHostViewGtk7DestroyEv fun:_ZN16RenderWidgetHost7DestroyEv fun:_ZN16RenderWidgetHost8ShutdownEv fun:_ZN14RenderViewHost8ShutdownEv fun:_ZN21RenderViewHostManagerD1Ev fun:_ZN11TabContentsD0Ev fun:_ZN13TabStripModel16InternalCloseTabEP11TabContentsib fun:_ZN13TabStripModel17InternalCloseTabsERKSt6vectorIiSaIiEEj fun:_ZN13TabStripModel18CloseTabContentsAtEij fun:_ZN7Browser13CloseContentsEP11TabContents fun:_ZN11TabContents5CloseEP14RenderViewHost } No absolute smoking gun. But seems very likely. -- This code creates an X window that overlays where tab contents are drawn. The handle associated with this window never changes (unlike the X window associated with a GTK widget that is created and destroyed whenever the widget is realized and unrealized respectively). This is helpful when creating a GL context associated with an X window. Also, having a floating overlay allows us to handle detaching GPU accelerated tabs. This code seems to have uncovered a race condition within the GPU process. When a tab that uses accelerated compositing is detached (e.g. http://webkit.org/blog/386/3d-transforms/), the tab contents often don't get displayed even though the tab is redrawn. A slight delay of about 100ms in the GPU process on the call to glXSwapBuffers (in gl_context_linux.cc) fixes this. To witness that GL can draw to the overlay after delay, try it with a tab with constant animation (e.g. http://webkit.org/blog-files/3d-transforms/poster-circle.html). I've written a bare bones test (about 150 lines of C) of the overlay technique, and it requires no such delay b/w reparenting the glXSwapBuffers. I've also confirmed that there is no synchronization issues w.r.t. the X server between my patch and GL draw commands. I propose filing a new bug for the race, if this patch gets accepted. BUG=53345,56419 TEST=Open two tabs, one with GPU rendered content (http://webkit.org/blog/386/3d-transforms/). Detach the tab with GPU rendered content. GPU process shouldn't crash. Review URL: http://codereview.chromium.org/3509004 Patch from Jonathan Backer <backer@google.com>. TBR=piman@chromium.org Review URL: http://codereview.chromium.org/3548015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61589 0039d316-1c4b-4281-b951-d872f2087c98
* Create an X window overlay with static ID for GL contexts.piman@chromium.org2010-10-051-1/+1
| | | | | | | | | | | | | | | | This code creates an X window that overlays where tab contents are drawn. The handle associated with this window never changes (unlike the X window associated with a GTK widget that is created and destroyed whenever the widget is realized and unrealized respectively). This is helpful when creating a GL context associated with an X window. Also, having a floating overlay allows us to handle detaching GPU accelerated tabs. This code seems to have uncovered a race condition within the GPU process. When a tab that uses accelerated compositing is detached (e.g. http://webkit.org/blog/386/3d-transforms/), the tab contents often don't get displayed even though the tab is redrawn. A slight delay of about 100ms in the GPU process on the call to glXSwapBuffers (in gl_context_linux.cc) fixes this. To witness that GL can draw to the overlay after delay, try it with a tab with constant animation (e.g. http://webkit.org/blog-files/3d-transforms/poster-circle.html). I've written a bare bones test (about 150 lines of C) of the overlay technique, and it requires no such delay b/w reparenting the glXSwapBuffers. I've also confirmed that there is no synchronization issues w.r.t. the X server between my patch and GL draw commands. I propose filing a new bug for the race, if this patch gets accepted. BUG=53345,56419 TEST=Open two tabs, one with GPU rendered content (http://webkit.org/blog/386/3d-transforms/). Detach the tab with GPU rendered content. GPU process shouldn't crash. Review URL: http://codereview.chromium.org/3509004 Patch from Jonathan Backer <backer@google.com>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61561 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 60421 - Revert 60373, trying to track down a perf regression (see bug ↵thakis@chromium.org2010-09-241-0/+4
| | | | | | | | | | | | | | | | | 56752)- Add about:gpuhang BUG=None TEST=None Review URL: http://codereview.chromium.org/3447023 TBR=thakis@chromium.org Review URL: http://codereview.chromium.org/3398027 TBR=thakis@chromium.org Review URL: http://codereview.chromium.org/3398028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60430 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 60373, trying to track down a perf regression (see bug 56752)- Add ↵thakis@chromium.org2010-09-241-4/+0
| | | | | | | | | | | | | | about:gpuhang BUG=None TEST=None Review URL: http://codereview.chromium.org/3447023 TBR=thakis@chromium.org Review URL: http://codereview.chromium.org/3398027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60421 0039d316-1c4b-4281-b951-d872f2087c98
* Add about:gpuhangthakis@chromium.org2010-09-231-0/+4
| | | | | | | | | BUG=None TEST=None Review URL: http://codereview.chromium.org/3447023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60373 0039d316-1c4b-4281-b951-d872f2087c98
* Add about:gpucrashthakis@chromium.org2010-09-151-0/+3
| | | | | | | | | BUG=None TEST=open a tab that uses the compositor. Open a second tab, go to about:gpucrash. Verify in the task manager that the gpu process is now gone. Review URL: http://codereview.chromium.org/3424007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59540 0039d316-1c4b-4281-b951-d872f2087c98
* Updating the about:gpu to start a webgl context if one does not exist so ↵rlp@chromium.org2010-09-101-0/+1
| | | | | | | | | | | | | | | | | | that some gpu_info will actually exist. It does this by refreshing the page every 5 seconds until a context does exist, if necessary. We also looked into other methods: - synchronous call to create context, but that will hang if there are issues creating a context - a call back, but that will also hang until we have a gpu context - display no data and rely on the user to refresh which is somewhat unintuitive to the user The method in this CL seemed to be the least annoying method of doing this which didn't cause the browser to hang. BUG=none TEST=visual Review URL: http://codereview.chromium.org/3348007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59141 0039d316-1c4b-4281-b951-d872f2087c98
* Added GPU stat for whether a GPU can report context lost.apatrick@chromium.org2010-09-071-0/+2
| | | | | | | | | | | | | | | On Windows it checks to see if the IDirect3D9 object supports Vista and later features (meaning it won't routinely report lost contexts). On Linux and Mac we can just check if its EGL versus some other GL that doesn't report lost contexts. I routed the stats to the renderer process so webkit code can query whether lost contexts are likely. I didn't wire up breakpad yet. TEST=try BUG=52318 Review URL: http://codereview.chromium.org/3149016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58755 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up unnecessary #includes of base/{scoped_ptr.h,string16.h}.viettrungluu@chromium.org2010-08-191-1/+1
| | | | | | | | | | | | Also fix a bunch of #includes. Folks, scoped_refptr<> is defined in base/ref_counted.h, not in base/scoped_ptr.h. BUG=none TEST=builds Review URL: http://codereview.chromium.org/3132024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56712 0039d316-1c4b-4281-b951-d872f2087c98
* Delete obviously unneeded forward declarations in chrome/browser/*.h.viettrungluu@chromium.org2010-08-051-1/+0
| | | | | | | | | BUG=none TEST=builds Review URL: http://codereview.chromium.org/3080031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55037 0039d316-1c4b-4281-b951-d872f2087c98
* Initial port of accelerated compositor to Mac OS X 10.6. Reusedkbr@google.com2010-08-041-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | infrastructure added for Pepper 3D and Core Animation plugins to render the compositor's output. The implementation allocates a fake "plugin window handle" on the browser side which is the "root" handle, containing the compositor's output, and which, if present, is drawn before any other accelerated plugin instances. Added messages from GPU process to browser process for handling window resizing and presentation of output. Added support to GGL for "view" contexts on Mac OS X, used only for the accelerated compositor, and requiring explicit resize notifications. The remainder of this port will go into the WebKit repository under https://bugs.webkit.org/show_bug.cgi?id=43398 after this for dependency reasons. Tested manually with CSS 3D and WebGL demos. Several stability and correctness issues remain and will be addressed in following CLs; however, the current code works for the majority of basic use cases including switching between accelerated compositing on and off, and scrolling of content. BUG=38969 TEST=none Review URL: http://codereview.chromium.org/3067026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54923 0039d316-1c4b-4281-b951-d872f2087c98
* CommandLine: add a CopySwitchesFrom() and AppendSwitchPath()evan@chromium.org2010-07-291-6/+0
| | | | | | | | | | | These are two common patterns in Chrome code: copying a subset of switches from one CommandLine to another, and appending a FilePath to a CommandLine. This sets me up to do a lot more deprecation in a follow-up change. Review URL: http://codereview.chromium.org/3012021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54218 0039d316-1c4b-4281-b951-d872f2087c98
* `#pragma once` for app, base, chrome, gfx, ipc, net, skia, viewsthakis@chromium.org2010-07-261-0/+1
| | | | | | | | | BUG=50273 TEST=everything still builds, build is 10% faster on windows, same speed on mac/linux TBR: erg git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53716 0039d316-1c4b-4281-b951-d872f2087c98
* Added --use-gl command line flag to select GL implementation.apatrick@chromium.org2010-07-141-1/+0
| | | | | | | | | | | | - Options are desktop, egl and osmesa. - Also added support for bliting an OSMesa bask buffer to a GDK window. TEST=trybots, manual verification that WebGL and Pepper 3D work BUG=45898 Review URL: http://codereview.chromium.org/2825005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52388 0039d316-1c4b-4281-b951-d872f2087c98
* Collecting gpu information when the gpu process creates a channel. Adding ↵rlp@chromium.org2010-07-141-1/+9
| | | | | | | | | | | the gpu_info into the messages sent between gpu process and browser and sending over the browser. Will do something with it in the browser in another CR. BUG=38736 TEST=none Review URL: http://codereview.chromium.org/2857035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52356 0039d316-1c4b-4281-b951-d872f2087c98
* Moved common parts of ChildProcessHost into chrome/common and created a ↵sanjeevr@chromium.org2010-07-031-2/+2
| | | | | | | | | | | BrowserChildProcessHost with browser-specific implementation. This is in preparation of creating a ServiceChildProcessHost. BUG=None TEST=Test for regressions . Review URL: http://codereview.chromium.org/2885017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51593 0039d316-1c4b-4281-b951-d872f2087c98
* linux: add accelerated compositing.piman@chromium.org2010-07-011-0/+4
| | | | | | | | | Similar to Windows, this doesn't handle exposes currently, nor WebGL. Other caveat: tearing off a tab causes trouble to the gpu process. Review URL: http://codereview.chromium.org/2886003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51324 0039d316-1c4b-4281-b951-d872f2087c98
* Reduce header dependencies in chrome/phajdan.jr@chromium.org2010-05-111-0/+5
| | | | | | | | | TEST=if it compiles, it is perfect BUG=none Review URL: http://codereview.chromium.org/2001007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46894 0039d316-1c4b-4281-b951-d872f2087c98
* Split GpuProcessHost into GpuProcessHostUIShim, which runs on the UIkbr@google.com2010-03-301-56/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | thread, and GpuProcessHost, which now runs on the IO thread and derives from ChildProcessHost. This split was necessary in order to service synchronous messages from the renderer process. Moved message handlers for GPU messages from renderer to browser from BrowserRenderProcessHost to ResourceMessageFilter. Stopped sending multiple ViewHostMsg_EstablishGpuChannel messages from the same renderer if the connection was already established. Resetting the channel was causing failures in Send, and every other page reload containing WebGL content to fail. This cleanup will allow further simplification in the GPU process, but this is being left for a subsequent CL. Fixed bug in sandboxing of GPU process. Fixed latent bugs in cleanup code in GpuChannel and GpuChannelHost. Fixed crashes in ChildProcessHost if resource_dispatcher_host_ was NULL. Fixed apparent latent race conditions in creation of BackingStoreProxy and VideoLayerProxy. With these changes, WebGL content is running in the sandbox on both Mac and Windows. Linux support will be added in a following CL. BUG=29120 TEST=ran WebGL demos on Mac and Windows Review URL: http://codereview.chromium.org/1546001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43029 0039d316-1c4b-4281-b951-d872f2087c98
* Added command buffer implementation of WebGL which runs in the sandbox.kbr@google.com2010-03-271-0/+8
| | | | | | | | | | | | | | | | | | | | | | Added synchronous initialization of the channel to the GPU process, needed to obey WebGL startup semantics. There are problems with this on the Windows platform which will be addressed via refactoring in the GpuProcessHost in a subsequent CL. Implemented offscreen rendering code path in GGL / GLES2CmdDecoder for Mac OS X. This new code path is not yet complete for all platforms and is still being stress tested. The previous in-process WebGL implementation is currently used when the sandbox is disabled; it will be removed in a subsequent CL. A one-line code change in WebKit is needed after this CL lands to enable the new code path. BUG=29120 TEST=ran WebGL demos on command buffer implementation on Mac Review URL: http://codereview.chromium.org/1328001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42879 0039d316-1c4b-4281-b951-d872f2087c98
* Calling OpenGL from the renderer processapatrick@chromium.org2010-03-251-9/+3
| | | | | | | | | | | | | | - Added ability for renderer processes to render to a real window (Windows only so far). - Added ability to create offscreen frame buffer objects that can be resized later. - OpenGL context can have a "parent" context that can access its last swapped back buffer through a texture ID. - Moved code to establish GPU channel from RenderWidget to RenderThread. - Changed way service size command buffer object lifetimes are managed. TEST=trybot and visual verification that OpenGL can clear the browser window to magenta. BUG=none Review URL: http://codereview.chromium.org/1136006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42679 0039d316-1c4b-4281-b951-d872f2087c98
* Propagate logging command line switches from browser process to GPU process.scherkus@chromium.org2010-03-081-0/+6
| | | | | | | | | BUG=33329 TEST=try out --log-level=0, you should see log messages Review URL: http://codereview.chromium.org/668195 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40947 0039d316-1c4b-4281-b951-d872f2087c98
* Added support for opening a GPU command buffer from a renderer processes ↵apatrick@chromium.org2010-03-051-1/+38
| | | | | | | | | | | | through a GPU channel. Probably only works in windows only so far. TEST=none BUG=none Review URL: http://codereview.chromium.org/657046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40783 0039d316-1c4b-4281-b951-d872f2087c98
* Create initial GPU backing store in the GPU process for X windows applications.brettw@chromium.org2010-01-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This gets the window from the RenderWidgetHostViewGtk and just does OpenGL calls directly into it. There are a lot of bugs, especially around expose events, which aren't really processed at all, and also tab teardown and reparenting. The new backing store defaults to off. This does some refactoring of the existing Windows GPU process backing store implementation to make some of it sharable by this Linux verion. This removes some previously defunct in-process GL backing store code and moves it to the GPU process. This patch does some refactoring around how child processes are created using zygoes or not. I found there were many places where a command line would be checked with special logic to know whether to enable zygote code or not. I tried to unify this so it could be computed once for each process type. This is what most of the changed files in chrome/browser are related to. BUG=none TEST=none Review URL: http://codereview.chromium.org/548112 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37088 0039d316-1c4b-4281-b951-d872f2087c98
* Add the ability for the GPU process to be used to paint the backing store of abrettw@chromium.org2010-01-131-0/+73
tab. This is the first pass and is currently a bit buggy and incomplete. This patch refactors the backing store to make it a virtual interface which is then implemented by the platform-specific backing stores. This cleans up the multi-platform aspects of the old code, and also makes it possible to create different backing stores (such as ones in another process). This renames the BackingStore::PaintRect function to PaintToBackingStore which clears up what it does. I would often get confused and think that it paints the backing store to the screen. This makes a common way to capture backing store information and adds it to the backing store API. This removed a bunch of ugly ifdefs. This adds the ability for a backing store to specify that the TransportDIB should not be freed by RenderWidgetHost when painting is complete. This is necessary since the out-of-process version needs to use it after the RenderWidget paint function has returned. This pushes up the vector of copy_rect from RenderWidgetHost to the actual BackingStores. This prevents us from sending duplicate data over IPC. It also makes the common non-IPC case more efficient, since we end up setting up various surfaces only once when there are multiple update rects. BUG=none TEST=none Review URL: http://codereview.chromium.org/523028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36075 0039d316-1c4b-4281-b951-d872f2087c98