skia2/include/utils/BUILD.bazel

191 lines
4.9 KiB
Python
Raw Normal View History

load("//bazel:macros.bzl", "exports_files_legacy", "generated_cc_atom")
exports_files_legacy()
licenses(["notice"])
generated_cc_atom(
name = "SkAnimCodecPlayer_hdr",
hdrs = ["SkAnimCodecPlayer.h"],
visibility = ["//:__subpackages__"],
deps = [
"//include/codec:SkCodec_hdr",
"//include/core:SkImageInfo_hdr",
"//include/core:SkRefCnt_hdr",
"//include/core:SkSize_hdr",
],
)
generated_cc_atom(
name = "SkBase64_hdr",
hdrs = ["SkBase64.h"],
visibility = ["//:__subpackages__"],
deps = ["//include/core:SkTypes_hdr"],
)
Revert "Move SkCamera.h to client_utils/android" This reverts commit 8a54d86c780a22796f8d535f74bf6af33a06c707. Reason for revert: Causing issues with Android CTS Original change's description: > Move SkCamera.h to client_utils/android > > Android still uses this > https://developer.android.com/reference/android/graphics/Camera > but no other client does. > > This adds a little adaption layer until Android is updated > to use the View3D version. > > Move SkCamera.h to View3D.h. Change names to android::skia::CLASS > instead of SkCLASS. (3DView is not a valid class name, so rename it to > View3D.) > > Forward-declare SkMatrix. Do not override SkNoncopyable - just delete > the copy constructor/operator=. Make fU and fV private in Patch3D. > > Make Sk3DView override View3D temporarily until Android can be switched > over to the new class. > > (View3D from http://review.skia.org/291371) > > I made Patch3D and Camera3D be private classes as they are > currently not used by Android and wanted to constrain the > exposed API as much as possible. > > Change-Id: Ibde45478421feeb610e045205c3f20c0e5b1567e > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532456 > Reviewed-by: Brian Osman <brianosman@google.com> > Reviewed-by: Leon Scroggins <scroggo@google.com> > Commit-Queue: Kevin Lubick <kjlubick@google.com> Change-Id: If6e768524a0e13e14ef886a6f081a09ddc0dc2fd Reviewed-on: https://skia-review.googlesource.com/c/skia/+/533396 Owners-Override: Kevin Lubick <kjlubick@google.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-04-25 11:54:10 +00:00
generated_cc_atom(
name = "SkCamera_hdr",
hdrs = ["SkCamera.h"],
visibility = ["//:__subpackages__"],
deps = [
"//include/core:SkM44_hdr",
"//include/core:SkMatrix_hdr",
"//include/core:SkScalar_hdr",
"//include/core:SkTypes_hdr",
Revert "Move SkCamera.h to client_utils/android" This reverts commit 8a54d86c780a22796f8d535f74bf6af33a06c707. Reason for revert: Causing issues with Android CTS Original change's description: > Move SkCamera.h to client_utils/android > > Android still uses this > https://developer.android.com/reference/android/graphics/Camera > but no other client does. > > This adds a little adaption layer until Android is updated > to use the View3D version. > > Move SkCamera.h to View3D.h. Change names to android::skia::CLASS > instead of SkCLASS. (3DView is not a valid class name, so rename it to > View3D.) > > Forward-declare SkMatrix. Do not override SkNoncopyable - just delete > the copy constructor/operator=. Make fU and fV private in Patch3D. > > Make Sk3DView override View3D temporarily until Android can be switched > over to the new class. > > (View3D from http://review.skia.org/291371) > > I made Patch3D and Camera3D be private classes as they are > currently not used by Android and wanted to constrain the > exposed API as much as possible. > > Change-Id: Ibde45478421feeb610e045205c3f20c0e5b1567e > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532456 > Reviewed-by: Brian Osman <brianosman@google.com> > Reviewed-by: Leon Scroggins <scroggo@google.com> > Commit-Queue: Kevin Lubick <kjlubick@google.com> Change-Id: If6e768524a0e13e14ef886a6f081a09ddc0dc2fd Reviewed-on: https://skia-review.googlesource.com/c/skia/+/533396 Owners-Override: Kevin Lubick <kjlubick@google.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-04-25 11:54:10 +00:00
"//include/private:SkNoncopyable_hdr",
],
)
generated_cc_atom(
name = "SkCanvasStateUtils_hdr",
hdrs = ["SkCanvasStateUtils.h"],
visibility = ["//:__subpackages__"],
deps = ["//include/core:SkTypes_hdr"],
)
generated_cc_atom(
name = "SkCustomTypeface_hdr",
hdrs = ["SkCustomTypeface.h"],
visibility = ["//:__subpackages__"],
deps = [
"//include/core:SkFontMetrics_hdr",
"//include/core:SkFontStyle_hdr",
"//include/core:SkPath_hdr",
"//include/core:SkRefCnt_hdr",
"//include/core:SkTypes_hdr",
],
)
generated_cc_atom(
name = "SkEventTracer_hdr",
hdrs = ["SkEventTracer.h"],
visibility = ["//:__subpackages__"],
deps = ["//include/core:SkTypes_hdr"],
)
generated_cc_atom(
name = "SkNWayCanvas_hdr",
hdrs = ["SkNWayCanvas.h"],
visibility = ["//:__subpackages__"],
deps = [
":SkNoDrawCanvas_hdr",
"//include/core:SkBlendMode_hdr",
"//include/core:SkCanvasVirtualEnforcer_hdr",
"//include/core:SkCanvas_hdr",
"//include/core:SkClipOp_hdr",
"//include/core:SkColor_hdr",
"//include/core:SkM44_hdr",
"//include/core:SkRefCnt_hdr",
"//include/core:SkSamplingOptions_hdr",
"//include/core:SkScalar_hdr",
"//include/core:SkTypes_hdr",
"//include/private:SkTDArray_hdr",
],
)
generated_cc_atom(
name = "SkNoDrawCanvas_hdr",
hdrs = ["SkNoDrawCanvas.h"],
visibility = ["//:__subpackages__"],
deps = [
"//include/core:SkCanvasVirtualEnforcer_hdr",
"//include/core:SkCanvas_hdr",
],
)
generated_cc_atom(
name = "SkNullCanvas_hdr",
hdrs = ["SkNullCanvas.h"],
visibility = ["//:__subpackages__"],
deps = ["//include/core:SkTypes_hdr"],
)
generated_cc_atom(
name = "SkOrderedFontMgr_hdr",
hdrs = ["SkOrderedFontMgr.h"],
visibility = ["//:__subpackages__"],
deps = [
"//include/core:SkFontMgr_hdr",
"//include/core:SkRefCnt_hdr",
"//include/core:SkTypes_hdr",
],
)
generated_cc_atom(
name = "SkPaintFilterCanvas_hdr",
hdrs = ["SkPaintFilterCanvas.h"],
visibility = ["//:__subpackages__"],
deps = [
":SkNWayCanvas_hdr",
"//include/core:SkBlendMode_hdr",
"//include/core:SkCanvasVirtualEnforcer_hdr",
"//include/core:SkCanvas_hdr",
"//include/core:SkColor_hdr",
"//include/core:SkImageInfo_hdr",
"//include/core:SkRefCnt_hdr",
"//include/core:SkSamplingOptions_hdr",
"//include/core:SkScalar_hdr",
"//include/core:SkSize_hdr",
"//include/core:SkTypes_hdr",
"//include/private:SkTDArray_hdr",
],
)
generated_cc_atom(
name = "SkParsePath_hdr",
hdrs = ["SkParsePath.h"],
visibility = ["//:__subpackages__"],
deps = ["//include/core:SkPath_hdr"],
)
generated_cc_atom(
name = "SkParse_hdr",
hdrs = ["SkParse.h"],
visibility = ["//:__subpackages__"],
deps = [
"//include/core:SkColor_hdr",
"//include/core:SkScalar_hdr",
"//include/core:SkTypes_hdr",
],
)
generated_cc_atom(
name = "SkRandom_hdr",
hdrs = ["SkRandom.h"],
visibility = ["//:__subpackages__"],
deps = [
"//include/core:SkScalar_hdr",
"//include/private:SkFixed_hdr",
"//include/private:SkFloatBits_hdr",
],
)
generated_cc_atom(
name = "SkShadowUtils_hdr",
hdrs = ["SkShadowUtils.h"],
visibility = ["//:__subpackages__"],
deps = [
"//include/core:SkColor_hdr",
"//include/core:SkScalar_hdr",
"//include/core:SkTypes_hdr",
"//include/private:SkShadowFlags_hdr",
[infra] Add initial Bazel rules and files These rules can be used to build our GMs on WASM+WebGL and libskia.a with just the CPU backend (and most other features turned off). This can be done with the following commands: - bazel build //modules/canvaskit:gm-bindings-wasm --gpu_backend=gl_backend --with_gl_standard=webgl_standard - bazel build :skia-core --config clang This pivots slightly from http://review.skia.org/463517 by using config_settings [1] instead of platforms for the optional features that we control. This pivot was suggested in [2] We have BUILD.bazel files in many of the subdirectories that specify filegroups for the appropriate files. In an effort to make //BUILD.bazel more readable, it is the responsibility of these subfolders to deal with conditionally including certain .h or .cpp files. This is done using select statements and config_settings or platform constraints as necessary. For example, src/gpu/BUILD.bazel will different private filegroups for each of the supported gpu backends [3] and a more-visible filegroup called "srcs" that has the right selection of the private files to be used for compilation. An effort has been made to avoid using glob() in our BUILD.bazel files. These file lists were made by using `ls -1` and some regex to add in quotes. We might want to make a helper script to assist with that, if necessary. To specify which options we have, the settings in //bazel/common_config_settings/BUILD.bazel have been redesigned. They make use of a macro `string_flag_with_values` that removes the boilerplate. Patchset 36 shows what the file looks like w/o the macro. The top level BUILD.bazel file will still need to use some logic to handle defines, because local_defines is a list of strings, not a list of labels [4]. Suggested Review Order: - WORKSPACE.bazel to see the new dependencies on the emsdk toolchain and bazel_skylib - bazel/common_config_settings/* to see the few settings defined (we have more to define, see BUILD.gn and //gn/skia.gni for ideas) - BUILD.bazel to see the "skia-core" cc_library rule. See also "gms" and "tests" - modules/canvaskit/BUILD.bazel to see the use of the emscripten "wasm_cc_binary" rule, which depends on the "skia-core", "gms", and "tests" rule. Note that it only builds some of the gms as a proof of concept. - The other BUILD.bazel files. Some of these are not platform or feature dependent (e.g. pathops). Others are (e.g. gpu). - All other files. [1] https://docs.bazel.build/versions/4.2.1/skylark/config.html#user-defined-build-settings [2] https://github.com/emscripten-core/emsdk/pull/920 [3] In this CL, that's just the webgl one. [4] https://docs.bazel.build/versions/main/be/c-cpp.html#cc_library.local_defines Change-Id: Ieecf9c106d5e3a6ae97d13d66be06b4b3c207089 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/458637 Reviewed-by: Ben Wagner <bungeman@google.com> Reviewed-by: Leandro Lovisolo <lovisolo@google.com> Owners-Override: Kevin Lubick <kjlubick@google.com>
2021-11-08 20:26:09 +00:00
],
)
generated_cc_atom(
name = "SkTextUtils_hdr",
hdrs = ["SkTextUtils.h"],
visibility = ["//:__subpackages__"],
deps = [
"//include/core:SkFontTypes_hdr",
"//include/core:SkScalar_hdr",
"//include/core:SkTypes_hdr",
],
)
generated_cc_atom(
name = "SkTraceEventPhase_hdr",
hdrs = ["SkTraceEventPhase.h"],
visibility = ["//:__subpackages__"],
)