0
Commit Graph

30 Commits

Author SHA1 Message Date
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
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
Arthur Sonzogni
4c9cdacbe6 DanglingPtr: Mark all of them as untriaged [1/N]
This patch must be a no-op with all the common build flags.

Add the "DanglingUntriaged" raw_ptr annotation. It indicates a
raw_ptr becomes dangling, and it should be triaged/fixed.

This annotates the one firing during content_browsertests.
Multiple follow-up will complete the list, up until being able to
enable dangling pointer detection on a bot.

Stats:
- 175 DanglingUntriaged in code
- 69 DanglingUntriaged in tests

Bug=1291138

Change-Id: I00771bd46403f90297aa5b972fdd1ddc23b18e07
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3687960
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Bartek Nowierski <bartekn@chromium.org>
Owners-Override: Bartek Nowierski <bartekn@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1013525}
2022-06-13 17:22:56 +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
Keishi Hattori
0e45c020c4 Rewrite most Foo* field_ pointer fields to raw_ptr<Foo> field_.
DO NOT REVERT (unless absolutely necessary)! Report build breaks to keishi@(APAC)/glazunov@(EMEA)/sebmarchand@(NA) as soon as you see them. Fixes are expected to be trivial.

This commit was generated automatically, by running the following script: tools/clang/rewrite_raw_ptr_fields/rewrite-multiple-platforms.sh on commit fe74bc434e

For more information, see MiraclePtr One Pager [1], the PSA at chromium-dev@ [2], and the raw_ptr documentation in //base/memory/raw_ptr.md.

FYI This CL does not enable MiraclePtr protection and we expect no behavior change from this.

[1] https://docs.google.com/document/d/1pnnOAIz_DMWDI4oIOFoMAqLnf_MZ2GsrJNb_dbQ3ZBg/edit?usp=sharing
[2] https://groups.google.com/a/chromium.org/g/chromium-dev/c/vAEeVifyf78/m/SkBUc6PhBAAJ

Binary-Size: Increase of around 500kb was approved for MiraclePtr
Include-Ci-Only-Tests: true
No-Tree-Checks: true
No-Presubmit: true
Bug: 1272324, 1073933
Change-Id: I05c86a83bbb4b3f4b017f361dd7f4e7437697f69
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3305132
Commit-Queue: Keishi Hattori <keishi@chromium.org>
Reviewed-by: Bartek Nowierski <bartekn@chromium.org>
Owners-Override: Bartek Nowierski <bartekn@chromium.org>
Cr-Commit-Position: refs/heads/main@{#945735}
2021-11-27 09:25:52 +00:00
Peter Boström
1d6a095400 Remove unused "base/macros.h" in content/
Removes `#include "base/macros.h"` from files in content/ that do not
contain `ignore_result(`.

Bug: 1010217
No-Try: true
Change-Id: I887403408704241047e3bd66e953ff7df195368b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3274993
Commit-Queue: Peter Boström <pbos@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Owners-Override: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#940781}
2021-11-11 16:07:03 +00:00
Peter Boström
828b902994 Replace DISALLOW_COPY_AND_ASSIGN in content/
This replaces DISALLOW_COPY_AND_ASSIGN with explicit constructor deletes
where a local script is able to detect its insertion place (~Foo() is
public => insert before this line).

This is incomplete as not all classes have a public ~Foo() declared, so
not all DISALLOW_COPY_AND_ASSIGN occurrences are replaced.

IWYU cleanup is left as a separate pass that is easier when these macros
go away.

Bug: 1010217
Change-Id: Iea478401b7580682c7b9f195f7af9cbbdb6ce315
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3167292
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Peter Boström <pbos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#923194}
2021-09-21 02:28:43 +00:00
Lei Zhang
d56afb57d1 Delete unused STL includes from content/ headers.
Headers that do not contain "std::" do not need STL includes.

This CL is mechanically generated as follows:

INCL="algorithm|array|list|map|memory|queue|set|string|utility|vector"
git ls-files content | grep '\.h$' | xargs grep -L std:: | \
    xargs grep -El "#include <($INCL)>$" > to_process.txt

INCL_ESCAPED="$(echo $INCL|sed 's/|/\\|/g')"
cat to_process.txt | xargs sed -i "/^#include <\($INCL_ESCAPED\)>$/d"
cat to_process.txt | xargs sed -i '/^$/N;/^\n$/D'

Bug: 1200833
Change-Id: I3b8c9af66e23b37c3051760a7c5d4e132f9043a4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2841623
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Camille Lamy <clamy@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#875908}
2021-04-23 23:13:46 +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
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
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
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
dcheng
6003e0b1ac Convert //content from scoped_ptr to std::unique_ptr
BUG=554298
R=avi@chromium.org
TBR=rdevlin.cronin@chromium.org,thestig@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#386303}
2016-04-09 18:44:01 +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
Daniel Cheng
556abd1195 Fix a bunch of IWYU violators that don't include scoped_ptr.h
This blocks the conversion of //base from scoped_ptr to std::unique_ptr.

BUG=554298
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
R=danakj@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#384767}
2016-04-02 01:15:27 +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
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
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
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
dcheng
e933b3eb38 Standardize usage of virtual/override/final in content/
This patch was automatically generated by applying clang fixit hints
generated by the plugin to the source tree.

BUG=417463
TBR=avi@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#300461}
2014-10-21 11:44:31 +00:00
anand.ratn
271c97613d Replace OVERRIDE and FINAL with override and final in content/gpu/[a-s]*
BUG=417463

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

Cr-Commit-Position: refs/heads/master@{#298373}
2014-10-07 04:49:54 +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