Turns out there's a lot of includes, so these will have to be removed
before deleting the implementation of the task runner handles.
To allow the deletion of the task runner handle headers, add
the sequenced/thread task runner handles where they are used in
the codebase with scripts.
This was done with an automated change, with a few touchups afterwards.
The code for the mass-refactor changes are here:
python:
https://paste.googleplex.com/5534570878337024
shell:
https://paste.googleplex.com/6466750748033024
In terms of touchups:
- add sequenced/thread task runner handles to
the third_party/blink/public/DEPS, because multiple files were using
it transitively anyways.
- rewrite certain parts of the codebase which used
ThreadTaskRunnerHandles instead of CurrentDefaultHandles.
- fix a compile issue with forward-declaration in
extensions/browser/extension_file_task_runner.h.
AX-Relnotes: n/a.
Bug: 1026641
Change-Id: I737ef32aee4e77c21eaa3a2bdc403a28322cf1b7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4133323
Owners-Override: Gabriel Charette <gab@chromium.org>
Commit-Queue: Sean Maher <spvw@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1090532}
This CL changes flow how all relevant parts decide to use new feature:
Before this CL every part would be querying
kDisablePPAPISharedImagesSwapChain command line flag and
PPAPISharedImagesSwapChain feature flag independently.
It's very complicated and error prone to apply this with enterprise
policy which is available only in browser process and needs to be
communicated via command line flags.
To simplify this now we query flag/feature only in the renderer
process. The value is communicated to nacl process during
initialization of Graphics3D via gpu::Capabilities. GPU process is now
ready to handle both flows.
Bug: 1342033
Change-Id: I5f0fd2ef5f63d4429c9ca273c8777d63ee462597
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4108070
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Reviewed-by: ccameron chromium <ccameron@chromium.org>
Reviewed-by: Joe Mason <joenotcharles@google.com>
Commit-Queue: Vasiliy Telezhnikov <vasilyt@chromium.org>
Reviewed-by: Jonathan Ross <jonross@chromium.org>
Reviewed-by: Dominic Farolino <dom@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1084280}
This CL implements SetDefaultFramebufferSharedImage IPC on the command
buffer that allows callers to set SharedImage and associated params
like need of depth/stencil buffer and samples count to the default
framebuffer (fbo 0).
NaCL host side maintains pool of SharedImages that it uses with new
IPC to draw to the framebuffer.
Both sides are guarded by feature flag (kPPAPISharedImagesSwapChain) and
command line flag (kDisablePPAPISharedImagesSwapChain) that can veto
the feature flag. Extra command line is needed for enterprise policy.
Bug: 1342033
Change-Id: Iccf800d1bbe8dcd1f168272651ae32c27833c2ae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4006326
Reviewed-by: Sunny Sachanandani <sunnyps@chromium.org>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Commit-Queue: Vasiliy Telezhnikov <vasilyt@chromium.org>
Reviewed-by: Joe Mason <joenotcharles@google.com>
Reviewed-by: Kyle Charbonneau <kylechar@chromium.org>
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1078120}
Header files that do not contain "RefCounted" and do not contain
scoped_refptr do not need to include base/memory/ref_counted.h. Remove
it and do IWYU to fix the build.
Bug: 242216
Change-Id: Ie70e43b0c926b8ef610419c99f43eea991ac8d81
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4005763
Reviewed-by: Kyle Charbonneau <kylechar@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Owners-Override: Kyle Charbonneau <kylechar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1067592}
Using the macros instead of directly using `SequenceChecker` results in
smaller binaries and decreased memory usage. Most code already uses the
macros. This CL is part of a series of CLs that fixes remaining usages.
This CL was uploaded by git cl split.
R=dschuff@chromium.org
Bug: none
Change-Id: I2b77c5d704b39d087529c3e3b002188c1915baf3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3883904
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Commit-Queue: Derek Schuff <dschuff@chromium.org>
Auto-Submit: Christian Flach <cmfcmf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1045215}
NaCl cannot depend on //skia when building for ARM64, as in that build
some libraries are not present in the 32-bit version that NaCl needs.
Therefore, build some (parts of) files only in builds that are not for
nacl_helper.
Introduce a new buildflag IS_MINIMAL_TOOLCHAIN. This is to limit
dependencies in .h/.cc files if we build nacl_helper for ARM64.
Use nogncheck for such conditional includes as gn does not run the
preprocessor.
Test: Build nacl_helper for Linux ARM64
Bug: 1339021
Change-Id: Id95147bc134e34fbae91af3d540ed30a4e96b512
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3829145
Reviewed-by: Mustafa Emre Acer <meacer@chromium.org>
Commit-Queue: Fabian Sommer <fabiansommer@chromium.org>
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Reviewed-by: Mark Seaborn <mseaborn@chromium.org>
Reviewed-by: vikas soni <vikassoni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1037644}
Catch situations where computing the byte size of the incoming array
would overflow.
Beyond this, detect failures to allocate space in CommandBufferHelper.
In this situation, persistently lose the context client-side. Remove
DCHECKs preventing these guards from being reached.
Add new feature to disable ArrayBuffer size restrictions for testing.
Use it in the new test; it is required for it to pass.
Bug: 1316368
Bug: 1201109
Change-Id: Ic345aed296e2d9a3f44e33c4c207e12b64c4f312
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3688833
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Gregg Tavares <gman@chromium.org>
Reviewed-by: Victor Miura <vmiura@chromium.org>
Reviewed-by: Martin Kreichgauer <martinkr@google.com>
Cr-Commit-Position: refs/heads/main@{#1014267}
Delete CHROMIUM GL extensions that were added for swap, presentation and
overlay control from GLRenderer. These extensions are no longer needed
now that GLRenderer has been deleted.
Bug: 1247756
Change-Id: I9df77e118cd4798713dc2684566f0f5eba06006b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3669573
Reviewed-by: Sunny Sachanandani <sunnyps@chromium.org>
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Commit-Queue: Kyle Charbonneau <kylechar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1009927}
CreateImageCHROMIUM() is no longer used. Delete the extension and all
GLES2Interface functions related to it. Also delete plumbing through
various layers of GPU and IPC code related to it.
Remove references to the extension from other extensions as well.
Bug: 1216120
Change-Id: Ia55ad5d2f85f27c9d337ac928daf5fc614dc9b75
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3582497
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Commit-Queue: Kyle Charbonneau <kylechar@chromium.org>
Reviewed-by: Sunny Sachanandani <sunnyps@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/main@{#999958}
In some cases, the IRT was getting built with is_nacl_irt set to
false. In those cases, the compiler flags set by
build/config/nacl/BUILD.gn (by :compiler_codegen and :irt_optimize)
were not being applied.
This fixes two cases where the IRT architecture is different from the
chrome executable's architecture:
1) ARM32 NaCl in ARM64 Chromium (on Linux or Chrome OS). The problem
causes "-fasynchronous-unwind-tables" to be omitted, which creates an
IRT that leads to a crash when running the test
PPAPINaClNewlibTest.PostMessage. The output I got from the test was:
...
[1,4142801984:00:05:39.834116] NaClSysThreadCreate: Bad function pointer
[1,4142801984:00:05:39.834221] NaClSysThreadCreate: Bad function pointer
[1,4142801984:00:05:39.834255] NaClSysThreadCreate: Bad function pointer
[1,4142801984:00:05:39.834285] NaClSysThreadCreate: Bad function pointer
** Signal 11 from untrusted code: pc=1d3474
[1903:1903:0405/000539.939548:ERROR:nacl_process_host.cc(265)] NaCl process exited with status 62720 (0xf500)
I am not sure why that happens, but it looks like an ARM-specific
problem, maybe a miscompile.
2) x86-64 NaCl in Windows x86-32 Chromium. There don't seem to be any
correctness problems in this case, but having is_nacl_irt==false
causes the IRT to be built with "-O2" instead of "-Os", which makes it
larger than necessary. The lack of "-fasynchronous-unwind-tables"
shouldn't make a difference because "-fasynchronous-unwind-tables" is
the default on x86-64.
Fix by using current_cpu instead of target_cpu.
Remove an unnecessary assignment to is_nacl_cpu.
Add an assertion as a consistency check to catch the problem of
is_nacl_irt being false.
Bug: 1299021
Test: I ran the test above on ARM64 Ubuntu on a Raspberry Pi
Change-Id: I4f4966bd8fa5359527ab8b91152048e584ed0340
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3575687
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Mark Seaborn <mseaborn@chromium.org>
Cr-Commit-Position: refs/heads/main@{#990482}
@QA: This CL is a no-op.
Caused by incorrectly covering base::Thread when using regex
"base::(Time|Thread)(Ticks|Delta)?\b"
This script removed base/time/time.h if:
1) "base::Thread" is present
2) There is no (Time|ThreadTicks|Days|Hours|Minutes|Seconds|
Milliseconds|Microseconds|Nanoseconds|Hertz)
string in the file (no base:: prefix required to skip removal)
Bug: 1026641
Change-Id: I9df5e8beccc74054bf9bfff12320a1d4e0295b62
AX-Relnotes: n/a.
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3563202
Commit-Queue: Gabriel Charette <gab@chromium.org>
Auto-Submit: Gabriel Charette <gab@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Owners-Override: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#988045}
This CL is a no-op.
Only fixing instances where base::Time (and Ticks/Delta) is used in
a statement (i.e. not as a parameter to avoid adding includes in mere
overrides). Skipping pointer and reference qualified instances.
i.e. matches this regex:
'(\n *[^/\n][^/\n][^/\n]*base::(Time|Thread)(Ticks|Delta)?\b[^*&][^)]*;)'
and skipping files that have any existing fwd-decl for any of the
variants.
This is a prereq to remove unused base/task/post_task.h includes in
https://chromium-review.googlesource.com/c/chromium/src/+/3555247
Bug: 1026641
Change-Id: I87b43a8dc92bdceb67f4bd59b327b54813aa72a6
AX-Relnotes: n/a.
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3557354
Commit-Queue: Gabriel Charette <gab@chromium.org>
Auto-Submit: Gabriel Charette <gab@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#987283}
These private interfaces no longer have any users, now that the PDF
Viewer stopped using PPAPI. Prior CLs deleted most of the related code,
leaving only a minimal implementation. Delete that along with stragglers
that still reference the PDF headers.
Bug: 1302684
Change-Id: I9c2b5e81d8a919f32b069c68ae053d58a02e2710
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3502892
Reviewed-by: K. Moon <kmoon@chromium.org>
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nektarios Paisios <nektar@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#979393}
Removes `#include "base/macros.h"` from remaining .cc, .h and .mm files
that do not contain `ignore_result(` and do not trigger pre-commit or
pre-upload errors.
Bug: 1010217
No-Try: true
Change-Id: I4cc5207b3deafa7901764d2e633bbb1ad43cfb73
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3276692
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@{#941054}
This replaces all remaining DISALLOW_COPY_AND_ASSIGN() instances with
their expanded counterparts.
The macro definitions and IWYU are left as a separate change. The former
to prevent unintended large reverts and the latter is easier once all
DISALLOW_ macros are gone.
Bug: 1010217
Change-Id: I0e2fd43f4060628c09420709010aab2c84b87148
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3259964
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@{#938612}