2018-06-12 20:33:03 +02:00
|
|
|
/*
|
2022-09-01 15:54:57 +00:00
|
|
|
* Copyright (C) 2018-2022 Intel Corporation
|
2018-06-12 20:33:03 +02:00
|
|
|
*
|
2018-09-18 09:11:08 +02:00
|
|
|
* SPDX-License-Identifier: MIT
|
2018-06-12 20:33:03 +02:00
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
2018-07-01 18:44:29 +02:00
|
|
|
#pragma once
|
2020-10-16 12:10:52 +02:00
|
|
|
#include "shared/source/aub/aub_subcapture.h"
|
|
|
|
|
|
2019-03-26 11:59:46 +01:00
|
|
|
using namespace NEO;
|
2018-07-01 18:44:29 +02:00
|
|
|
|
2018-06-12 20:33:03 +02:00
|
|
|
class AubSubCaptureManagerMock : public AubSubCaptureManager {
|
|
|
|
|
public:
|
2020-10-14 19:22:01 +02:00
|
|
|
AubSubCaptureManagerMock(const std::string &fileName, AubSubCaptureCommon &subCaptureCommon)
|
2021-12-20 18:16:04 +00:00
|
|
|
: AubSubCaptureManager(fileName, subCaptureCommon, "") {}
|
2018-07-09 11:31:36 +02:00
|
|
|
|
2018-06-12 20:33:03 +02:00
|
|
|
void setSubCaptureIsActive(bool on) {
|
|
|
|
|
subCaptureIsActive = on;
|
|
|
|
|
}
|
|
|
|
|
bool isSubCaptureActive() const {
|
|
|
|
|
return subCaptureIsActive;
|
|
|
|
|
}
|
2019-06-03 09:57:27 +02:00
|
|
|
void setSubCaptureWasActiveInPreviousEnqueue(bool on) {
|
|
|
|
|
subCaptureWasActiveInPreviousEnqueue = on;
|
2018-06-12 20:33:03 +02:00
|
|
|
}
|
2019-06-03 09:57:27 +02:00
|
|
|
bool wasSubCaptureActiveInPreviousEnqueue() const {
|
|
|
|
|
return subCaptureWasActiveInPreviousEnqueue;
|
2018-06-12 20:33:03 +02:00
|
|
|
}
|
|
|
|
|
void setKernelCurrentIndex(uint32_t index) {
|
|
|
|
|
kernelCurrentIdx = index;
|
|
|
|
|
}
|
2018-07-01 18:44:29 +02:00
|
|
|
uint32_t getKernelCurrentIndex() const {
|
2018-06-12 20:33:03 +02:00
|
|
|
return kernelCurrentIdx;
|
|
|
|
|
}
|
2019-10-06 22:51:15 +02:00
|
|
|
bool getUseToggleFileName() const {
|
|
|
|
|
return useToggleFileName;
|
2018-07-09 11:31:36 +02:00
|
|
|
}
|
|
|
|
|
const std::string &getInitialFileName() const {
|
|
|
|
|
return initialFileName;
|
|
|
|
|
}
|
|
|
|
|
const std::string &getCurrentFileName() const {
|
|
|
|
|
return currentFileName;
|
|
|
|
|
}
|
2018-07-01 18:44:29 +02:00
|
|
|
SettingsReader *getSettingsReader() const {
|
|
|
|
|
return settingsReader.get();
|
|
|
|
|
}
|
2018-06-12 20:33:03 +02:00
|
|
|
void setSubCaptureToggleActive(bool on) {
|
|
|
|
|
isToggledOn = on;
|
|
|
|
|
}
|
|
|
|
|
bool isSubCaptureToggleActive() const override {
|
|
|
|
|
return isToggledOn;
|
|
|
|
|
}
|
2019-10-06 22:51:15 +02:00
|
|
|
void setToggleFileName(const std::string &fileName) {
|
|
|
|
|
toggleFileName = fileName;
|
2018-07-09 11:31:36 +02:00
|
|
|
}
|
2019-10-06 22:51:15 +02:00
|
|
|
std::string getToggleFileName() const override {
|
|
|
|
|
return toggleFileName;
|
2018-07-09 11:31:36 +02:00
|
|
|
}
|
|
|
|
|
|
2022-09-01 15:54:57 +00:00
|
|
|
[[nodiscard]] std::unique_lock<std::mutex> lock() const override {
|
2019-05-17 01:14:06 +02:00
|
|
|
isLocked = true;
|
|
|
|
|
return std::unique_lock<std::mutex>{mutex};
|
|
|
|
|
}
|
|
|
|
|
|
2018-07-09 11:31:36 +02:00
|
|
|
using AubSubCaptureManager::generateFilterFileName;
|
|
|
|
|
using AubSubCaptureManager::generateToggleFileName;
|
2019-10-06 22:51:15 +02:00
|
|
|
using AubSubCaptureManager::getAubCaptureFileName;
|
2018-06-12 20:33:03 +02:00
|
|
|
|
2019-05-17 01:14:06 +02:00
|
|
|
mutable bool isLocked = false;
|
|
|
|
|
|
2018-06-12 20:33:03 +02:00
|
|
|
protected:
|
|
|
|
|
bool isToggledOn = false;
|
2019-10-06 22:51:15 +02:00
|
|
|
std::string toggleFileName = "";
|
2018-06-12 20:33:03 +02:00
|
|
|
};
|