This change is for “Enable Warnings for Implicit Conversions” project.
There are four steps to complete the project. Step 1. and step 3. are
required to split the change for step 2. into several CLs.
1. Disable prevent_unsafe_narrowing config
2. Add prevent_unsafe_narrowing to default_compiler_configs and remove
the config (`configs -= ...`) only where it is necessary
3. Enable prevent_unsafe_narrowing config again
4. Remove each `configs -= ...` added in step 2. and fix warnings
This is the first CL for step 2, which adds prevent_unsafe_narrowing to
default_compiler_configs and `configs -= ...` to some templates.
It is safe to merge this change with all the CQ bots green because there
should be some error when `configs -= ...` is added in a wrong place.
See the public one-pager for more details of this project:
go/enable-warnings-for-implicit-conversions (https://docs.google.com/document/d/1CTbQ-5cQjnjU8aCOtLiA7G6P0i5C6HpSDNlSNq6nl5E/edit?usp=sharing)
Bug: 1292951
Change-Id: I841517691b31d0d8e54965268a177c46e0ff7f49
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3488757
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Yuki Yamada <yukiy@chromium.org>
Cr-Commit-Position: refs/heads/main@{#976177}
Programmatically delete redundant metadata.
This CL is entirely machine-generated:
1. Export the metadata in the "original" and "reduced" forms:
dirmd read -form original > ~/tmp/dirmd/original.json
dirmd read -form reduced > ~/tmp/dirmd/reduced.json
2. Run reduce.py
Source code: https://gist.github.com/nodirg/a4803af94ffe258ba0a6e0a4807141d8
The script diffs the two JSON files and strips redundant
lines from DIR_METADATA files. If the file became empty, then
removes the file.
The results of the script was verified by diffing canonical
representation of `dirmd read -form full` before and after
the script: there is no diff.
Bug: 1179786
Change-Id: Ie5de3ba0962d266244ffb9b07c874b3dbbb69b9c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2795985
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Fred Mello <fredmello@chromium.org>
Owners-Override: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Nodir Turakulov <nodir@chromium.org>
Cr-Commit-Position: refs/heads/master@{#883868}
`gn format` recently changed its formatting behavior
for deps, source, and a few other elements when they
are assigned (with =) single-element lists to be consistent
with the formatting of updates (with +=) with single-element.
Now that we've rolled in a GN binary with the change,
reformat all files so that people don't get presubmit
warnings due to this.
This CL was uploaded by git cl split.
R=bbudge@chromium.org
Bug: 1041419
Change-Id: Ib80f67bc1f9a6a30349eb1289285585590abaffc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1997826
Auto-Submit: Nico Weber <thakis@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#730701}
Those can only be used by the old Hangouts effect plugin and it isn't
used anymore.
Since those APIs depend on URL.createObjectURL(MediaStream) which is
deprecated, it is necessary to first remove them from the codebase
in order to continue removing URL.createObjectURL(MediaStream).
Bug: 852412
Change-Id: If64e8e7259a6d51ccf89362b59c9d6fc7c890a30
Reviewed-on: https://chromium-review.googlesource.com/1099159
Commit-Queue: Florent Castelli <orphis@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588819}
After [1], a manual dependency on exe_and_shlib_deps is no longer necessary
since it's automatically added. This CL removes all remaining manual references
to exe_and_shlib_deps.
[1] d7ed1f0a9c
BUG=845700
R=dpranke
TBR=sky,mark
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:ios-simulator-full-configs;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.chromium.android:android_compile_x64_dbg;master.tryserver.chromium.android:android_compile_x86_dbg;master.tryserver.chromium.android:android_cronet_tester;master.tryserver.chromium.linux:closure_compilation;master.tryserver.chromium.linux:linux_vr;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I647442fb09eba4c055697bf26504abc3b3284d94
Reviewed-on: https://chromium-review.googlesource.com/1073613
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563028}
If the same include guard is used twice, it becomes impossible
to include both those headers in the same translation unit and
that can be hard to debug and understand. This patch renames
some include guards that have the same names (copy/paste) as
existing include guards.
Found while working on a PRESUBMIT test for include guards. It will
not warn for these things, but it was easy to add that test locally.
There are another few thousand files that have wrongly named
include guards. Left as an exercise to the reader.
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:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: Ic7ba08558d3fbae0d3bee843f3092d472f8c643b
Reviewed-on: https://chromium-review.googlesource.com/937712
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#539800}
Cases where the second argument (constraints) is used are left alone, as
a reminder that this isn't standarized behavior.
BUG=658423
Review-Url: https://codereview.chromium.org/2446173002
Cr-Commit-Position: refs/heads/master@{#427662}
The genereated Ogg/Opus files don't seem to play in Chromium (which uses
ffmpeg) while they do VLC or Gstreamer. Turns out we have the wrong flag
set on the OpusTags packet and a wrong size written for one of the strings.
BUG=none
TEST=play the generated file on Chromium
Review URL: https://codereview.chromium.org/1640703002
Cr-Commit-Position: refs/heads/master@{#371778}
Prevent buffer reallocations by using an array of buffers to save encoded
audio data in and just create a buffer to contain all of them when the user
wants to save the data to a file.
BUG=570837
Review URL: https://codereview.chromium.org/1569553004
Cr-Commit-Position: refs/heads/master@{#370940}
When using the video decoder PPAPI, the most recent version of the ARC extension requires there to be a certain minimum number of picture buffers in flight (allocated but not released). Without a larger pool, ARC video decoding will stall trying to allocate more decoded picture frames than are available by default.
This patch creates a new DEV interface version for the VideoDecoder PPAPI. The new interface simply adds a single new argument to VideoDecoder::Initialize() so that a PPAPI client indicate the minimum number of pictures it needs to function.
In order to implement this minium picture count, the meaning of the ProvidePictureBuffers() interface call used by the video decoder implementations has changed slightly. After making the call to ProvidePictureBuffers() with a given picture buffer size, the subsequent callback via AssignPictureBuffers() includes a std::vector of buffers that might be larger than requested.
I've adjusted the various implementations to handle this change -- most of them previously assumed and asserted that the count was the same.
In particular this meant moving some code around in the V4L2 implementations since they also do some internal allocations based on the number of picture buffers that actually end up being chosen.
BUG=485775
Review URL: https://codereview.chromium.org/1207043002
Cr-Commit-Position: refs/heads/master@{#344391}
BUG=455409
TEST=run the video_encode NaCl SDK example using the vp9 encoder
Review URL: https://codereview.chromium.org/1132833002
Cr-Commit-Position: refs/heads/master@{#341970}
Use millisecond timestamps in the IVF container rather than having
1.0/30 units of time. This prevents a drift in the replay of the
video because the recorder might not schedule frames at exactly
33.3333ms.
BUG=503153
TEST=record a 2 minutes vp8 video using the video encoder NaCl SDK and verify the produced video last exactly 2 minutes
Review URL: https://codereview.chromium.org/1226203010
Cr-Commit-Position: refs/heads/master@{#338694}
The ScheduleNextEncode() can be called at multiple stages in the
example depending on whether it needs to reconfigure the
MediaVideoStreamTrack. This can lead the example to encode at twice
30fps. At this speed we can exhaust the 33ms lifespan of video
buffers, leading to errors in the example plugins which can't retrieve
new frames to respect the 30fps framerate.
BUG=503153
TEST=run video_encoder example from NaCl SDK with VP8 codec and verify there are no error messages after 1 minute
Review URL: https://codereview.chromium.org/1218513003
Cr-Commit-Position: refs/heads/master@{#336850}
The current VideoEncoder example's scheduling algorithm for encoding frames at
30fps drifts as it schedules new callbacks and as a consequence
records fewer frames than what the frame rate requires.
This change improves the algorithm by storing the last time at which it
encoded a frame and uses this information to predict when the next tick should
happen.
BUG=none
TEST=record 30s of video using the video encoder example, check that the produced stream's length is identical (1 or 2 frames difference)
Review URL: https://codereview.chromium.org/1187193006
Cr-Commit-Position: refs/heads/master@{#335147}
Power Saver Test Plugin triggers Dr. Memory leaks under Windows. Most likely because the test process is destroyed before the out of process test plugin has a chance to free its Pepper resources (an image data).
This is because the test plugin is trying to draw new frames as fast as it possibly can. There's no reason for the test plugin to draw so many frames. In fact, it only needs one.
Changing the test plugin to draw only one frame fixes the issue for me (locally).
BUG=487492
Review URL: https://codereview.chromium.org/1182283002
Cr-Commit-Position: refs/heads/master@{#334407}
While building WebGamepads during enumeration, length parameter is never
reset. It is always incremented. When end user re-connects gamepad, since
this variable is always incremented, it will exceed the max number of
supported gamepads ie 4 and leads to crash in plugins.
BUG=485507
R=scottmg, raymes, bbudge
Review URL: https://codereview.chromium.org/1136463002
Cr-Commit-Position: refs/heads/master@{#329151}
GetSupportedProfiles() should return the number of supported profiles
or a negative value in case of error. Prior to this change, we
reported PP_OK instead of the number of profiles.
BUG=455409
Review URL: https://codereview.chromium.org/1069653002
Cr-Commit-Position: refs/heads/master@{#325649}
Releasing the Graphics2D at the end of the Repaint method causes the blue image to never be visible to anyone who runs the 2d.html example. (At least on Linux)
This saves the created Graphics 2D, saves it, and releases it when the plugin instance is destroyed.
BUG=
Review URL: https://codereview.chromium.org/1065733003
Cr-Commit-Position: refs/heads/master@{#324059}
For tools/sort_sources.py to be useful, existing GYP and GN files
should be sorted.
BUG=456014
TEST=everything should build as before
Review URL: https://codereview.chromium.org/930753002
Cr-Commit-Position: refs/heads/master@{#316434}
This adds the "threading" example which was unreferenced in the GYP build, despite existing and compiling OK.
Review URL: https://codereview.chromium.org/921993002
Cr-Commit-Position: refs/heads/master@{#316379}
This puts BUILD files in the corresponding directories without duplicate names.
Adds a template for ppapi examples and writes the build for one example. I only did one at this point to test the infrastructure without making this patch too large.
NOPRESUBMIT=true
Review URL: https://codereview.chromium.org/921953002
Cr-Commit-Position: refs/heads/master@{#316352}