Because client and service may be of different bitness, offsets in command
buffers have to fit in a uint32_t, effectively limiting transfer buffers
to 4GB. This makes it clearer by enforcing it on IPC boundaries and
using uint32_t for the size, removing casts along the way.
Bug: 905509
Change-Id: Iabd9d01e5a8c93c8efea909a6df7d588de14c4fb
Reviewed-on: https://chromium-review.googlesource.com/c/1396861
Commit-Queue: Antoine Labour <piman@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#620510}
Because client and service may be of different bitness, offsets in command
buffers have to fit in a uint32_t, effectively limiting transfer buffers to 4GB.
Make this clear in CommandBuffer::CreateTransferBuffer by taking a uin32_t
instead of a size_t (fixing callers as appropriate), avoiding potential security
issues with silent clamping.
Bug: 905509
Change-Id: I8392f2e73e95bf65e08fa9896e2acc53afa0d268
Reviewed-on: https://chromium-review.googlesource.com/c/1396132
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Commit-Queue: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#620132}
base::hash_map is alias of std::unordered_map now.
I applied following command to make this CL.
$ git grep -l 'base::hash_map' | fgrep -v base/ | xargs sed -i -e 's/base::hash_map/std::unordered_set/g' -e 's/\(#include <[a-z_]*>\)/\1\n#include <unordered_map>/' -e 's/BASE_HASH_NAMESPACE/std/'
$ git cl format
$ # Added IntPairHash and replaced BASE_HASH_NAMESPACE with std in some places.
TBR: dcheng@chromium.org
Bug: 576864
Change-Id: I38941d9f9bcb05ec474b8dee5230c4c5dcd2211f
Reviewed-on: https://chromium-review.googlesource.com/c/1390892
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#620124}
This reverts commit c19106d109.
Original change's description:
> Remove WaitSyncTokenCHROMIUM command
>
> After migrating InProcessCommandBuffer to use GPU scheduler, most tasks
> are scheduled after their sync token dependencies are satisifed (see
> crrev.com/c/1157874).
>
> The one exception was the WaitSyncToken IPC used by ReturnFrontBuffer
> for pepper, which specifies a sync token, and waits while handling the
> message.
>
> Change ReturnFrontBuffer to contain the sync token, and use it to
> specify the dependency to the scheduler.
>
> Remove WaitSyncTokenCHROMIUM command, since sync token dependencies are
> specified as task metadata in all cases.
>
> Make other cleanups such as removing unnecessary sync token tests, and
> make sure the sync token code paths are not used where unsupported by
> using NOTREACHED.
>
> 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: Ieee4f6e2427a59a4e0c4b3c983cb489741241272
> Bug: 778753
> Reviewed-on: https://chromium-review.googlesource.com/c/1168155
> Reviewed-by: Bo <boliu@chromium.org>
> Reviewed-by: Daniel Cheng <dcheng@chromium.org>
> Reviewed-by: Antoine Labour <piman@chromium.org>
> Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#599849}
Bug: 778753, 895984
TBR=dcheng@chromium.org,boliu@chromium.org,piman@chromium.org
Change-Id: I07943fdcbb131566718d51e78f134975ec53b62e
Reviewed-on: https://chromium-review.googlesource.com/c/1361870
Reviewed-by: Bo <boliu@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Sunny Sachanandani <sunnyps@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
Cr-Commit-Position: refs/heads/master@{#615387}
An upcoming CL triggers nacl toolchain problems in jumbo builds where
some combination of template instantiations cause some build errors.
To not block that CL, disable jumbo for nacl in relevant directories.
Bug: 912152
Change-Id: Ie79729414d765fec22325bacdb7df8cf714457f3
Reviewed-on: https://chromium-review.googlesource.com/c/1363282
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#614014}
The classes may not actually be copyable, copy-assignable, etc. Previously the
compiler would not complain until trying to *use* the defaulted ctor/operator,
but the new -Wdefaulted-function-deleted warning warns about this up front.
(As a concrete example, ExtensionMsg_TabConnectionInfo isn't copy-assignable
because of base::DictionaryValue member, which is a base::Value, which can't
be copied.)
To ensure these structs are still movable, remove the user-declared destructor.
This is also a simplification in that it removes all the code that was necessary
to define that destructor out-of-line.
Bug: 890307
Change-Id: I27ec3a0639bdeb94776acdd78b173791d0b8162d
Reviewed-on: https://chromium-review.googlesource.com/c/1261082
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Daniele Castagna <dcastagna@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Hans Wennborg <hans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610331}
Jumbo is a unity build system for Chromium (see
https://chromium.googlesource.com/chromium/src/+/lkgr/docs/jumbo.md )
which merges cc files at the build target level.
The code in //ppapi needs roughly 15 CPU minutes to compile in my
measurements, which is 2.3% of the total jumbo build time and one of
the largest remaining non-thirdparty code blocks without jumbo support.
This saves about 7.5 CPU minutes in a jumbo build, which is
a bit over 1% of the total reference build time. It doesn't cover
thunk which is most of the remaining compile time. There are
too much generated code with reused symbol names in thunk for it
to be trivially supported right now.
Bug: 898475
Change-Id: I1ee592578ac765cbd58cb856fcd5f331d3dd8c50
Reviewed-on: https://chromium-review.googlesource.com/c/1297366
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#609687}
As a final step, replace all includes back:
- mv message_loop_current.h message_loop.h
- s/message_loop_forward.h/message_loop.h/ in all includes.
- s/message_loop_forward.h/message_loop.h/ in base/BUILD.gn
- Remove message_loop_forward.h from third_party/DEPS.
TBR=gab@chromium.orgR=gab@chromium.org
BUG=891670
Change-Id: I623077025701459ddb7045cbcfdad138aa90a9e4
Reviewed-on: https://chromium-review.googlesource.com/c/1313110
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604690}
To facilitate splitting MessageLoop into MessageLoop and MessageLoopImpl
introduce message_loop_forward.h and use it everywhere.
- s/message_loop.h/message_loop_forward.h/ in all includes.
- Add message_loop_forward.h to base/BUILD.gn.
- Add message_loop_forward.h to third_party/DEPS.
TBR=gab@chromium.org
BUG=891670
Change-Id: Ibac3a24f5bd4291c9d57dd32c627477e4e6ef324
Reviewed-on: https://chromium-review.googlesource.com/c/1313108
Reviewed-by: Gabriel Charette <gab@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604672}
The downcast wasn't necessary at all. We could just remove it. The
pointer is never actually used as a MessageType*, only upcast back to an
IPC::Message*. (There is a "dereference", but it is to pass into a method
taking const IPC::Message&.)
Leave it as an IPC::Message*.
Bug: 520760
Change-Id: I6ac697fc1676bd9bbc754c97e617ce297197432c
Reviewed-on: https://chromium-review.googlesource.com/c/1298455
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: David Benjamin <davidben@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602752}
In jumbo build experiments, the different
InstanceToDispatcherMap types and g_instance_to_dispatcher
globals ended up in the same translation unit and thus the same
anonymous namespace where the symbols clashed. This just renames
them as Dispatcher -> PluginDispatcher/HostDispatcher.
Bug: 898475
Change-Id: Ieae4310fdbe7ea27954011964d2bb6fa4d83e338
Reviewed-on: https://chromium-review.googlesource.com/c/1297145
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#602647}
In jumbo build experiments, the different RunCallback functions
ended up in the same translation unit and thus the same
anonymous namespace where the symbols clashed. Since they,
and VideoDecoderResource::RunCallbackWithError had the same
implementation, this merges the functions into a shared
SafeRunCallback.
Bug: 898475
Change-Id: I3ee20972794d3c6ef73e49882e1ceba24c487e19
Reviewed-on: https://chromium-review.googlesource.com/c/1297427
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#602646}
For any given BufferFormat, there is a single internal format that it is
compatible with (note, the converse isn't true), as defined by
gpu::IsImageFormatCompatibleWithGpuMemoryBufferFormat.
Rather than leaving guess-work to the client, instead expose it via a
gpu::InternalFormatForGpuMemoryBufferFormat. This in turns simplifies
quite a few things, and in particular we don't need to send redundant
information in IPC (BufferFormat vs internalformat) that we then need to
validate.
Bug: 870116
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_layout_tests_slimming_paint_v2;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.blink:linux_trusty_blink_rel
Change-Id: I34a12c71c252ba2a5199f47ce983a02307df351b
Reviewed-on: https://chromium-review.googlesource.com/c/1290192
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Fernando Serboncini <fserb@chromium.org>
Commit-Queue: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#601193}
This CL changes the ICU collator being used for text searching in the
PDF viewer from the default to the 'search' one. This is the same
collator used in Blink, and it folds together similar looking
characters in a locale specific way, so that things like accented and
unaccented vowles will match or not match dependent on the
expectations of the user locale.
Additionally, when searching single and double quotation characters
are being simplified to the ASCII forms of them to make matching
between defferent types of quotes work better. Quotation marks are a
known limitation of the search collator and this workaround is based
off a similar solution that exists in Blink to improve matching.
BUG=chromium:142627
Change-Id: I399ea1f0bacb58434b468866127a91ccb6213e99
Reviewed-on: https://chromium-review.googlesource.com/c/1281178
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#601157}
This reverts commit c19106d109.
Reason for revert: Causing multiple mac gpu fyi failures crbug.com/895984
Original change's description:
> Remove WaitSyncTokenCHROMIUM command
>
> After migrating InProcessCommandBuffer to use GPU scheduler, most tasks
> are scheduled after their sync token dependencies are satisifed (see
> crrev.com/c/1157874).
>
> The one exception was the WaitSyncToken IPC used by ReturnFrontBuffer
> for pepper, which specifies a sync token, and waits while handling the
> message.
>
> Change ReturnFrontBuffer to contain the sync token, and use it to
> specify the dependency to the scheduler.
>
> Remove WaitSyncTokenCHROMIUM command, since sync token dependencies are
> specified as task metadata in all cases.
>
> Make other cleanups such as removing unnecessary sync token tests, and
> make sure the sync token code paths are not used where unsupported by
> using NOTREACHED.
>
> 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: Ieee4f6e2427a59a4e0c4b3c983cb489741241272
> Bug: 778753
> Reviewed-on: https://chromium-review.googlesource.com/c/1168155
> Reviewed-by: Bo <boliu@chromium.org>
> Reviewed-by: Daniel Cheng <dcheng@chromium.org>
> Reviewed-by: Antoine Labour <piman@chromium.org>
> Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#599849}
TBR=dcheng@chromium.org,boliu@chromium.org,sunnyps@chromium.org,piman@chromium.org
Change-Id: I87347c05dded27955410b08e40f37388a484d5f9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 778753, 895984
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
Reviewed-on: https://chromium-review.googlesource.com/c/1284394
Reviewed-by: Sunny Sachanandani <sunnyps@chromium.org>
Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
Cr-Commit-Position: refs/heads/master@{#600102}
After migrating InProcessCommandBuffer to use GPU scheduler, most tasks
are scheduled after their sync token dependencies are satisifed (see
crrev.com/c/1157874).
The one exception was the WaitSyncToken IPC used by ReturnFrontBuffer
for pepper, which specifies a sync token, and waits while handling the
message.
Change ReturnFrontBuffer to contain the sync token, and use it to
specify the dependency to the scheduler.
Remove WaitSyncTokenCHROMIUM command, since sync token dependencies are
specified as task metadata in all cases.
Make other cleanups such as removing unnecessary sync token tests, and
make sure the sync token code paths are not used where unsupported by
using NOTREACHED.
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: Ieee4f6e2427a59a4e0c4b3c983cb489741241272
Bug: 778753
Reviewed-on: https://chromium-review.googlesource.com/c/1168155
Reviewed-by: Bo <boliu@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
Cr-Commit-Position: refs/heads/master@{#599849}
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}
This CL moves all of the logic over to the UI thread, to keep things
relatively simple and minimize thread hops, since that's where core
network service objects live.
It also fixes a pre-existing bug in the PPAPI UDP code, where read
errors that occur when there's no pending read are converted into
0-byte read successes.
This is a reland of https://chromium-review.googlesource.com/1171568,
which was reverted due to tests failing on OSX when broadcast was set
only after calling Bind, due to the Bind call failing. The new CL
uses a new UDPSocketOption to allow broadcast before calling Bind on
the underlying socket.
TBR=jam@chromium.org, rhalvati@chromium.org
Bug: 848078, 876824
Change-Id: I0e31a357eb4b80bb78bae32f2a3ea3ce331256ec
Cq-Include-Trybots: luci.chromium.try:linux_mojo
Reviewed-on: https://chromium-review.googlesource.com/1190407
Reviewed-by: Matt Menke <mmenke@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Matt Menke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#586497}
This reverts commit cc2b634dbe.
Reason for revert: Multiple PPAPI tests have begun failing on different OSes after this patch lands. See crbug.com/876824
Original change's description:
> Make PepperUdpSocketMessageFilter use NetworkService UDP API.
>
> This CL moves all of the logic over to the UI thread, to keep things
> relatively simple and minimize thread hops, since that's where core
> network service objects live.
>
> It also fixes a pre-existing bug in the PPAPI UDP code, where read
> errors that occur when there's no pending read are converted into
> 0-byte read successes.
>
> Bug: 848078
> Cq-Include-Trybots: luci.chromium.try:linux_mojo
> Change-Id: Id6d23c26c1ac085211dfcfe23502a307fc29a284
> Reviewed-on: https://chromium-review.googlesource.com/1171568
> Commit-Queue: Matt Menke <mmenke@chromium.org>
> Reviewed-by: John Abd-El-Malek <jam@chromium.org>
> Reviewed-by: Ramin Halavati <rhalavati@chromium.org>
> Reviewed-by: Helen Li <xunjieli@chromium.org>
> Reviewed-by: Bill Budge <bbudge@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#585057}
TBR=bbudge@chromium.org,jam@chromium.org,mmenke@chromium.org,xunjieli@chromium.org,rhalavati@chromium.org
Change-Id: I68b625673615275c102a95aac7df7583a2f7c97d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 848078
Cq-Include-Trybots: luci.chromium.try:linux_mojo
Reviewed-on: https://chromium-review.googlesource.com/1185682
Reviewed-by: Jonathan Ross <jonross@chromium.org>
Commit-Queue: Jonathan Ross <jonross@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585196}
This CL moves all of the logic over to the UI thread, to keep things
relatively simple and minimize thread hops, since that's where core
network service objects live.
It also fixes a pre-existing bug in the PPAPI UDP code, where read
errors that occur when there's no pending read are converted into
0-byte read successes.
Bug: 848078
Cq-Include-Trybots: luci.chromium.try:linux_mojo
Change-Id: Id6d23c26c1ac085211dfcfe23502a307fc29a284
Reviewed-on: https://chromium-review.googlesource.com/1171568
Commit-Queue: Matt Menke <mmenke@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Ramin Halavati <rhalavati@chromium.org>
Reviewed-by: Helen Li <xunjieli@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585057}
This is a precursor to https://crrev.com/c/1053338 which introduces
base::CheckedObserver. Existing observers will be unchecked (as they
are already). There is no behavior change with this CL.
The CL is mechanical. The bulk was done with variations on a sed script:
git grep -l ' base::ObserverList<.*> .*;' -- '*.cc' '*.h' '*.mm' | \
xargs -IX sed -i -r 's/(^[ ]*)base::ObserverList<([^>]*)> (.*);/'\
'\1base::ObserverList<\2>::Unchecked \3;/' X
With some manual follow-ups to get special cases.
TBR=gab@chromium.org
Bug: 842987
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:ios-simulator-full-configs;luci.chromium.try:linux_layout_tests_slimming_paint_v2;luci.chromium.try:linux_mojo;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.blink:linux_trusty_blink_rel;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: Idffe88e2b52f67f9226eb7b6d922070349dacc22
Reviewed-on: https://chromium-review.googlesource.com/1175511
Commit-Queue: Trent Apted <tapted@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584330}
Single buffer mode for pepper relied on TakeFromBuffer associating
different mailboxes to the same texture.
This does not work anymore after https://crrev.com/c/1097696 and
single buffer nacl plugins now sends invalid mailboxes to the compositor.
This CL fixes the issue making sure that Graphics3D is aware of the
single buffer mode and it will associate only one mailbox, only once,
to the front buffer.
Bug: 866643, b/111601347
Test: http://nacl-latency.firebaseapp.com runs without flickering
Change-Id: I8625fbb87bf3e9503068681bed681c88a068a123
Reviewed-on: https://chromium-review.googlesource.com/1144486
Commit-Queue: Daniele Castagna <dcastagna@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579123}
http://crrev.com/c/1105466 changed the precondition for
CommandBuffer::DestroyTransferBuffer to only require an OrderingBarrier
rather than a full flush, but the implementation in
PpapiCommandBufferProxy wasn't fixed to handle that.
This change ensures we issue the flush before the DestroyTransferBuffer
IPC if one is pending.
Bug: 866644
Change-Id: I6d6a3b6a752c4bfcd32f66153c84829140ed2b5f
Reviewed-on: https://chromium-review.googlesource.com/1152149
Reviewed-by: Sunny Sachanandani <sunnyps@chromium.org>
Commit-Queue: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578511}
This CL replaces all uses of base::SharedMemory and base::SharedMemoryRegion
with the new shared memory classes. New classes can be used both in the
renderer and the ppapi plugin processes.
Bug: 865102
Change-Id: I4ccc52990a0aa8a65ac701b92c45b792188506f8
Reviewed-on: https://chromium-review.googlesource.com/1142161
Commit-Queue: Alexandr Ilin <alexilin@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576622}
This CL replaces the deprecated base::SharedMemory in
gpu::SharedMemoryBufferBacking with the base::UnsafeSharedMemoryRegion. This
involves cascading changes in many other files including the change of
parameters in GpuChannelMsg_CreateCommandBuffer and
GpuCommandBufferMsg_RegisterTransferBuffer ipc messages.
Bug: 861844
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;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I7c7afecd9fbf6d268ed72233f2e85a6f2d93da51
Reviewed-on: https://chromium-review.googlesource.com/1127948
Commit-Queue: Alexandr Ilin <alexilin@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574872}
Since the UI displays Pages Per Sheet for the N-up setting, and there
was a review comment previously to rename it to pages_per_sheet, so I
am renaming the variable name here.
In printing, 2-up, 3-up, or more generally N-up refers to a page
layout strategy in which multiple pages are composited onto a
single page.
Bug: 775999
Change-Id: I538c22a450a603f6b0896a2c5c4273052ba9e969
Reviewed-on: https://chromium-review.googlesource.com/1128325
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Sean Kau <skau@chromium.org>
Reviewed-by: Chris Palmer <palmer@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Commit-Queue: Shirleen Lou <xlou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#573588}
With the change to using presentation-feedback for facilitating snapshot
requests (crrev.com/c/1095562), the snapshot-specific code in gpu can
now be removed.
BUG=851504
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: I25b563f879bb66c345ba541df736efc65a834f0d
Reviewed-on: https://chromium-review.googlesource.com/1096669
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Sadrul Chowdhury <sadrul@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567311}
ProduceTextureDirectCHROMIUM is always called after GenMailboxCHROMIUM
(or equivalently gpu::Mailbox::Generate()), so merge both calls into a
single one. This isn't intended to change any behavior.
Note, TakeFrontBuffer still takes an explicitly generated gpu::Mailbox.
Bug: 847674
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;master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I7227ddffba6291c1efe3ed589bfbc6166f3319fe
Reviewed-on: https://chromium-review.googlesource.com/1089695
Commit-Queue: Antoine Labour <piman@chromium.org>
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Reviewed-by: Jonathan Backer <backer@chromium.org>
Reviewed-by: Justin Novosad <junov@chromium.org>
Reviewed-by: David Reveman <reveman@chromium.org>
Reviewed-by: Frank Liberato <liberato@chromium.org>
Reviewed-by: Klaus Weidner <klausw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#566633}
This removes the DownloadToFile option from ResourceRequest, as well
as URLLoaderClient.OnDataDownloaded and the downloaded_file argument
to OnReceiveResponse, as nothing is using this anymore.
Also removes the actual implementation of the feature, as well as all
the bits of plumbing that are now no longer needed.
Note that there is still a blink::Resource::DidDownloadData,
blink::RawResourceClient::DataDownloaded etc, as from that layer down
these callbacks are also used by the download-to-blob functionality that
replaced download-to-file.
Bug: 791702
Change-Id: I616a829630a285bbfc580d62f7b8de7ed3b406ea
Reviewed-on: https://chromium-review.googlesource.com/1064798
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Min Qin <qinmin@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#566193}
For obscure historical reasons, mailbox names were created on the
renderer side whereas the textures are produced on the plugin side. Move
the mailbox name creation to the plugin side so that it happens when the
textures are produced. A follow-up will merge the 2 operations.
Bug: 847674
Change-Id: Ia8cde57c2c0421e1361ddb14de63f02a34ea9b6f
Reviewed-on: https://chromium-review.googlesource.com/1081669
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563858}
This CL replaces base::SharedMemory and base::SharedMemoryHandle classes by the
base::ReadOnlySharedMemoryRegion in the code related to the audio input on the
renderer side, notably AudioInputDevice and PepperAudioInputHost.
Bug: 844508
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: Ifb3acc771cb9efcda8f22b2647ceca880451d453
Reviewed-on: https://chromium-review.googlesource.com/1078817
Commit-Queue: Alexandr Ilin <alexilin@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Max Morin <maxmorin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563608}
This CL replaces base::SharedMemory and base::SharedMemoryHandle classes by the
base::UnsafeSharedMemoryRegion in the code related to the audio output on the
renderer side. The dependency chain starts from the content::MojoAudioOutputIPC.
Bug: 844508
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: I03b92dcf929fdf050029f8d97b56343ecf7b3a27
Reviewed-on: https://chromium-review.googlesource.com/1076547
Commit-Queue: Alexandr Ilin <alexilin@chromium.org>
Reviewed-by: Max Morin <maxmorin@chromium.org>
Reviewed-by: Xiaohan Wang <xhwang@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563596}
This CL adds two new methods, ShareUnsafeSharedMemoryRegionWithRemote() and
ShareReadOnlySharedMemoryRegionWithRemote() to
ppapi::proxy::ProxyChannel::Delegate and to content::RendererPpapiHost classes
and all implementation classes.
These new methods are similar to the SharedSharedMemoryHandleWithRemote()
method in those classes but are supposed to work with the new shared memory
API.
Bug: 845985
Change-Id: I8ccd92a1c81dca9495c85119e9a4e40fd6b69abf
Reviewed-on: https://chromium-review.googlesource.com/1078847
Commit-Queue: Alexandr Ilin <alexilin@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563571}
This CL adds a new SHARED_MEMORY_REGION type to the SerializedHandle. This new
type is backed up by the base::subtle::PlatformSharedMemoryRegion class that
provides a new recommended API for the shared memory in Chrome.
Eventually, all uses of the SHARED_MEMORY type should be converted to the
SHARED_MEMORY_REGION.
Bug: 845985
Change-Id: Icfb4605dadb6f111efe953d8b940cc879fa40763
Reviewed-on: https://chromium-review.googlesource.com/1076334
Reviewed-by: Ken Rockot <rockot@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Commit-Queue: Alexandr Ilin <alexilin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563500}
This CL deletes the copy constructor and the copy assignment operator from the
ppapi::proxy::SerializedHandle class replacing them with move operations. This
is preparatory step to make SerializedHandle using the new shared memory
classes that are move-only.
SerializedHandle holds a system resource that should be properly closed after
use. Move semantics allow to introduce the more clear ownership model and
prevent resource leaks.
Bug: 845985
Change-Id: Ie7202d18f4f0396133c53ee0faee111e07c58ee8
Reviewed-on: https://chromium-review.googlesource.com/1073200
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Alexandr Ilin <alexilin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#562796}
The use counter is showing pretty much zero usage of this API, so as a
first step towards removing the implementation of DownloadToFile, this
changes the exposed API to always fail when attempting to use it.
Bug: 823522
Change-Id: Ic82280d3d203684467fa4845b255cff9a02e1e12
Reviewed-on: https://chromium-review.googlesource.com/1062705
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Mark Seaborn <mseaborn@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Commit-Queue: Marijn Kruisselbrink <mek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#561682}
Before gamepad was partially servicified, gamepad struct definitions
resided in WebKit. These definitions must be identical for all readers
and writers to the shared memory buffer for consistency. Since pepper
may not depend on WebKit, the structs were duplicated in the pepper
gamepad client.
Now these structs have been moved out of WebKit and can be shared with
other components by depending on the target
//device/gamepad/public/cpp:shared_with_blink. This CL removes the
duplicate pepper definitions and switches all usages to the //device
definitions.
BUG=694998
Change-Id: I4cf596f5cff18f6dc8945a422a3cc9f70711c10c
Reviewed-on: https://chromium-review.googlesource.com/1062600
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Matt Reynolds <mattreynolds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560914}
PPP_Printing_Dev_0_6 uses struct PP_PrintSettings_Dev in its Begin
method. r554188 changed the struct to add a new field, and another
pending CL wants to add one more field. These changes may not be safe
because Flash also uses PPP_Printing_Dev_0_6.
To resolve this issue, revert the PP_PrintSettings_Dev changes. In its
place, add a separate struct PP_PdfPrintSettings_Dev, and a separate
PrintBegin method to PPP_Pdf_1_1. When printing, if PPP_Pdf is
available, use its PrintBegin method. Otherwise, use PPP_Printing_Dev's
Begin method.
BUG=775999,835654
Change-Id: Ia489668c301e28eb943270fd1d7e268ede6300c5
Reviewed-on: https://chromium-review.googlesource.com/1065015
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560658}
Currently we use the concept of a Swap ID in LatencyInfoCache. We want
to depend on this pattern in additional places as well.
Unfortunately, the ID used in LatencyInfoCache is loosely coupled to
the ID generated in the GPU proc - they seem to line up now, but
nothing guarantees they keep doing so.
To make this system more robust, this patch introduces client
generation of Swap IDs, which are then sent to the GPU proc and
round-tripped back to the client.
Bug: 837476
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;master.tryserver.chromium.linux:linux_vr
Change-Id: I04f762c7f84a437b13fe1ff75abb13fc0237dc08
Reviewed-on: https://chromium-review.googlesource.com/1035536
Commit-Queue: Eric Karl <ericrk@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#556588}
In printing, 2-up, 3-up, or more generally N-up refers to a page
layout strategy in which multiple pages are composited onto a
single page.
1. Added ability to pass the N-up feature UI settings(which will be
added in the next CL) to the print preview workflow, so that the
PDF plugin can take action based on user's input.
2. Added N-up feature support to pdfium_engine, so that when the
source is PDF, pdf plugin will generate the N-up output doc based
on user's input.
These changes have been reviewed in:
https://chromium-review.googlesource.com/c/chromium/src/+/1014628.
Bug: 775999
Change-Id: I552c9c91e32af0faa6ffaa8c42ac0652f470f791
Reviewed-on: https://chromium-review.googlesource.com/1028992
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Shirleen Lou <xlou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#554188}
This reverts commit 008759aa5b.
Reason for revert: Breaks MSan Tests
Findit (https://goo.gl/kROfz5) confirmed this CL at revision 553428 as the culprit for
failures in the build cycles as shown on:
https://findit-for-me.appspot.com/waterfall/culprit?key=ag9zfmZpbmRpdC1mb3ItbWVyRAsSDVdmU3VzcGVjdGVkQ0wiMWNocm9taXVtLzAwODc1OWFhNWJjOGNkMDVjNTI5NjkwOGVmYmY3NGRjYjA0M2Q2NmUM
Example:
https://logs.chromium.org/v/?s=chromium%2Fbb%2Fchromium.memory%2FLinux_ChromiumOS_MSan_Tests%2F6869%2F%2B%2Frecipes%2Fsteps%2Fmus_browser_tests%2F0%2Flogs%2FOutOfProcessPPAPITest.Printing%2F0
Uninitialized bytes in __msan_check_mem_is_initialized at offset 0 inside [0x7f914c1f9524, 4)
==9854==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x12c35d8e in WriteBytesCommon ./../../base/pickle.cc:430:3
#1 0x12c35d8e in void base::Pickle::WriteBytesStatic<4ul>(void const*) ./../../base/pickle.cc:395:0
#2 0xb00ffa1 in WritePOD<int> ./../../base/pickle.h:327:5
#3 0xb00ffa1 in WriteInt ./../../base/pickle.h:190:0
#4 0xb00ffa1 in Write ./../../ipc/ipc_message_utils.h:186:0
#5 0xb00ffa1 in WriteParam<unsigned int> ./../../ipc/ipc_message_utils.h:110:0
#6 0xb00ffa1 in IPC::ParamTraits<PP_PrintSettings_Dev>::Write(base::Pickle*, PP_PrintSettings_Dev const&) ./../../ppapi/proxy/ppapi_messages.h:223:0
#7 0xd1e82ee in MessageT<true, false> ./../../ipc/ipc_message_templates.h:124:33
...
Uninitialized value was stored to memory at
#0 0xb010122 in IPC::ParamTraits<PP_PrintSettings_Dev>::Write(base::Pickle*, PP_PrintSettings_Dev const&) ./../../ppapi/proxy/ppapi_messages.h:0:1
#1 0xd1e82ee in MessageT<true, false> ./../../ipc/ipc_message_templates.h:124:33
#2 0xd1e82ee in content::PepperPrintingHost::PrintSettingsCallback(ppapi::host::ReplyMessageContext, std::__1::pair<PP_PrintSettings_Dev, int>) ./../../content/browser/renderer_host/pepper/pepper_printing_host.cc:55:0
#3 0xd1e87e2 in Invoke<const base::WeakPtr<content::PepperPrintingHost> &, const ppapi::host::ReplyMessageContext &, std::__1::pair<PP_PrintSettings_Dev, int> > ./../../base/bind_internal.h:447:12
#4 0xd1e87e2 in MakeItSo<void (content::PepperPrintingHost::*const &)(ppapi::host::ReplyMessageContext, std::__1::pair<PP_PrintSettings_Dev, int>), const base::WeakPtr<content::PepperPrintingHost> &, const ppapi::host::ReplyMessageContext &, std::__1::pair<PP_PrintSettings_Dev, int> > ./../../base/bind_internal.h:550:0
#5 0xd1e87e2 in RunImpl<void (content::PepperPrintingHost::*const &)(ppapi::host::ReplyMessageContext, std::__1::pair<PP_PrintSettings_Dev, int>), const std::__1::tuple<base::WeakPtr<content::PepperPrintingHost>, ppapi::host::ReplyMessageContext> &, 0, 1> ./../../base/bind_internal.h:604:0
#6 0xd1e87e2 in base::internal::Invoker<base::internal::BindState<void (content::PepperPrintingHost::*)(ppapi::host::ReplyMessageContext, std::__1::pair<PP_PrintSettings_Dev, int>), base::WeakPtr<content::PepperPrintingHost>, ppapi::host::ReplyMessageContext>, void (std::__1::pair<PP_PrintSettings_Dev, int>)>::Run(base::internal::BindStateBase*, std::__1::pair<PP_PrintSettings_Dev, int>&&) ./../../base/bind_internal.h:586:0
#7 0xd1e7292 in Run ./../../base/callback.h:96:12
...
Original change's description:
> Add N-up feature support to pdfium_engine.
>
> In printing, 2-up, 3-up, or more generally N-up refers to a page
> layout strategy in which multiple pages are composited onto a
> single page.
>
> 1. Added ability to pass the N-up feature UI settings (which will be
> added in the next CL) to the print preview workflow, so that the
> PDF plugin can take action based on user's input.
> 2. Added N-up feature support to pdfium_engine, so that when the
> source is PDF, pdf plugin will generate the N-up output doc based
> on user's input.
>
> Bug: 775999
> Change-Id: I27933d1a7da65376e70bdcb538393bb8bb3ec688
> Reviewed-on: https://chromium-review.googlesource.com/1014628
> Commit-Queue: Shirleen Lou <xlou@chromium.org>
> Reviewed-by: Daniel Cheng <dcheng@chromium.org>
> Reviewed-by: Jochen Eisinger <jochen@chromium.org>
> Reviewed-by: Lei Zhang <thestig@chromium.org>
> Reviewed-by: Sean Kau <skau@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#553428}
TBR=raymes@chromium.org,palmer@chromium.org,dcheng@chromium.org,thestig@chromium.org,skau@chromium.org,jochen@chromium.org,xlou@chromium.org
Change-Id: I017a6dd2527c843ebb365bf5ec2da19696860898
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 775999
Reviewed-on: https://chromium-review.googlesource.com/1027770
Reviewed-by: Henrik Boström <hbos@chromium.org>
Commit-Queue: Henrik Boström <hbos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553507}