android_webview
apps
ash
base
build
build_overrides
buildtools
cc
chrome
chromecast
chromeos
codelabs
components
content
courgette
crypto
dbus
device
docs
extensions
fuchsia_web
gin
google_apis
google_update
gpu
headless
infra
ios
ipc
media
mojo
native_client_sdk
net
pdf
ppapi
api
buildflags
c
cpp
examples
generators
host
lib
nacl_irt
native_client
proxy
shared_impl
private
BUILD.gn
DEPS
README.txt
api_id.h
array_var.cc
array_var.h
array_writer.cc
array_writer.h
callback_tracker.cc
callback_tracker.h
dictionary_var.cc
dictionary_var.h
dir_contents.h
file_growth.cc
file_growth.h
file_io_state_manager.cc
file_io_state_manager.h
file_path.cc
file_path.h
file_ref_create_info.cc
file_ref_create_info.h
file_ref_util.cc
file_ref_util.h
file_system_util.cc
file_system_util.h
file_type_conversion.cc
file_type_conversion.h
host_resource.cc
host_resource.h
id_assignment.cc
id_assignment.h
media_stream_audio_track_shared.cc
media_stream_audio_track_shared.h
media_stream_audio_track_shared_unittest.cc
media_stream_buffer.h
media_stream_buffer_manager.cc
media_stream_buffer_manager.h
media_stream_buffer_manager_unittest.cc
media_stream_video_track_shared.cc
media_stream_video_track_shared.h
media_stream_video_track_shared_unittest.cc
platform_file.cc
platform_file.h
ppapi_globals.cc
ppapi_globals.h
ppapi_nacl_plugin_args.cc
ppapi_nacl_plugin_args.h
ppapi_permissions.cc
ppapi_permissions.h
ppapi_preferences.cc
ppapi_preferences.h
ppapi_shared_export.h
ppapi_switches.cc
ppapi_switches.h
ppb_audio_config_shared.cc
ppb_audio_config_shared.h
ppb_audio_shared.cc
ppb_audio_shared.h
ppb_crypto_shared.cc
ppb_device_ref_shared.cc
ppb_device_ref_shared.h
ppb_gamepad_shared.cc
ppb_gamepad_shared.h
ppb_graphics_3d_shared.cc
ppb_graphics_3d_shared.h
ppb_image_data_shared.cc
ppb_image_data_shared.h
ppb_input_event_shared.cc
ppb_input_event_shared.h
ppb_instance_shared.cc
ppb_instance_shared.h
ppb_memory_shared.cc
ppb_message_loop_shared.cc
ppb_message_loop_shared.h
ppb_opengles2_shared.cc
ppb_opengles2_shared.h
ppb_tcp_socket_shared.cc
ppb_tcp_socket_shared.h
ppb_trace_event_impl.cc
ppb_trace_event_impl.h
ppb_url_util_shared.cc
ppb_url_util_shared.h
ppb_var_shared.cc
ppb_var_shared.h
ppb_video_decoder_shared.cc
ppb_video_decoder_shared.h
ppb_view_shared.cc
ppb_view_shared.h
ppp_instance_combined.cc
ppp_instance_combined.h
proxy_lock.cc
proxy_lock.h
proxy_lock_unittest.cc
resource.cc
resource.h
resource_tracker.cc
resource_tracker.h
resource_tracker_unittest.cc
resource_var.cc
resource_var.h
scoped_pp_resource.cc
scoped_pp_resource.h
scoped_pp_var.cc
scoped_pp_var.h
singleton_resource_id.h
socket_option_data.cc
socket_option_data.h
test_globals.cc
test_globals.h
test_utils.cc
test_utils.h
thread_aware_callback.cc
thread_aware_callback.h
thread_aware_callback_unittest.cc
time_conversion.cc
time_conversion.h
time_conversion_unittest.cc
tracked_callback.cc
tracked_callback.h
url_request_info_data.cc
url_request_info_data.h
url_response_info_data.cc
url_response_info_data.h
var.cc
var.h
var_tracker.cc
var_tracker.h
var_tracker_unittest.cc
vpn_provider_util.cc
vpn_provider_util.h
tests
thunk
tools
utility
BUILD.gn
DEPS
DIR_METADATA
LICENSE
OWNERS
PRESUBMIT.py
generate_ppapi_include_tests.py
generate_ppapi_size_checks.py
printing
remoting
rlz
sandbox
services
skia
sql
storage
styleguide
testing
third_party
tools
ui
url
weblayer
.clang-format
.clang-tidy
.eslintrc.js
.git-blame-ignore-revs
.gitattributes
.gitignore
.gn
.mailmap
.rustfmt.toml
.vpython3
.yapfignore
ATL_OWNERS
AUTHORS
BUILD.gn
CODE_OF_CONDUCT.md
DEPS
DIR_METADATA
LICENSE
LICENSE.chromium_os
OWNERS
PRESUBMIT.py
PRESUBMIT_test.py
PRESUBMIT_test_mocks.py
README.md
WATCHLISTS
codereview.settings

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}
277 lines
6.4 KiB
Plaintext
277 lines
6.4 KiB
Plaintext
# Copyright 2015 The Chromium Authors
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
import("//build/config/nacl/config.gni")
|
|
import("//components/nacl/toolchain.gni")
|
|
import("//ppapi/buildflags/buildflags.gni")
|
|
|
|
assert(enable_ppapi)
|
|
|
|
# //ppapi/shared_impl and //ppapi/thunk go into the same library.
|
|
config("export_shared_impl_and_thunk") {
|
|
visibility = [
|
|
":*",
|
|
"//ppapi/thunk:*",
|
|
]
|
|
defines = [
|
|
"PPAPI_SHARED_IMPLEMENTATION",
|
|
"PPAPI_THUNK_IMPLEMENTATION",
|
|
]
|
|
}
|
|
|
|
source_set("headers") {
|
|
visibility = [
|
|
":*",
|
|
"//ppapi/thunk:*",
|
|
]
|
|
|
|
sources = [
|
|
"host_resource.h",
|
|
"ppapi_globals.h",
|
|
"proxy_lock.h",
|
|
"resource.h",
|
|
]
|
|
|
|
configs += [ ":export_shared_impl_and_thunk" ]
|
|
|
|
deps = [
|
|
"//base",
|
|
"//ppapi/c/",
|
|
]
|
|
}
|
|
|
|
# This contains the things that //ppapi/thunk needs.
|
|
source_set("common") {
|
|
visibility = [
|
|
":*",
|
|
"//ppapi/thunk:*",
|
|
]
|
|
|
|
sources = [
|
|
"array_var.cc",
|
|
"array_var.h",
|
|
"callback_tracker.cc",
|
|
"callback_tracker.h",
|
|
"dictionary_var.cc",
|
|
"dictionary_var.h",
|
|
"file_ref_create_info.cc",
|
|
"file_ref_create_info.h",
|
|
"host_resource.cc",
|
|
"id_assignment.cc",
|
|
"id_assignment.h",
|
|
"ppapi_globals.cc",
|
|
"ppb_audio_config_shared.cc",
|
|
"ppb_audio_config_shared.h",
|
|
"ppb_device_ref_shared.cc",
|
|
"ppb_device_ref_shared.h",
|
|
"ppb_image_data_shared.cc",
|
|
"ppb_image_data_shared.h",
|
|
"ppb_message_loop_shared.cc",
|
|
"ppb_message_loop_shared.h",
|
|
"proxy_lock.cc",
|
|
"resource.cc",
|
|
"resource_tracker.cc",
|
|
"resource_tracker.h",
|
|
"resource_var.cc",
|
|
"resource_var.h",
|
|
"scoped_pp_var.cc",
|
|
"scoped_pp_var.h",
|
|
"tracked_callback.cc",
|
|
"tracked_callback.h",
|
|
"url_response_info_data.cc",
|
|
"url_response_info_data.h",
|
|
"var.cc",
|
|
"var.h",
|
|
"var_tracker.cc",
|
|
"var_tracker.h",
|
|
]
|
|
|
|
if (!is_nacl) {
|
|
sources += [
|
|
"ppb_url_util_shared.cc",
|
|
"ppb_url_util_shared.h",
|
|
"private/ppb_char_set_shared.cc",
|
|
"private/ppb_char_set_shared.h",
|
|
]
|
|
}
|
|
|
|
configs += [ ":export_shared_impl_and_thunk" ]
|
|
|
|
public_deps = [ ":headers" ]
|
|
|
|
deps = [
|
|
"//base",
|
|
"//base:i18n",
|
|
"//build:chromeos_buildflags",
|
|
"//components/nacl/common:buildflags",
|
|
"//ppapi/c",
|
|
"//ppapi/thunk:headers",
|
|
"//third_party/icu:icuuc",
|
|
"//url",
|
|
]
|
|
|
|
if (!is_nacl && !is_minimal_toolchain) {
|
|
deps += [ "//skia" ]
|
|
}
|
|
}
|
|
|
|
component("shared_impl") {
|
|
output_name = "ppapi_shared"
|
|
|
|
sources = [
|
|
"array_writer.cc",
|
|
"array_writer.h",
|
|
"file_growth.cc",
|
|
"file_growth.h",
|
|
"file_io_state_manager.cc",
|
|
"file_io_state_manager.h",
|
|
"file_path.cc",
|
|
"file_path.h",
|
|
"file_ref_util.cc",
|
|
"file_ref_util.h",
|
|
"file_system_util.cc",
|
|
"file_system_util.h",
|
|
"file_type_conversion.cc",
|
|
"file_type_conversion.h",
|
|
"media_stream_audio_track_shared.cc",
|
|
"media_stream_audio_track_shared.h",
|
|
"media_stream_buffer.h",
|
|
"media_stream_buffer_manager.cc",
|
|
"media_stream_buffer_manager.h",
|
|
"media_stream_video_track_shared.cc",
|
|
"media_stream_video_track_shared.h",
|
|
"platform_file.cc",
|
|
"platform_file.h",
|
|
"ppapi_nacl_plugin_args.cc",
|
|
"ppapi_nacl_plugin_args.h",
|
|
"ppapi_permissions.cc",
|
|
"ppapi_permissions.h",
|
|
"ppapi_preferences.cc",
|
|
"ppapi_preferences.h",
|
|
"ppapi_switches.cc",
|
|
"ppapi_switches.h",
|
|
"ppb_audio_shared.cc",
|
|
"ppb_audio_shared.h",
|
|
"ppb_crypto_shared.cc",
|
|
"ppb_gamepad_shared.cc",
|
|
"ppb_gamepad_shared.h",
|
|
"ppb_graphics_3d_shared.cc",
|
|
"ppb_graphics_3d_shared.h",
|
|
"ppb_input_event_shared.cc",
|
|
"ppb_input_event_shared.h",
|
|
"ppb_instance_shared.cc",
|
|
"ppb_instance_shared.h",
|
|
"ppb_memory_shared.cc",
|
|
"ppb_opengles2_shared.cc",
|
|
"ppb_opengles2_shared.h",
|
|
"ppb_tcp_socket_shared.cc",
|
|
"ppb_tcp_socket_shared.h",
|
|
"ppb_trace_event_impl.cc",
|
|
"ppb_trace_event_impl.h",
|
|
"ppb_var_shared.cc",
|
|
"ppb_var_shared.h",
|
|
"ppb_view_shared.cc",
|
|
"ppb_view_shared.h",
|
|
"ppp_instance_combined.cc",
|
|
"ppp_instance_combined.h",
|
|
"scoped_pp_resource.cc",
|
|
"scoped_pp_resource.h",
|
|
"socket_option_data.cc",
|
|
"socket_option_data.h",
|
|
"thread_aware_callback.cc",
|
|
"thread_aware_callback.h",
|
|
"time_conversion.cc",
|
|
"time_conversion.h",
|
|
"url_request_info_data.cc",
|
|
"url_request_info_data.h",
|
|
"vpn_provider_util.cc",
|
|
"vpn_provider_util.h",
|
|
|
|
# TODO(viettrungluu): Split these out; it won"t be used in NaCl.
|
|
"private/net_address_private_impl.cc",
|
|
"private/net_address_private_impl.h",
|
|
"private/net_address_private_impl_constants.cc",
|
|
"private/ppb_x509_certificate_private_shared.cc",
|
|
"private/ppb_x509_certificate_private_shared.h",
|
|
]
|
|
|
|
# This condition is catching the build of nacl64.exe, which is built
|
|
# in the 64-bit toolchain when the overall build is 32-bit.
|
|
# See also //ppapi/thunk
|
|
if (is_win && target_cpu == "x86" && current_cpu == "x64") {
|
|
sources -= [
|
|
"ppb_audio_shared.cc",
|
|
"ppb_graphics_3d_shared.cc",
|
|
"ppb_opengles2_shared.cc",
|
|
"private/net_address_private_impl.cc",
|
|
]
|
|
}
|
|
|
|
configs += [
|
|
":export_shared_impl_and_thunk",
|
|
"//build/config:precompiled_headers",
|
|
]
|
|
|
|
public_deps = [
|
|
":common",
|
|
"//base",
|
|
"//ppapi/c",
|
|
"//ppapi/thunk",
|
|
]
|
|
|
|
deps = [
|
|
"//base/third_party/dynamic_annotations",
|
|
"//build:chromeos_buildflags",
|
|
"//components/nacl/common:buildflags",
|
|
"//device/gamepad/public/cpp:shared_with_blink",
|
|
"//gpu/command_buffer/client",
|
|
"//gpu/command_buffer/client:gles2_cmd_helper",
|
|
"//gpu/command_buffer/client:gles2_implementation",
|
|
"//gpu/command_buffer/common",
|
|
"//ipc",
|
|
"//media:shared_memory_support",
|
|
"//ui/gfx:gfx_switches",
|
|
]
|
|
|
|
if (!is_nacl && !is_minimal_toolchain) {
|
|
sources += [
|
|
"ppb_video_decoder_shared.cc",
|
|
"ppb_video_decoder_shared.h",
|
|
"private/ppb_x509_util_shared.cc",
|
|
"private/ppb_x509_util_shared.h",
|
|
]
|
|
|
|
deps += [
|
|
"//net",
|
|
"//ui/events:events_base",
|
|
"//ui/surface",
|
|
]
|
|
}
|
|
|
|
if (is_mac) {
|
|
frameworks = [ "QuartzCore.framework" ]
|
|
}
|
|
}
|
|
|
|
static_library("test_support") {
|
|
testonly = true
|
|
|
|
sources = [
|
|
"test_globals.cc",
|
|
"test_globals.h",
|
|
"test_utils.cc",
|
|
"test_utils.h",
|
|
]
|
|
|
|
public_deps = [ "//ppapi/shared_impl" ]
|
|
deps = [
|
|
"//base/test:test_support",
|
|
"//ipc",
|
|
"//ipc:test_support",
|
|
"//ppapi/proxy",
|
|
"//testing/gmock",
|
|
"//testing/gtest",
|
|
]
|
|
}
|