1 #pragma once 2 3 4 5 #ifdef __cplusplus 6 7 #include <memory> 8 9 namespace com::android::graphics::hwui::flags { 10 11 class flag_provider_interface { 12 public: 13 virtual ~flag_provider_interface() = default; 14 virtual bool animate_hdr_transitions() = 0; 15 virtual bool animated_image_drawable_filter_bitmap() = 0; 16 virtual bool bitmap_ashmem_long_name() = 0; 17 virtual bool clip_shader() = 0; 18 virtual bool clip_surfaceviews() = 0; 19 virtual bool draw_region() = 0; 20 virtual bool gainmap_animations() = 0; 21 virtual bool gainmap_constructor_with_metadata() = 0; 22 virtual bool hdr_10bit_plus() = 0; 23 virtual bool high_contrast_text_luminance() = 0; 24 virtual bool high_contrast_text_small_text_rect() = 0; 25 virtual bool initialize_gl_always() = 0; 26 virtual bool iso_gainmap_apis() = 0; 27 virtual bool limited_hdr() = 0; 28 virtual bool matrix_44() = 0; 29 virtual bool query_global_priority() = 0; 30 virtual bool remove_vri_sketchy_destroy() = 0; 31 virtual bool requested_formats_v() = 0; 32 virtual bool resample_gainmap_regions() = 0; 33 virtual bool runtime_color_filters_blenders() = 0; 34 virtual bool skip_eglmanager_telemetry() = 0; 35 }; 36 37 extern std::unique_ptr<flag_provider_interface> provider_; 38 39 animate_hdr_transitions()40inline bool animate_hdr_transitions() { 41 return true; 42 } animated_image_drawable_filter_bitmap()43inline bool animated_image_drawable_filter_bitmap() { 44 return false; 45 } bitmap_ashmem_long_name()46inline bool bitmap_ashmem_long_name() { 47 return false; 48 } clip_shader()49inline bool clip_shader() { 50 return true; 51 } clip_surfaceviews()52inline bool clip_surfaceviews() { 53 return false; 54 } draw_region()55inline bool draw_region() { 56 return false; 57 } gainmap_animations()58inline bool gainmap_animations() { 59 return true; 60 } gainmap_constructor_with_metadata()61inline bool gainmap_constructor_with_metadata() { 62 return true; 63 } hdr_10bit_plus()64inline bool hdr_10bit_plus() { 65 return true; 66 } high_contrast_text_luminance()67inline bool high_contrast_text_luminance() { 68 return true; 69 } high_contrast_text_small_text_rect()70inline bool high_contrast_text_small_text_rect() { 71 return false; 72 } initialize_gl_always()73inline bool initialize_gl_always() { 74 return false; 75 } iso_gainmap_apis()76inline bool iso_gainmap_apis() { 77 return false; 78 } limited_hdr()79inline bool limited_hdr() { 80 return true; 81 } matrix_44()82inline bool matrix_44() { 83 return true; 84 } query_global_priority()85inline bool query_global_priority() { 86 return true; 87 } remove_vri_sketchy_destroy()88inline bool remove_vri_sketchy_destroy() { 89 return false; 90 } requested_formats_v()91inline bool requested_formats_v() { 92 return true; 93 } resample_gainmap_regions()94inline bool resample_gainmap_regions() { 95 return true; 96 } runtime_color_filters_blenders()97inline bool runtime_color_filters_blenders() { 98 return false; 99 } skip_eglmanager_telemetry()100inline bool skip_eglmanager_telemetry() { 101 return false; 102 } 103 104 } 105 106 extern "C" { 107 #endif // __cplusplus 108 109 110 bool com_android_graphics_hwui_flags_animate_hdr_transitions(); 111 bool com_android_graphics_hwui_flags_animated_image_drawable_filter_bitmap(); 112 bool com_android_graphics_hwui_flags_bitmap_ashmem_long_name(); 113 bool com_android_graphics_hwui_flags_clip_shader(); 114 bool com_android_graphics_hwui_flags_clip_surfaceviews(); 115 bool com_android_graphics_hwui_flags_draw_region(); 116 bool com_android_graphics_hwui_flags_gainmap_animations(); 117 bool com_android_graphics_hwui_flags_gainmap_constructor_with_metadata(); 118 bool com_android_graphics_hwui_flags_hdr_10bit_plus(); 119 bool com_android_graphics_hwui_flags_high_contrast_text_luminance(); 120 bool com_android_graphics_hwui_flags_high_contrast_text_small_text_rect(); 121 bool com_android_graphics_hwui_flags_initialize_gl_always(); 122 bool com_android_graphics_hwui_flags_iso_gainmap_apis(); 123 bool com_android_graphics_hwui_flags_limited_hdr(); 124 bool com_android_graphics_hwui_flags_matrix_44(); 125 bool com_android_graphics_hwui_flags_query_global_priority(); 126 bool com_android_graphics_hwui_flags_remove_vri_sketchy_destroy(); 127 bool com_android_graphics_hwui_flags_requested_formats_v(); 128 bool com_android_graphics_hwui_flags_resample_gainmap_regions(); 129 bool com_android_graphics_hwui_flags_runtime_color_filters_blenders(); 130 bool com_android_graphics_hwui_flags_skip_eglmanager_telemetry(); 131 132 #ifdef __cplusplus 133 } // extern "C" 134 #endif 135 136