1 // Copyright (C) 2020 The Android Open Source Project 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 #ifndef COMPUTEPIPE_RUNNER_DEBUG_DISPLAY_MANAGER 16 #define COMPUTEPIPE_RUNNER_DEBUG_DISPLAY_MANAGER 17 18 #include "MemHandle.h" 19 #include "RunnerComponent.h" 20 #include "types/Status.h" 21 22 namespace android { 23 namespace automotive { 24 namespace computepipe { 25 namespace runner { 26 namespace debug_display_manager { 27 28 class DebugDisplayManager : public RunnerComponentInterface { 29 public: 30 static constexpr char kDisplayId[] = "display_id:"; 31 32 /* Any args that a given display manager needs in order to configure itself. */ 33 virtual Status setArgs(std::string displayManagerArgs); 34 35 /* Send a frame to debug display. 36 * This is a non-blocking call. When the frame is ready to be freed, setFreePacketCallback() 37 * should be invoked. */ 38 virtual Status displayFrame(const std::shared_ptr<MemHandle>& dataHandle) = 0; 39 /* Free the packet (represented by buffer id). */ 40 virtual void setFreePacketCallback(std::function<Status (int bufferId)> freePacketCallback) = 0; 41 }; 42 43 } // namespace debug_display_manager 44 } // namespace runner 45 } // namespace computepipe 46 } // namespace automotive 47 } // namespace android 48 49 #endif // COMPUTEPIPE_RUNNER_DEBUG_DISPLAY_MANAGER 50