2018-06-13 02:33:03 +08:00
|
|
|
/*
|
2019-03-26 18:59:46 +08:00
|
|
|
* Copyright (C) 2018-2019 Intel Corporation
|
2018-06-13 02:33:03 +08:00
|
|
|
*
|
2018-09-18 15:11:08 +08:00
|
|
|
* SPDX-License-Identifier: MIT
|
2018-06-13 02:33:03 +08:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2018-07-02 00:44:29 +08:00
|
|
|
#pragma once
|
2018-06-13 02:33:03 +08:00
|
|
|
#include "runtime/command_stream/aub_subcapture.h"
|
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
using namespace NEO;
|
2018-07-02 00:44:29 +08:00
|
|
|
|
2018-06-13 02:33:03 +08:00
|
|
|
class AubSubCaptureManagerMock : public AubSubCaptureManager {
|
|
|
|
public:
|
2018-07-09 17:31:36 +08:00
|
|
|
using AubSubCaptureManager::AubSubCaptureManager;
|
|
|
|
|
2018-06-13 02:33:03 +08:00
|
|
|
void setSubCaptureIsActive(bool on) {
|
|
|
|
subCaptureIsActive = on;
|
|
|
|
}
|
|
|
|
bool isSubCaptureActive() const {
|
|
|
|
return subCaptureIsActive;
|
|
|
|
}
|
|
|
|
void setSubCaptureWasActive(bool on) {
|
|
|
|
subCaptureWasActive = on;
|
|
|
|
}
|
|
|
|
bool wasSubCaptureActive() const {
|
2018-07-09 17:31:36 +08:00
|
|
|
return subCaptureWasActive;
|
2018-06-13 02:33:03 +08:00
|
|
|
}
|
|
|
|
void setKernelCurrentIndex(uint32_t index) {
|
|
|
|
kernelCurrentIdx = index;
|
|
|
|
}
|
2018-07-02 00:44:29 +08:00
|
|
|
uint32_t getKernelCurrentIndex() const {
|
2018-06-13 02:33:03 +08:00
|
|
|
return kernelCurrentIdx;
|
|
|
|
}
|
2018-07-09 17:31:36 +08:00
|
|
|
bool getUseExternalFileName() const {
|
|
|
|
return useExternalFileName;
|
|
|
|
}
|
|
|
|
const std::string &getInitialFileName() const {
|
|
|
|
return initialFileName;
|
|
|
|
}
|
|
|
|
const std::string &getCurrentFileName() const {
|
|
|
|
return currentFileName;
|
|
|
|
}
|
2018-07-02 00:44:29 +08:00
|
|
|
SettingsReader *getSettingsReader() const {
|
|
|
|
return settingsReader.get();
|
|
|
|
}
|
2018-06-13 02:33:03 +08:00
|
|
|
void setSubCaptureToggleActive(bool on) {
|
|
|
|
isToggledOn = on;
|
|
|
|
}
|
|
|
|
bool isSubCaptureToggleActive() const override {
|
|
|
|
return isToggledOn;
|
|
|
|
}
|
2018-07-09 17:31:36 +08:00
|
|
|
void setExternalFileName(const std::string &fileName) {
|
|
|
|
externalFileName = fileName;
|
|
|
|
}
|
|
|
|
std::string getExternalFileName() const override {
|
|
|
|
return externalFileName;
|
|
|
|
}
|
|
|
|
|
2019-05-17 07:14:06 +08:00
|
|
|
std::unique_lock<std::mutex> lock() const override {
|
|
|
|
isLocked = true;
|
|
|
|
return std::unique_lock<std::mutex>{mutex};
|
|
|
|
}
|
|
|
|
|
2018-07-09 17:31:36 +08:00
|
|
|
using AubSubCaptureManager::generateFilterFileName;
|
|
|
|
using AubSubCaptureManager::generateToggleFileName;
|
2018-06-13 02:33:03 +08:00
|
|
|
|
2019-05-17 07:14:06 +08:00
|
|
|
mutable bool isLocked = false;
|
|
|
|
|
2018-06-13 02:33:03 +08:00
|
|
|
protected:
|
|
|
|
bool isToggledOn = false;
|
2018-07-09 17:31:36 +08:00
|
|
|
std::string externalFileName = "";
|
2018-06-13 02:33:03 +08:00
|
|
|
};
|