diff options
author | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-21 23:22:04 +0000 |
---|---|---|
committer | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-21 23:22:04 +0000 |
commit | 7a31f7c62d9998d28e79bb86f3805f3fe64205f0 (patch) | |
tree | 3faa940b7b51357549fceaf666f26606ced0cff9 /content/content_gpu.gypi | |
parent | 53c607c59c37f81db4611d0fdd42b0f2d8869e86 (diff) | |
download | chromium_src-7a31f7c62d9998d28e79bb86f3805f3fe64205f0.zip chromium_src-7a31f7c62d9998d28e79bb86f3805f3fe64205f0.tar.gz chromium_src-7a31f7c62d9998d28e79bb86f3805f3fe64205f0.tar.bz2 |
This is a thread that runs in the browser process that can issue GL calls without going via a command buffer. It is for rendering the browser's chrome, basic compositing, etc. It is not for rendering arbitrary content from, for example, WebGL.
It is only enabled with --single-process or --in-process-gpu, the latter only running the GPU "process" as a thread inside the browser process.
Eventually, the plan is to add strict validation to ensure it can only run basic white-listed shaders and other restrictions so that the browser's GPU thread can be made available to the renderers' compositors without a command line switch.
I split GpuThread into two new classes. GpuChildThread derives from ChildThread and contains stuff that should only happen in a standalone process. I included GPUInfo collection here because if the browser should never need to run that.
GpuRenderThread contains stuff that is also needed in the browser process.
The GPU thread does not use an IPC channel within the browser process. It still uses IPC messages but posts them directly between message loops.
I changed the EstablishGpuChannel messages between the browser and GPU process to not deal with returning the GPUInfo. Now the GPU process just sends it as the first thing it does after handling its Init message. This was to allow the separation of GPUInfo collection (in GpuChildThread) and channel establishment (in GpuRenderThread).
TEST=trybots, run webgl with no switches, --single-process and --in-process-gpu, check browser terminates cleanly in all cases.
BUG=none
Review URL: http://codereview.chromium.org/6677055
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78945 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/content_gpu.gypi')
-rw-r--r-- | content/content_gpu.gypi | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/content/content_gpu.gypi b/content/content_gpu.gypi index 682eb51..24bafe3 100644 --- a/content/content_gpu.gypi +++ b/content/content_gpu.gypi @@ -34,8 +34,10 @@ 'gpu/gpu_main.cc', 'gpu/gpu_process.cc', 'gpu/gpu_process.h', - 'gpu/gpu_thread.cc', - 'gpu/gpu_thread.h', + 'gpu/gpu_child_thread.cc', + 'gpu/gpu_child_thread.h', + 'gpu/gpu_render_thread.cc', + 'gpu/gpu_render_thread.h', 'gpu/gpu_video_decoder.cc', 'gpu/gpu_video_decoder.h', 'gpu/gpu_video_service.cc', |