0
Commit Graph

47 Commits

Author SHA1 Message Date
Clark DuVall
80eecb39c5 Add feature to use the main IO thread for in-process GPU child IO thread
I'm looking at reducing the number of threads created in WebView where
the in-process GPU is used.

Bug: 341151462
Change-Id: I93e09fc2c7fb3f2911d72aac7c5a088b1b35087a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5545171
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: Clark DuVall <cduvall@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1303884}
2024-05-21 17:52:01 +00:00
Avi Drissman
4e1b7bc33d Update copyright headers in content/
The methodology used to generate this CL is documented in
https://crbug.com/1098010#c34.

No-Try: true
No-Presubmit: true
Bug: 1098010
Change-Id: I8c0f009d16350271f07d8e5e561085822cc9dd27
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3895935
Owners-Override: Avi Drissman <avi@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1047456}
2022-09-15 14:03:50 +00:00
Ian Barkley-Yeung
48418c11fc ChromeOS: Start stack sampler after sandboxing on gpu-process
On ChromeOS, the gpu-process will AssertSingleThreaded() during
sandboxing. Therefore, we can't start the stack sampler (which creates a
thread) until after sandboxing.

BUG=b:214117401,chromium:1324337

Change-Id: Icfee509869f2bda9d2fe124a3146e8d98ef84708
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3764862
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Ian Barkley-Yeung <iby@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Mike Wittman <wittman@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1035308}
2022-08-16 01:10:16 +00:00
Sean Maher
f36d812785 Change base::Time to base::TimeTicks in GPU initialization start_time
Use base::TimeTicks instead of base::Time to be more accurate due to monotonicity.

Bug: 1350257
Change-Id: I0c3820cb936465237a7d66cbe8e974c1b494bc0d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3812398
Reviewed-by: Etienne Bergeron <etienneb@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Commit-Queue: Sean Maher <spvw@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1031745}
2022-08-05 02:33:35 +00:00
Ali Hijazi
1b1fb43bfa DanglingPtr: fix dangling ptr in InProcessGpuThread
Store gpu_process_ in a unique_ptr since it's owned by the class.

Bug: 1291138
Change-Id: Icc57fc77297c1c81c49e0d888871d75057054934
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3797214
Commit-Queue: Ali Hijazi <ahijazi@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1030983}
2022-08-03 10:45:37 +00:00
Zhibo Wang
d9e4a00a85 Create base::ThreadType to replace base::ThreadPriority
This is a no-op migration from base::ThreadPriority to base::ThreadType.
Except for the name changes of enum classes and functions, their
behavior should be kept unchanged. By using the new ThreadType API, the
caller declare the type of work a thread runs, and let the platform
implementation decide its behavior. Apart from the current priority
setting, the QoS API will further be used on some platforms.

Mappings in existing callers are as follows:
  ThreadPriority::BACKGROUND => ThreadType::kBackground
  ThreadPriority::NORMAL => ThreadType::kDefault
  ThreadPriority::DISPLAY for compositing only on select
                          platforms (WIN, ANDROID, CrOS)
                   => ThreadType::kCompositing
  ThreadPriority::DISPLAY unconditionally on *all* platforms
                   => ThreadType::kDisplayCritical
  ThreadPriority::REALTIME_AUDIO => ThreadType::kRealtimeAudio

As this CL aims to make all platform-specific decisions in the
platform_thread_<platform>.cc impls, ifdef exceptions on main threads
(like on Mac) have moved to their respective impls.

The resulting callers should thus have no ifdefs left except for the odd
exception with a TODO we aim to unravel after this no-op CL.

ifdefs for render_message_filter()->SetThreadType() stay for now as this
call is already platform specific.

Bug: 1278628, 1324809
Change-Id: I36fbc4fc988c12e712da2e131595255a7b4fe4b7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3329026
Reviewed-by: Wez <wez@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Commit-Queue: Zhibo Wang <zhibo1.wang@intel.com>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: Olga Sharonova <olka@chromium.org>
Reviewed-by: Bo Liu <boliu@chromium.org>
Reviewed-by: Peng Huang <penghuang@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: Markus Handell <handellm@google.com>
Reviewed-by: Sergey Volk <servolk@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Etienne Pierre-Doray <etiennep@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1021517}
2022-07-07 04:34:59 +00:00
Joe Mason
94bebf1504 Always create ThreadPool before calling PostEarlyInitialization
This patch creates ThreadPool earlier, so that it's guaranteed to exist
before creating field trials. Now both field trials and the ThreadPool
always exist in PostFieldTrialInitialization.

A followup patch will use this entry point to start the heap profiler
in child processes.

Bug: 1327069
Change-Id: I2258fb77f06557460e342144e1c76de13985a4c4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3654912
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Joe Mason <joenotcharles@google.com>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: Greg Thompson <grt@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1010574}
2022-06-03 15:03:53 +00:00
John Abd-El-Malek
0a1fa3181d Remove code for experimenting with running on big cores.
Bug: 1257237
Change-Id: I48c61f70401f8e8c1181cf985f15fe97b43eac4e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3658209
Reviewed-by: Eric Seckler <eseckler@chromium.org>
Auto-Submit: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Nate Fischer <ntfschr@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1007076}
2022-05-24 21:44:46 +00:00
Xiaohan Wang
62737b5015 content/gpu: Use BUILDFLAG for OS checking
Use BUILDFLAG(IS_XXX) instead of defined(OS_XXX).

Generated by `os_buildflag_migration.py` (https://crrev.com/c/3311983).

R=thakis@chromium.org

Bug: 1234043
Test: No functionality change
Change-Id: I0d41c7ac2c83c21206763cee67ce7cb4008b66fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3391492
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Owners-Override: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#959627}
2022-01-15 18:09:02 +00:00
John Abd-El-Malek
7d7b8e3066 Set CPU affinity every 15s if it's specified for a thread.
If the browser goes to background and back this will be reset. This cl doesn't yet handle setting the affinity to default value when the browser or renderer is in the background.

Bug: 1257237
Change-Id: I5cbdf4f6518d8d73acfe0aa3fcc1125b7428201b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3230003
Auto-Submit: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Clark DuVall <cduvall@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/main@{#932761}
2021-10-19 00:11:17 +00:00
John Abd-El-Malek
2ded1eb656 Initial code for experimenting with running some threads on big cores.
Finch will be used to determine which threads run on big or bigger
cores. There's no logic yet to do this for just foreground renderers or
apps; the intent is to first gather data on what is the biggest
performance benefit this could yield along with the corresponding
worst-case power drain. The other purpose is to see how the numbers from
the field compare to what we see on Pinpoint.

Bug: 1257237

Change-Id: I5ddf996c8a4797c7787549a405c4c91e65e705c0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3216304
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Eric Seckler <eseckler@chromium.org>
Cr-Commit-Position: refs/heads/main@{#931674}
2021-10-14 20:06:41 +00:00
Simeon Kuran
372454c80c Small Fix: intialize vaapi when using in-process-gpu.
Before using the libva, it must be initialized.
However, when chromium is started with --in-process-gpu,
the initialization call was missing and hence, the hardware acceleration
did not work.

This bugfix adds the missing initialization call.

Bug: 1032038
Change-Id: Id0635827aa0154330e3a0b85ab16faa215ede757
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1953730
Commit-Queue: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Miguel Casas <mcasas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#723909}
2019-12-11 19:02:17 +00:00
Jonathan Backer
0af509966a Move gpu_preferences to gpu/config/
GpuPreferences is a service side configuration structure. I'm moving it
to ungate future work (https://crrev.com/c/858157) where we probe
some of the GpuPreferences while we probe GPUInfo.

I moved two constants into GpuPreferences to avoid a dependency cycle.

TBR=boliu@chromium.org,piman@chromium.org,tsepez@chromium.org,liberato@chromium.org,joedow@chromium.org

Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I34b4d17e523f63c355dea48ec5fcc2d866f19059
Bug: 786591
Reviewed-on: https://chromium-review.googlesource.com/1075668
Reviewed-by: Bo <boliu@chromium.org>
Reviewed-by: Frank Liberato <liberato@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Commit-Queue: Jonathan Backer <backer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#562855}
2018-05-30 16:05:07 +00:00
Zhenyao Mo
e23f752678 Always collect GPUInfo on Android in GPU process/thread.
BUG=744658
TEST=bots
R=piman@chromium.org,boliu@chromium.org

Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: Icb4f88dbbdca34541d3921b57574a9d843326254
Reviewed-on: https://chromium-review.googlesource.com/905791
Reviewed-by: Bo <boliu@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Zhenyao Mo <zmo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534881}
2018-02-07 02:15:00 +00:00
Ivan Kotenkov
2c0d2bb3fe Convert 0 to nullptr in content using clang-tidy.
Bug: 778942
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
Change-Id: Iee6be84c23149c745b3afd6e6158764f92ccd17f
Reviewed-on: https://chromium-review.googlesource.com/732305
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Ivan Kotenkov <kotenkov@yandex-team.ru>
Cr-Commit-Position: refs/heads/master@{#513138}
2017-11-01 15:41:28 +00:00
Zhenyao Mo
83b895e913 Wire GpuPreferences from commandline switch instead of from first IPC.
BUG=774157
TEST=bots
R=piman@chromium.org,dcheng@chromium.org,sadrul@chromium.org

Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I826dc154b4fb12fbd5642a4b14c085d66e8b507e
Reviewed-on: https://chromium-review.googlesource.com/723847
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Zhenyao Mo <zmo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#509822}
2017-10-18 18:50:54 +00:00
Sadrul Habib Chowdhury
db9021eea2 gpu: Use GpuInit for in-process gpu.
gpu::GpuInit is used in the gpu process to initialize gpu related. Do
the same when gpu is initialized in the host process.

Instead of having InProcessGpuThread and content::GpuMain separately
owning their own GpuInit, move the ownership to GpuChildThread.

BUG=730213

Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: Ic2964da3d4cd8a39a59d5b69ce74024a1685f88a
Reviewed-on: https://chromium-review.googlesource.com/695908
Commit-Queue: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#505936}
2017-10-03 03:07:57 +00:00
Zhenyao Mo
4e8e9b9a16 Remove GPU driver bug workarounds computing in browser process
BUG=744658
TEST=gpu bots
R=piman@chromium.org,boliu@chromium.org
NOTRY=true

Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I9d65de39279717f632184abc69d4c1759d80105d
Reviewed-on: https://chromium-review.googlesource.com/644492
Commit-Queue: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#499073}
2017-08-31 23:53:24 +00:00
Zhenyao Mo
10aee7a973 Remove kGpuDriverBugWorkarounds commandline switch.
It was used to pass workarounds from browser process to GPU process, which is
no longer necessary.

Also, this CL wires up platform specific (GLX, EGL, WGL) disabled extensions
for in-process-gpu mode.

BUG=744658
TEST=gpu bots
R=kbr@chromium.org

Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: Ic5d40229f8b6e5a65332b97449aee5ecfa7cd716
Reviewed-on: https://chromium-review.googlesource.com/641981
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Zhenyao Mo <zmo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#498511}
2017-08-30 17:11:34 +00:00
Zhenyao Mo
db2790b452 Make sure Android GPU threads only collect GPU info and make decisions once.
That includes Chrome and WebView.

Note that we still do that on browser side. That will be removed soon once
we also move GPU blacklisting to GPU side.

BUG=744658
TEST=bots,manual with WebiewInstrumentation
R=piman@chromium.org,boliu@chromium.org

Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I007c201ad4806dec35df9872132c4e5cd57bf20d
Reviewed-on: https://chromium-review.googlesource.com/641975
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Commit-Queue: Zhenyao Mo <zmo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#498295}
2017-08-30 00:10:15 +00:00
Thoren Paulson
6dcf39e8e0 Honor "--skip-gpu-data-loading" in single process.
This flag prevents the collection of gpu info on the multi-process path,
but not on the in-process path. This change makes the in-process path
consistent with the multi-process path.

This is needed by Cast for Android Things, which doesn't always have an
implementation of EGL, so crashes when loading gpu info.

Bug: None
Test: CQ
Change-Id: Ic700fe28c4c3b5af10cf860e76f43facba25d86d
Reviewed-on: https://chromium-review.googlesource.com/596329
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Thoren Paulson <thoren@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491400}
2017-08-02 16:33:29 +00:00
sadrul
6d41b82585 gpu: Have GpuService create and own GpuMemoryBufferFactory.
Move GpuMemoryBufferFactory ownership into GpuService. Some additional
cleanups:
. Update GpuMemoryBufferFactory::CreateNativeType() to return nullptr
  when native buffers are not supported, instead of the callers having to
  explicitly check first (using GetNativeGpuMemoryBufferType()).
. InProcessGpuThread::gpu_preferences_ is never used. So remove.
. Some now unnecessary #includes.

BUG=none
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2781293003
Cr-Commit-Position: refs/heads/master@{#461337}
2017-04-02 03:38:50 +00:00
kylechar
002b2ee07c Move Ozone GPU initialization.
Right now OzonePlatform::InitializeForGPU() gets called as part of
gl::init::GetAllowedGLImplementations(). We need to properly set
InitParams when initializing the Ozone GPU so the platform knows if it
should expect to be running in a single process.

Instead, have the GpuInit or tests call InitializeForGPU(). This way
GpuInit can set InitParams::single_process to false and tests can set
InitParams::single_process to true.

Since this CL updates all callers of OzonePlatform::InitializeForGPU()
to use the new version, we can also delete the deprecated version of the
function.

BUG=700142,620934
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2749873002
Cr-Commit-Position: refs/heads/master@{#457266}
2017-03-15 23:50:12 +00:00
ericrk
41a1579e25 Move GPU raster decision making to GPU proc
This change moves decision making about whether to use GPU raster
from the browser process to the GPU process. This allows the
decision to be made based on more detailed GPU information, which
is not available to the browser. The new decision making process
is as follows:

The GPU process loads the GPU blacklist at startup, using more
complete GPUInfo than is available to the browser. This data is
combined with flags (forwarded from the browser) to
generate a GpuFeatureInfo struct which contains enabled/
blacklisted/disabled values for each GPU feature (currently
only populated for GPU raster).

The GPU process notifies the browser of its decision
by passing the GpuFeatureInfo via GpuHostMessage_Initialized.
The browser uses this info solely to populate about:gpu.

The GPU process notifies the renderer process of its decision
via context capabilities. The renderer uses this info to make
decisions on how to rasterize.

In the Render process, we now recieve GPU raster information
at a later point (when we create our CompositorFrameSink), so
we can't store this info in LayerTreeSettings. This requires
a bit of refactoring to have tests use context Capabilities
rather than LayerTreeSettings to provide this information.

BUG=648493
R=zmo@chromium.org
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2654993004
Cr-Commit-Position: refs/heads/master@{#449729}
2017-02-10 20:56:28 +00:00
thomasanderson
62ba78ffcd X11: Use a better visual for OpenGL
This CL delegates picking a transparent visual to the GPU
process.  Previously, the browser process did not have enough
information to decide which visual to use because it couldn't get
GL-specific visual information directly.  On Nvidia drivers,
picking the wrong transparent visual made the browser unusable.

Main changes introduced:
* Remove command line arguments window-depth, x11-visual-id, and
  disable_transparent_visuals.
* Remove driver bug DISABLE_TRANSPARENT_VISUALS
* GPU process picks an ARGB visual and a system visual (which may
  be different from the default visual) and sends it back in GPUInfo

BUG=347333,369209,640170,640170
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2347383002
Cr-Commit-Position: refs/heads/master@{#422274}
2016-10-01 02:06:18 +00:00
sadrul
3f8d0fabf3 gpu: Remove unused GpuChildThread::gpu_preferences_.
GpuChildThread itself never uses |gpu_preferences_|. However,
GpuChannelManager holds a reference to it. So remove it from
GpuChildThread, and have GpuChannelManager, which actually uses
it, own it instead.

BUG=none
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2322893002
Cr-Commit-Position: refs/heads/master@{#417331}
2016-09-08 17:49:43 +00:00
boliu
1384d6d1c0 Remove content/gpu from content/browser/android/DEPS
Synchronous compositor used this include to insert its own
SyncPointManager instance to be used by the in-process GPU thread.

Remove that DEPS and add ContentGpuClient::GetSyncPointManager so that
GPU code can directly get a SyncPointManager from content embedder. This
works for out of process GPU as well.

This also removes the InProcessCommandBuffer dependency from Android.

Review URL: https://codereview.chromium.org/1908223002

Cr-Commit-Position: refs/heads/master@{#389046}
2016-04-22 06:42:12 +00:00
markdittmer
d88b8358c7 Refactor content/common/gpu into gpu/ipc/service. This is a part of a larger refactor for Mus (see label:gpurefactor).
BUG=586385
CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel

Committed: https://crrev.com/721be995e023023793e547c28e0f6f7843bdbd99
Cr-Commit-Position: refs/heads/master@{#384705}

Review URL: https://codereview.chromium.org/1845563005

Cr-Commit-Position: refs/heads/master@{#386084}
2016-04-08 15:30:08 +00:00
lukasza
9a90e8abe1 Revert of Refactor content/common/gpu into gpu/ipc/service (patchset id:280001 of https://codereview.chromium.org/1845563005/ )
Reason for revert:
Speculating that this CL might be responsible for closing the tree broken here: https://build.chromium.org/p/chromium/builders/Win/builds/41941

Original issue's description:
> Refactor content/common/gpu into gpu/ipc/service. This is a part of a larger refactor for Mus (see label:gpurefactor).
>
> BUG=586385
> CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel
>
> Committed: https://crrev.com/721be995e023023793e547c28e0f6f7843bdbd99
> Cr-Commit-Position: refs/heads/master@{#384705}

TBR=sadrul@chromium.org,ccameron@chromium.org,rjkroege@chromium.org,bsalomon@google.com,dpranke@chromium.org,piman@chromium.org,markdittmer@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=586385

Review URL: https://codereview.chromium.org/1846253003

Cr-Commit-Position: refs/heads/master@{#384715}
2016-04-01 23:07:57 +00:00
markdittmer
721be995e0 Refactor content/common/gpu into gpu/ipc/service. This is a part of a larger refactor for Mus (see label:gpurefactor).
BUG=586385
CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel

Review URL: https://codereview.chromium.org/1845563005

Cr-Commit-Position: refs/heads/master@{#384705}
2016-04-01 22:21:36 +00:00
fsamuel
c27742238e Pull gpu service/client shared memory buffer code to GpuMemoryBufferSupport
GpuMemoryBufferFactory is a gpu service concept and should
not be accessed from the client.

Client code accessed GpuMemoryBufferFactory to get the
native GPU buffer type and to check whether a provided
buffer is supported. Depending on GpuMemoryBufferFactory
ends up pulling in other service-only bits.

This CL addresses this issue. The two static methods
accessed by clients are pulled into a new class:
GpuMemoryBufferSupport placed in gpu/ipc/common.

BUG=597170
CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel

Review URL: https://codereview.chromium.org/1831513003

Cr-Commit-Position: refs/heads/master@{#382987}
2016-03-24 00:28:29 +00:00
penghuang
2084d99587 Get rid of gpu related switches by passing gpu::GpuPreferences via IPC.
BUG=590825
CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel

Committed: https://crrev.com/248b114c9d3034964c7259222712dfcccfad8f48
Cr-Commit-Position: refs/heads/master@{#379651}

Review URL: https://codereview.chromium.org/1753383003

Cr-Commit-Position: refs/heads/master@{#380320}
2016-03-10 03:34:55 +00:00
simonhatch
7a1173688c Revert of Get rid of gpu related switches by passing gpu::GpuPreferences via IPC. (patchset id:140001 of https://codereview.chromium.org/1753383003/ )
Reason for revert:
Suspecting this is breaking a lot of perf bots.

BUG=593045

Original issue's description:
> Get rid of gpu related switches by passing gpu::GpuPreferences via IPC.
>
> BUG=590825
> CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel
>
> Committed: https://crrev.com/248b114c9d3034964c7259222712dfcccfad8f48
> Cr-Commit-Position: refs/heads/master@{#379651}

TBR=piman@chromium.org,boliu@chromium.org,palmer@chromium.org,penghuang@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=590825

Review URL: https://codereview.chromium.org/1778693002

Cr-Commit-Position: refs/heads/master@{#379993}
2016-03-09 00:31:01 +00:00
penghuang
248b114c9d Get rid of gpu related switches by passing gpu::GpuPreferences via IPC.
BUG=590825
CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel

Review URL: https://codereview.chromium.org/1753383003

Cr-Commit-Position: refs/heads/master@{#379651}
2016-03-07 21:52:11 +00:00
penghuang
7404df9885 Use GpuPreferences to avoid directly accessing switches in gpu related code
BUG=586369
CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel

Review URL: https://codereview.chromium.org/1716813002

Cr-Commit-Position: refs/heads/master@{#378305}
2016-02-29 23:09:00 +00:00
reveman
7caf8cf651 content: Increase thread priority for display critical IO threads on ChromeOS.
Up the priority of the browser and GPU process IO threads as some of its
IPCs relate to display tasks. This is consistent with Android except in
the case of ChromeOS we avoid increasing the priority of all IO threads.

BUG=internal b/26877099

Review URL: https://codereview.chromium.org/1690173004

Cr-Commit-Position: refs/heads/master@{#375506}
2016-02-16 02:40:13 +00:00
avi
66a07725bc Switch to standard integer types in content/.
BUG=138542
TBR=jam@chromium.org

Review URL: https://codereview.chromium.org/1544273002

Cr-Commit-Position: refs/heads/master@{#366875}
2015-12-25 23:39:25 +00:00
hush
5380add908 Assign thread name to in_proc renderer and gpu thread.
This would be very helpful for analyzing traces.txt of ANR logs.

BUG=570819

Review URL: https://codereview.chromium.org/1518213002

Cr-Commit-Position: refs/heads/master@{#365953}
2015-12-18 00:42:37 +00:00
xhwang
9c8e128c41 Support mojo applications in GPU process.
BUG=521755
TEST=Manually tested MojoMediaApplication in GPU process and GPU thread in the browser process (--in-process-gpu).

Review URL: https://codereview.chromium.org/1297953004

Cr-Commit-Position: refs/heads/master@{#353453}
2015-10-10 01:55:21 +00:00
reveman
fb8c8e10d2 content: Use type-parameterized tests for GpuMemoryBuffer implementations.
This makes it easier to add type specific tests and cleans up a lot
of code as a factory implementation is not longer needed for
shared memory.

BUG=538325

Review URL: https://codereview.chromium.org/1389133002

Cr-Commit-Position: refs/heads/master@{#352930}
2015-10-07 20:27:47 +00:00
boliu
c5befe7d0b Share SyncPointManager between ipc and in-process
Allow SyncPointManager instance to be set, and set the same
instance in Android WebView. Also remove ref-counting and just
guarantee SyncPointManager outlives running message loop.

Also make SyncPointManager thread safe, and callbacks are no longer
guaranteed to happen on the same thread. Make sure command buffer
implementations handle it correctly.

BUG=509702

Review URL: https://codereview.chromium.org/1231263003

Cr-Commit-Position: refs/heads/master@{#339712}
2015-07-21 19:09:26 +00:00
grt
8c64842afa Revert of Revert of content: Fix single process support for native GpuMemoryBuffers. (patchset id:1 of https://codereview.chromium.org/1210073003/)
Reason for revert:
Reverting the revert since this wasn't the problem after all.

Original issue's description:
> Revert of content: Fix single process support for native GpuMemoryBuffers. (patchset  id:1 of https://codereview.chromium.org/1221473003/)
>
> Reason for revert:
> XP_tests started failing with "missing shard" exceptions. Suspect this cl.
>
> https://build.chromium.org/p/chromium.win/builders/XP%20Tests%20%281%29/builds/38438
>
> Original issue's description:
> > content: Fix single process support for native GpuMemoryBuffers.
> >
> > Also add the startup message filter for CreateGpuMemoryBuffer
> > messages in single process mode.
> >
> > BUG=497559,504121
> >
> > Committed: https://crrev.com/29ec87df6cef29b9f28dd21d385f16ce99df9ce3
> > Cr-Commit-Position: refs/heads/master@{#336495}
>
> TBR=piman@chromium.org,reveman@chromium.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=497559,504121
>
> Committed: https://crrev.com/1cf221f6cebc8850220100c24d00a18ad54bfe8d
> Cr-Commit-Position: refs/heads/master@{#336531}

TBR=piman@chromium.org,reveman@chromium.org,kcarattini@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=497559,504121

Review URL: https://codereview.chromium.org/1218783003

Cr-Commit-Position: refs/heads/master@{#336593}
2015-06-29 18:18:30 +00:00
kcarattini
1cf221f6ce Revert of content: Fix single process support for native GpuMemoryBuffers. (patchset id:1 of https://codereview.chromium.org/1221473003/)
Reason for revert:
XP_tests started failing with "missing shard" exceptions. Suspect this cl.

https://build.chromium.org/p/chromium.win/builders/XP%20Tests%20%281%29/builds/38438

Original issue's description:
> content: Fix single process support for native GpuMemoryBuffers.
>
> Also add the startup message filter for CreateGpuMemoryBuffer
> messages in single process mode.
>
> BUG=497559,504121
>
> Committed: https://crrev.com/29ec87df6cef29b9f28dd21d385f16ce99df9ce3
> Cr-Commit-Position: refs/heads/master@{#336495}

TBR=piman@chromium.org,reveman@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=497559,504121

Review URL: https://codereview.chromium.org/1210073003

Cr-Commit-Position: refs/heads/master@{#336531}
2015-06-29 05:46:16 +00:00
reveman
29ec87df6c content: Fix single process support for native GpuMemoryBuffers.
Also add the startup message filter for CreateGpuMemoryBuffer
messages in single process mode.

BUG=497559,504121

Review URL: https://codereview.chromium.org/1221473003

Cr-Commit-Position: refs/heads/master@{#336495}
2015-06-27 13:48:56 +00:00
morrita
c6238ab6b4 Get rid of ChannelInit::SetSingleProcessIOTaskRunner()
The globally-set TaskRunner doesn't work because some child
thread can run inside the browser process even when other
child threads run in their own processes.
For example, there is a configuration where GpuChildThread
being in-process while RenderThreadImpl isn't.

It is troublesome once non-renderer child processes adopt
ChannelMojo.

This CL eliminates the global in-process IO task runner
and instead, passes an IO runnner for each thread
if it is configured as an in-process mode.

Note that InProcessChildThreadParams object is introuced to
clarify that the parameter is for in-process mode.

This is a spin-off from https://codereview.chromium.org/960693003/.

R=jamesr@chromium.org, rockot@chromium.org, jam@chromium.org
BUG=377980

Review URL: https://codereview.chromium.org/987693005

Cr-Commit-Position: refs/heads/master@{#321047}
2015-03-18 01:49:26 +00:00
starodub@google.com
242f6cf2e5 Fixed DCHECK in InProcessGpuThread shutdown.
Upon BrowserMainRunner::Shutdown(), InProcessGpuThread sometimes (race condition)
terminates simply by exiting the message loop due to closed RPC channel, the
ThreadWasQuitProperly flag is required to signal correct termnation in this
case.

BUG=

Review URL: https://codereview.chromium.org/323513003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275848 0039d316-1c4b-4281-b951-d872f2087c98
2014-06-09 20:24:58 +00:00
scottmg@chromium.org
8707caab1c Fix names of in-process threads, tidy gpu DEPS
Follow-up after http://crrev.com/217968 per comments on
https://chromiumcodereview.appspot.com/23235002/

R=jam@chromium.org
BUG=237249

Review URL: https://chromiumcodereview.appspot.com/23452016

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221199 0039d316-1c4b-4281-b951-d872f2087c98
2013-09-04 16:41:30 +00:00