Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4e20d7ba authored by Sally Qi's avatar Sally Qi
Browse files

Rename cache flag due to gantry broken.

- rename `cache_if_source_crop_layer_only_moved` to
  `cache_when_source_crop_layer_only_moved`.
- we keep the old broken one for readability.

Bug: 305718400
Test: builds
Change-Id: I82b1275388758e7b946a310f6490e82d2bfcbd0b
parent d28755ab
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@ bool isSameStack(const std::vector<const LayerState*>& incomingLayers,
        }

        // Do not unflatten if source crop is only moved.
        if (FlagManager::getInstance().cache_if_source_crop_layer_only_moved() &&
        if (FlagManager::getInstance().cache_when_source_crop_layer_only_moved() &&
            incomingLayers[i]->isSourceCropSizeEqual(*(existingLayers[i])) &&
            incomingLayers[i]->getDifferingFields(*(existingLayers[i])) ==
                    LayerStateField::SourceCrop) {
+1 −1
Original line number Diff line number Diff line
@@ -244,7 +244,7 @@ TEST_F(FlattenerTest, flattenLayers_ActiveLayersWithLowFpsAreFlattened) {

TEST_F(FlattenerTest, unflattenLayers_onlySourceCropMoved) {
    SET_FLAG_FOR_TEST(com::android::graphics::surfaceflinger::flags::
                              cache_if_source_crop_layer_only_moved,
                              cache_when_source_crop_layer_only_moved,
                      true);

    auto& layerState1 = mTestLayers[0]->layerState;
+2 −2
Original line number Diff line number Diff line
@@ -122,7 +122,7 @@ void FlagManager::dump(std::string& result) const {
    DUMP_READ_ONLY_FLAG(multithreaded_present);
    DUMP_READ_ONLY_FLAG(add_sf_skipped_frames_to_trace);
    DUMP_READ_ONLY_FLAG(use_known_refresh_rate_for_fps_consistency);
    DUMP_READ_ONLY_FLAG(cache_if_source_crop_layer_only_moved);
    DUMP_READ_ONLY_FLAG(cache_when_source_crop_layer_only_moved);
    DUMP_READ_ONLY_FLAG(enable_fro_dependent_features);
    DUMP_READ_ONLY_FLAG(display_protected);
    DUMP_READ_ONLY_FLAG(fp16_client_target);
@@ -194,7 +194,7 @@ FLAG_MANAGER_READ_ONLY_FLAG(hdcp_level_hal, "")
FLAG_MANAGER_READ_ONLY_FLAG(multithreaded_present, "debug.sf.multithreaded_present")
FLAG_MANAGER_READ_ONLY_FLAG(add_sf_skipped_frames_to_trace, "")
FLAG_MANAGER_READ_ONLY_FLAG(use_known_refresh_rate_for_fps_consistency, "")
FLAG_MANAGER_READ_ONLY_FLAG(cache_if_source_crop_layer_only_moved,
FLAG_MANAGER_READ_ONLY_FLAG(cache_when_source_crop_layer_only_moved,
                            "debug.sf.cache_source_crop_only_moved")
FLAG_MANAGER_READ_ONLY_FLAG(enable_fro_dependent_features, "")
FLAG_MANAGER_READ_ONLY_FLAG(display_protected, "")
+1 −1
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ public:
    bool multithreaded_present() const;
    bool add_sf_skipped_frames_to_trace() const;
    bool use_known_refresh_rate_for_fps_consistency() const;
    bool cache_if_source_crop_layer_only_moved() const;
    bool cache_when_source_crop_layer_only_moved() const;
    bool enable_fro_dependent_features() const;
    bool display_protected() const;
    bool fp16_client_target() const;
+11 −1
Original line number Diff line number Diff line
@@ -92,8 +92,18 @@ flag {
  bug: "299201319"
}

flag {
  name: "cache_if_source_crop_layer_only_moved"
# This flag is broken.
# See alternative one: cache_when_source_crop_layer_only_moved
# flag {
#   name: "cache_if_source_crop_layer_only_moved"
#   namespace: "core_graphics"
#   description: "do not flatten layers if source crop is only moved"
#   bug: "305718400"
#   is_fixed_read_only: true
# }

flag {
  name: "cache_when_source_crop_layer_only_moved"
  namespace: "core_graphics"
  description: "do not flatten layers if source crop is only moved"
  bug: "305718400"