1 /* 2 * Copyright 2024 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #pragma once 18 19 #include <ftl/flags.h> 20 #include <stdint.h> 21 22 namespace android::adpf { 23 // Additional composition workload that can increase cpu load. 24 enum class Workload : uint32_t { 25 NONE = 0, 26 // Layer effects like blur and shadows which forces client composition 27 EFFECTS = 1 << 0, 28 29 // Geometry changes which requires HWC to validate and share composition strategy 30 VISIBLE_REGION = 1 << 1, 31 32 // Diplay changes which can cause geometry changes 33 DISPLAY_CHANGES = 1 << 2, 34 35 // Changes in sf duration which can shorten the deadline for sf to composite the frame 36 WAKEUP = 1 << 3, 37 38 // Increases in refresh rates can cause the deadline for sf to composite to be shorter 39 REFRESH_RATE_INCREASE = 1 << 4, 40 41 // Screenshot requests increase both the cpu and gpu workload 42 SCREENSHOT = 1 << 5 43 }; 44 } // namespace android::adpf 45