Skip to content

Commit

Permalink
skia
Browse files Browse the repository at this point in the history
  • Loading branch information
dahlstrom-g committed Apr 30, 2024
1 parent 86ca328 commit a4fba38
Show file tree
Hide file tree
Showing 3,004 changed files with 98,172 additions and 60,004 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion cobalt/renderer/rasterizer/skia/gl_format_conversions.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include "cobalt/render_tree/image.h"
#include "cobalt/renderer/egl_and_gles.h"
#include "third_party/skia/include/gpu/GrTypes.h"
#include "third_party/skia/include/private/GrTypesPriv.h"
#include "third_party/skia/include/private/gpu/ganesh/GrTypesPriv.h"

namespace cobalt {
namespace renderer {
Expand Down
2 changes: 1 addition & 1 deletion cobalt/renderer/rasterizer/skia/hardware_image.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include "third_party/skia/include/core/SkPixelRef.h"
#include "third_party/skia/include/gpu/GrBackendSurface.h"
#include "third_party/skia/include/gpu/gl/GrGLTypes.h"
#include "third_party/skia/src/gpu/GrResourceProvider.h"
#include "third_party/skia/src/gpu/ganesh/GrResourceProvider.h"

namespace cobalt {
namespace renderer {
Expand Down
4 changes: 2 additions & 2 deletions cobalt/renderer/rasterizer/skia/hardware_rasterizer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
#include "third_party/skia/include/gpu/GrContextOptions.h"
#include "third_party/skia/include/gpu/GrDirectContext.h"
#include "third_party/skia/include/gpu/gl/GrGLInterface.h"
#include "third_party/skia/src/gpu/GrRenderTarget.h"
#include "third_party/skia/src/gpu/GrResourceProvider.h"
#include "third_party/skia/src/gpu/ganesh/GrRenderTarget.h"
#include "third_party/skia/src/gpu/ganesh/GrResourceProvider.h"

namespace {
// Some clients call Submit() multiple times with up to 2 different render
Expand Down
9 changes: 6 additions & 3 deletions cobalt/renderer/rasterizer/skia/skia/skia_sources.gni
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ sksl_sources = [
"//third_party/skia/include/sksl/DSLSymbols.h",
"//third_party/skia/include/sksl/DSLType.h",
"//third_party/skia/include/sksl/DSLVar.h",
"//third_party/skia/include/sksl/SkSLDebugTrace.h",
"//third_party/skia/include/sksl/SkSLOperator.h",
"//third_party/skia/src/sksl/SkSLAnalysis.cpp",
"//third_party/skia/src/sksl/SkSLAnalysis.h",
"//third_party/skia/src/sksl/SkSLBuiltinMap.cpp",
Expand All @@ -138,12 +138,12 @@ sksl_sources = [
"//third_party/skia/src/sksl/SkSLLexer.h",
"//third_party/skia/src/sksl/SkSLMangler.cpp",
"//third_party/skia/src/sksl/SkSLMangler.h",
"//third_party/skia/src/sksl/SkSLOperators.cpp",
"//third_party/skia/src/sksl/SkSLOperators.h",
"//third_party/skia/src/sksl/SkSLOperator.cpp",
"//third_party/skia/src/sksl/SkSLOutputStream.cpp",
"//third_party/skia/src/sksl/SkSLOutputStream.h",
"//third_party/skia/src/sksl/SkSLPool.cpp",
"//third_party/skia/src/sksl/SkSLPool.h",
"//third_party/skia/src/sksl/SkSLPosition.cpp",
"//third_party/skia/src/sksl/SkSLRehydrator.cpp",
"//third_party/skia/src/sksl/SkSLRehydrator.h",
"//third_party/skia/src/sksl/SkSLSampleUsage.cpp",
Expand All @@ -159,6 +159,7 @@ sksl_sources = [
"//third_party/skia/src/sksl/analysis/SkSLFinalizationChecks.cpp",
"//third_party/skia/src/sksl/analysis/SkSLGetLoopUnrollInfo.cpp",
"//third_party/skia/src/sksl/analysis/SkSLIsConstantExpression.cpp",
"//third_party/skia/src/sksl/analysis/SkSLIsSameExpressionTree.cpp",
"//third_party/skia/src/sksl/analysis/SkSLProgramUsage.cpp",
"//third_party/skia/src/sksl/analysis/SkSLSwitchCaseContainsExit.cpp",
"//third_party/skia/src/sksl/codegen/SkSLCodeGenerator.h",
Expand All @@ -174,6 +175,8 @@ sksl_sources = [
"//third_party/skia/src/sksl/codegen/SkSLSPIRVtoHLSL.h",
"//third_party/skia/src/sksl/codegen/SkSLVMCodeGenerator.cpp",
"//third_party/skia/src/sksl/codegen/SkSLVMCodeGenerator.h",
"//third_party/skia/src/sksl/codegen/SkSLWGSLCodeGenerator.cpp",
"//third_party/skia/src/sksl/codegen/SkSLWGSLCodeGenerator.h",
"//third_party/skia/src/sksl/dsl/DSLBlock.cpp",
"//third_party/skia/src/sksl/dsl/DSLCase.cpp",
"//third_party/skia/src/sksl/dsl/DSLCore.cpp",
Expand Down
92 changes: 84 additions & 8 deletions third_party/skia/.bazelrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# All of our clang builds should use the hermetic toolchain
build:clang --crosstool_top=//toolchain:clang_suite
build:clang --compiler=clang

# Use the default Bazel C++ toolchain to build the tools used during the build.
build:clang --host_crosstool_top=@bazel_tools//tools/cpp:toolchain
# We don't have a great way to test the host system in order to use the right
# version of the toolchain. So we need to have the user specify what their host is.
build:clang_linux --config=clang
build:clang_linux --compiler=host_is_linux_amd64

build:clang_mac --config=clang
build:clang_mac --compiler=host_is_mac_M1

# =============================================================================
# Alias to build configurations below. This makes configuring things from
Expand All @@ -15,13 +20,84 @@ build --flag_alias=include_fontmgr=//bazel/common_config_settings:include_fontmg
build --flag_alias=shaper_backend=//bazel/common_config_settings:shaper_backend
build --flag_alias=with_gl_standard=//bazel/common_config_settings:with_gl_standard

build --flag_alias=disable_effect_serialization=no//bazel/common_config_settings:enable_effect_serialization
build --flag_alias=enable_effect_serialization=//bazel/common_config_settings:enable_effect_serialization
build --flag_alias=disable_skslc=no//bazel/common_config_settings:enable_skslc
build --flag_alias=enable_skslc=//bazel/common_config_settings:enable_skslc
build --flag_alias=disable_sksl_tracing=no//bazel/common_config_settings:enable_sksl_tracing
build --flag_alias=enable_sksl_tracing=//bazel/common_config_settings:enable_sksl_tracing
build --flag_alias=disable_tracing=no//bazel/common_config_settings:enable_tracing
build --flag_alias=enable_tracing=//bazel/common_config_settings:enable_tracing
build --flag_alias=disable_vma=no//bazel/common_config_settings:use_vulkan_memory_allocator
build --flag_alias=enable_vma=//bazel/common_config_settings:use_vulkan_memory_allocator
build --flag_alias=with_icu=//bazel/common_config_settings:use_icu
build --flag_alias=with_no_icu=no//bazel/common_config_settings:use_icu
build --flag_alias=disable_tracing=//bazel/common_config_settings:disable_tracing
build --flag_alias=enable_tracing=no//bazel/common_config_settings:disable_tracing
build --flag_alias=disable_effect_serialization=//bazel/common_config_settings:disable_effect_serialization
build --flag_alias=enable_effect_serialization=no//bazel/common_config_settings:disable_effect_serialization

# CanvasKit flags
build --flag_alias=ck_enable_fonts=//modules/canvaskit:enable_fonts
build --flag_alias=ck_disable_fonts=no//modules/canvaskit:enable_fonts
build --flag_alias=ck_disable_fonts=no//modules/canvaskit:enable_fonts

# =============================================================================
# REMOTE BUILD EXECUTION
# =============================================================================

# =====
# The following was copied from https://github.com/bazelbuild/bazel-toolchains/blob/ea243d43269df23de03a797cff2347e1fc3d02bb/bazelrc/bazel-4.1.0.bazelrc
# We should be free to modify this as we see fit.
#
# Depending on how many machines are in the remote execution instance, setting
# this higher can make builds faster by allowing more jobs to run in parallel.
# Setting it too high can result in jobs that timeout, however, while waiting
# for a remote machine to execute them.
build:remote --jobs=50

# Set several flags related to specifying the platform, toolchain and java
# properties.
build:remote --java_runtime_version=rbe_jdk
build:remote --tool_java_runtime_version=rbe_jdk

build:remote --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
# Platform flags:
# The toolchain container used for execution is defined in the target indicated
# by "extra_execution_platforms", "host_platform" and "platforms".
# More about platforms: https://docs.bazel.build/versions/master/platforms.html

# Starting with Bazel 0.27.0 strategies do not need to be explicitly
# defined. See https://github.com/bazelbuild/bazel/issues/7480
build:remote --define=EXECUTOR=remote

# Enable remote execution so actions are performed on the remote systems.
build:remote --remote_executor=grpcs://remotebuildexecution.googleapis.com

# Enforce stricter environment rules, which eliminates some non-hermetic
# behavior and therefore improves both the remote cache hit rate and the
# correctness and repeatability of the build.
build:remote --incompatible_strict_action_env=true

# No compile task should take more than 180 seconds. Really long running tasks
# are probably a result of spinning up new workers.
build:remote --remote_timeout=180

# Enable authentication. This will pick up application default credentials by
# default. You can use --google_credentials=some_file.json to use a service
# account credential instead.
# See https://developers.google.com/remote-build-execution/docs/authentication
build:remote --google_default_credentials=true

# End of the copied RBE settings
#=====

# Use the RBE instance on the skia-rbe GCP project.
build:remote --remote_instance_name projects/skia-rbe/instances/default_instance

# These settings are specific to compiling on our Linux RBE workers. For example,
# Use the worker pool as specified by the gce_linux_platform platform in
# //bazel/rbe/BUILD.bazel.
build:linux-rbe --config=remote
# Use our hermetic toolchain instead of the clang in the toolchain.
build:linux-rbe --crosstool_top=//toolchain:clang_suite
# We want to run on this RBE platform
build:linux-rbe --extra_execution_platforms=//bazel/rbe:gce_linux_platform
# On the RBE instances, this Java and C++ toolchain are available
build:linux-rbe --extra_toolchains=//bazel/rbe/gce_linux/java:all
build:linux-rbe --extra_toolchains=//bazel/rbe/gce_linux/config:cc-toolchain
1 change: 1 addition & 0 deletions third_party/skia/.gn
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
buildconfig = "//gn/BUILDCONFIG.gn"
script_executable = "python3"

default_args = {
angle_standalone = false
Expand Down
1 change: 1 addition & 0 deletions third_party/skia/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ Vibe Inc <*@vibe.us>
Scene Group Ltd. <*@scenegroup.co>
LG Electronics <*@lge.com>
Shekhar Dutta <[email protected]>
ColdPaleLight <[email protected]>

# Trusted service accounts.
Recipe roller SA <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Expand Down
16 changes: 7 additions & 9 deletions third_party/skia/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# https://github.com/bazelbuild/bazel-skylib
load("@bazel_skylib//lib:selects.bzl", "selects")
load("//bazel:macros.bzl", "select_multi")
load("@bazel_gazelle//:def.bzl", "gazelle")
load("//bazel:macros.bzl", "gazelle", "select_multi", "selects")

licenses(["notice"])

package(default_visibility = ["//:__subpackages__"])

Expand Down Expand Up @@ -53,13 +52,12 @@ CORE_DEPS = [
"//src/shaders:srcs",
"//src/utils:srcs",
"//third_party:skcms",
] + selects.with_or({
# https://github.com/bazelbuild/bazel-skylib/blob/main/docs/selects_doc.md#selectswith_or
("//bazel/common_config_settings:gl_backend", "//bazel/common_config_settings:vulkan_backend"): [
"//src/gpu:srcs",
] + select({
"//bazel/common_config_settings:has_gpu_backend": [
"//src/gpu/ganesh:srcs",
"//src/sksl:srcs",
# TODO(kjlubick) should mock be test only?
"//src/gpu:mock_srcs",
"//src/gpu/ganesh:mock_srcs",
],
"//conditions:default": [],
}) + select_multi(
Expand Down
Loading

0 comments on commit a4fba38

Please sign in to comment.