| # Copyright 2021 The Cobalt Authors. All Rights Reserved. |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| static_library("png_utils") { |
| sources = [ |
| "png_decode.cc", |
| "png_decode.h", |
| "png_encode.cc", |
| "png_encode.h", |
| ] |
| |
| configs -= [ "//starboard/build/config:size" ] |
| configs += [ "//starboard/build/config:speed" ] |
| |
| deps = [ |
| "//base", |
| "//cobalt/render_tree", |
| "//third_party/libpng", |
| ] |
| } |
| |
| target(gtest_target_type, "png_utils_test") { |
| testonly = true |
| |
| sources = [ "png_decode_test.cc" ] |
| |
| configs -= [ "//starboard/build/config:size" ] |
| configs += [ "//starboard/build/config:speed" ] |
| |
| deps = [ |
| ":png_utils", |
| ":png_utils_copy_test_data", |
| "//cobalt/base", |
| "//cobalt/test:run_all_unittests", |
| "//testing/gmock", |
| "//testing/gtest", |
| ] |
| } |
| |
| copy("png_utils_copy_test_data") { |
| sources = [ |
| "png_benchmark_image.png", |
| "png_premultiplied_alpha_test_image.png", |
| ] |
| subdir = "test/png_utils" |
| outputs = [ |
| "$sb_static_contents_output_data_dir/test/$subdir/{{source_file_part}}", |
| ] |
| } |