BUILD.gn 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. # Copyright 2017 The Chromium Authors. All rights reserved.
  2. # Use of this source code is governed by a BSD-style license that can be
  3. # found in the LICENSE file.
  4. import("//cc/cc.gni")
  5. import("//skia/features.gni")
  6. import("//testing/libfuzzer/fuzzer_test.gni")
  7. cc_component("paint") {
  8. output_name = "cc_paint"
  9. sources = [
  10. "clear_for_opaque_raster.cc",
  11. "clear_for_opaque_raster.h",
  12. "decode_stashing_image_provider.cc",
  13. "decode_stashing_image_provider.h",
  14. "decoded_draw_image.cc",
  15. "decoded_draw_image.h",
  16. "discardable_image_map.cc",
  17. "discardable_image_map.h",
  18. "display_item_list.cc",
  19. "display_item_list.h",
  20. "draw_image.cc",
  21. "draw_image.h",
  22. "element_id.cc",
  23. "element_id.h",
  24. "filter_operation.cc",
  25. "filter_operation.h",
  26. "filter_operations.cc",
  27. "filter_operations.h",
  28. "image_analysis_state.h",
  29. "image_animation_count.h",
  30. "image_id.h",
  31. "image_provider.cc",
  32. "image_provider.h",
  33. "image_transfer_cache_entry.cc",
  34. "image_transfer_cache_entry.h",
  35. "node_id.h",
  36. "paint_cache.cc",
  37. "paint_cache.h",
  38. "paint_canvas.h",
  39. "paint_export.h",
  40. "paint_filter.cc",
  41. "paint_filter.h",
  42. "paint_flags.cc",
  43. "paint_flags.h",
  44. "paint_image.cc",
  45. "paint_image.h",
  46. "paint_image_builder.cc",
  47. "paint_image_builder.h",
  48. "paint_image_generator.cc",
  49. "paint_image_generator.h",
  50. "paint_op_buffer.cc",
  51. "paint_op_buffer.h",
  52. "paint_op_buffer_serializer.cc",
  53. "paint_op_buffer_serializer.h",
  54. "paint_op_reader.cc",
  55. "paint_op_reader.h",
  56. "paint_op_writer.cc",
  57. "paint_op_writer.h",
  58. "paint_record.cc",
  59. "paint_record.h",
  60. "paint_recorder.cc",
  61. "paint_recorder.h",
  62. "paint_shader.cc",
  63. "paint_shader.h",
  64. "paint_worklet_input.cc",
  65. "paint_worklet_input.h",
  66. "paint_worklet_job.cc",
  67. "paint_worklet_job.h",
  68. "paint_worklet_layer_painter.h",
  69. "raw_memory_transfer_cache_entry.cc",
  70. "raw_memory_transfer_cache_entry.h",
  71. "record_paint_canvas.cc",
  72. "record_paint_canvas.h",
  73. "render_surface_filters.cc",
  74. "render_surface_filters.h",
  75. "scoped_raster_flags.cc",
  76. "scoped_raster_flags.h",
  77. "shader_transfer_cache_entry.cc",
  78. "shader_transfer_cache_entry.h",
  79. "skia_paint_canvas.cc",
  80. "skia_paint_canvas.h",
  81. "skia_paint_image_generator.cc",
  82. "skia_paint_image_generator.h",
  83. "skottie_color_map.h",
  84. "skottie_frame_data.cc",
  85. "skottie_frame_data.h",
  86. "skottie_frame_data_provider.h",
  87. "skottie_marker.h",
  88. "skottie_resource_metadata.cc",
  89. "skottie_resource_metadata.h",
  90. "skottie_serialization_history.cc",
  91. "skottie_serialization_history.h",
  92. "skottie_text_property_value.cc",
  93. "skottie_text_property_value.h",
  94. "skottie_transfer_cache_entry.cc",
  95. "skottie_transfer_cache_entry.h",
  96. "skottie_transform_property_value.cc",
  97. "skottie_transform_property_value.h",
  98. "skottie_wrapper.cc",
  99. "skottie_wrapper.h",
  100. "solid_color_analyzer.cc",
  101. "solid_color_analyzer.h",
  102. "target_color_params.cc",
  103. "target_color_params.h",
  104. "texture_backing.h",
  105. "transfer_cache_deserialize_helper.h",
  106. "transfer_cache_entry.cc",
  107. "transfer_cache_entry.h",
  108. "transfer_cache_serialize_helper.cc",
  109. "transfer_cache_serialize_helper.h",
  110. ]
  111. defines = [ "CC_PAINT_IMPLEMENTATION=1" ]
  112. # cc/paint is intended to be a separate component from cc that can be
  113. # included in Blink. This component should never publicly include
  114. # anything that Blink core wouldn't include (e.g. base).
  115. public_deps = [
  116. "//cc/base",
  117. "//cc/debug",
  118. "//skia",
  119. "//skia:skcms",
  120. "//third_party/abseil-cpp:absl",
  121. "//ui/gfx:color_space",
  122. "//ui/gfx/geometry",
  123. "//ui/gfx/geometry:geometry_skia",
  124. ]
  125. deps = [
  126. "//base",
  127. "//components/crash/core/common:crash_key",
  128. "//gpu/command_buffer/common:mailbox",
  129. "//ui/gfx/animation",
  130. "//ui/gfx/ipc/color",
  131. ]
  132. if (skia_support_skottie) {
  133. # All source files that depend on the actual Skottie module within Skia
  134. # should go here. If a source file is Skottie-related but depends only on
  135. # Chromium and/or "common" Skia dependencies, it is fine to include that
  136. # in the main "sources" list. Note that ultimately, all dependencies on
  137. # the Skottie library should be contained in some way/shape/form within
  138. # skottie_wrapper_impl.cc
  139. sources += [
  140. "skottie_mru_resource_provider.cc",
  141. "skottie_mru_resource_provider.h",
  142. "skottie_wrapper_impl.cc",
  143. ]
  144. } else {
  145. sources += [ "skottie_wrapper_stub.cc" ]
  146. }
  147. }
  148. fuzzer_test("paint_op_buffer_fuzzer") {
  149. sources = [ "paint_op_buffer_fuzzer.cc" ]
  150. libfuzzer_options = [ "max_len=4096" ]
  151. deps = [
  152. "//base/test:test_support",
  153. "//cc:test_support",
  154. "//cc/paint",
  155. "//components/viz/test:test_support",
  156. "//gpu/command_buffer/service:gles2",
  157. ]
  158. }
  159. fuzzer_test("transfer_cache_fuzzer") {
  160. sources = [ "transfer_cache_fuzzer.cc" ]
  161. libfuzzer_options = [ "max_len=4096" ]
  162. deps = [
  163. "//cc:test_support",
  164. "//cc/paint",
  165. "//components/viz/test:test_support",
  166. ]
  167. }