# https://github.com/bazelbuild/bazel-skylib load("@bazel_skylib//lib:selects.bzl", "selects") load("//bazel:macros.bzl", "select_multi") package(default_visibility = ["//visibility:private"]) filegroup( name = "androidcodec-srcs", srcs = [ "SkAndroidCodec.cpp", "SkAndroidCodecAdapter.cpp", "SkAndroidCodecAdapter.h", "SkSampledCodec.cpp", "SkSampledCodec.h", ], ) filegroup( name = "bmp-srcs", srcs = [ "SkBmpBaseCodec.cpp", "SkBmpBaseCodec.h", "SkBmpCodec.cpp", "SkBmpCodec.h", "SkBmpMaskCodec.cpp", "SkBmpMaskCodec.h", "SkBmpRLECodec.cpp", "SkBmpRLECodec.h", "SkBmpStandardCodec.cpp", "SkBmpStandardCodec.h", "SkWbmpCodec.cpp", "SkWbmpCodec.h", ], ) filegroup( name = "core-srcs", srcs = [ "SkCodec.cpp", "SkCodecImageGenerator.cpp", "SkCodecImageGenerator.h", "SkCodecPriv.h", "SkColorTable.cpp", "SkColorTable.h", "SkFrameHolder.h", "SkMaskSwizzler.cpp", "SkMaskSwizzler.h", "SkMasks.cpp", "SkMasks.h", "SkSampler.cpp", "SkSampler.h", "SkSwizzler.cpp", "SkSwizzler.h", ], ) filegroup( name = "gif-srcs", srcs = [ "SkScalingCodec.h", "SkWuffsCodec.cpp", "SkWuffsCodec.h", ], ) filegroup( name = "jpeg-srcs", srcs = [ "SkEncodedInfo.cpp", "SkJpegCodec.cpp", "SkJpegCodec.h", "SkJpegDecoderMgr.cpp", "SkJpegDecoderMgr.h", "SkJpegPriv.h", "SkJpegUtility.cpp", "SkJpegUtility.h", "SkParseEncodedOrigin.cpp", "SkParseEncodedOrigin.h", ], ) filegroup( name = "png-srcs", srcs = [ "SkEncodedInfo.cpp", "SkIcoCodec.cpp", "SkIcoCodec.h", "SkPngCodec.cpp", "SkPngCodec.h", "SkPngPriv.h", ], ) filegroup( name = "raw-srcs", srcs = [ "SkRawCodec.cpp", "SkRawCodec.h", ], ) filegroup( name = "webp-srcs", srcs = [ "SkEncodedInfo.cpp", "SkParseEncodedOrigin.cpp", "SkParseEncodedOrigin.h", "SkScalingCodec.h", "SkWebpCodec.cpp", "SkWebpCodec.h", ], ) filegroup( name = "srcs", srcs = [ ":androidcodec-srcs", ":bmp-srcs", ":core-srcs", ] + select_multi( { "//bazel/common_config_settings:gif_codec": [":gif-srcs"], "//bazel/common_config_settings:png_codec": [":png-srcs"], "//bazel/common_config_settings:raw_codec": [":raw-srcs"], "//bazel/common_config_settings:webp_codec": [":webp-srcs"], }, default = [], ) + selects.with_or({ # The RAW codec depends on JPEG, but we cannot list jpeg twice in the above list, or # Bazel gets sad. ("//bazel/common_config_settings:jpeg_codec", "//bazel/common_config_settings:raw_codec"): [":jpeg-srcs"], "//conditions:default": [], }), visibility = ["//:__subpackages__"], )