mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 09:00:44 +00:00
Rename *Method to *Callback to be more explicit in the name
This commit is contained in:
@@ -774,8 +774,8 @@ void CaptureContext::ShowStatisticsViewer()
|
||||
|
||||
IShaderViewer *CaptureContext::EditShader(bool customShader, const QString &entryPoint,
|
||||
const QStringMap &files,
|
||||
IShaderViewer::SaveMethod saveCallback,
|
||||
IShaderViewer::CloseMethod closeCallback, QWidget *parent)
|
||||
IShaderViewer::SaveCallback saveCallback,
|
||||
IShaderViewer::CloseCallback closeCallback, QWidget *parent)
|
||||
{
|
||||
return ShaderViewer::EditShader(*this, customShader, entryPoint, files, saveCallback,
|
||||
closeCallback, parent);
|
||||
|
||||
@@ -147,8 +147,8 @@ public:
|
||||
void ShowStatisticsViewer() override;
|
||||
|
||||
IShaderViewer *EditShader(bool customShader, const QString &entryPoint, const QStringMap &files,
|
||||
IShaderViewer::SaveMethod saveCallback,
|
||||
IShaderViewer::CloseMethod closeCallback, QWidget *parent) override;
|
||||
IShaderViewer::SaveCallback saveCallback,
|
||||
IShaderViewer::CloseCallback closeCallback, QWidget *parent) override;
|
||||
|
||||
IShaderViewer *DebugShader(const ShaderBindpointMapping *bind, const ShaderReflection *shader,
|
||||
ShaderStage stage, ShaderDebugTrace *trace,
|
||||
|
||||
@@ -191,8 +191,8 @@ DECLARE_REFLECTION_STRUCT(IStatisticsViewer);
|
||||
|
||||
struct IShaderViewer
|
||||
{
|
||||
typedef std::function<void(ICaptureContext *ctx, IShaderViewer *, const QStringMap &)> SaveMethod;
|
||||
typedef std::function<void(ICaptureContext *ctx)> CloseMethod;
|
||||
typedef std::function<void(ICaptureContext *ctx, IShaderViewer *, const QStringMap &)> SaveCallback;
|
||||
typedef std::function<void(ICaptureContext *ctx)> CloseCallback;
|
||||
|
||||
virtual QWidget *Widget() = 0;
|
||||
|
||||
@@ -258,8 +258,8 @@ DECLARE_REFLECTION_STRUCT(ILogViewer);
|
||||
|
||||
struct IReplayManager
|
||||
{
|
||||
typedef std::function<void(IReplayController *)> InvokeMethod;
|
||||
typedef std::function<void(const rdctype::str &, const rdctype::array<PathEntry> &)> DirectoryBrowseMethod;
|
||||
typedef std::function<void(IReplayController *)> InvokeCallback;
|
||||
typedef std::function<void(const rdctype::str &, const rdctype::array<PathEntry> &)> DirectoryBrowseCallback;
|
||||
|
||||
virtual void DeleteCapture(const QString &logfile, bool local) = 0;
|
||||
|
||||
@@ -269,9 +269,9 @@ struct IReplayManager
|
||||
// processed.
|
||||
// the manager processes only the request on the top of the queue, so when a new tagged invoke
|
||||
// comes in, we remove any other requests in the queue before it that have the same tag
|
||||
virtual void AsyncInvoke(const QString &tag, InvokeMethod m) = 0;
|
||||
virtual void AsyncInvoke(InvokeMethod m) = 0;
|
||||
virtual void BlockInvoke(InvokeMethod m) = 0;
|
||||
virtual void AsyncInvoke(const QString &tag, InvokeCallback m) = 0;
|
||||
virtual void AsyncInvoke(InvokeCallback m) = 0;
|
||||
virtual void BlockInvoke(InvokeCallback m) = 0;
|
||||
|
||||
virtual ReplayStatus ConnectToRemoteServer(RemoteHost *host) = 0;
|
||||
virtual void DisconnectFromRemoteServer() = 0;
|
||||
@@ -284,8 +284,8 @@ struct IReplayManager
|
||||
const QString &logfile, CaptureOptions opts) = 0;
|
||||
|
||||
virtual QStringList GetRemoteSupport() = 0;
|
||||
virtual void GetHomeFolder(bool synchronous, DirectoryBrowseMethod cb) = 0;
|
||||
virtual bool ListFolder(QString path, bool synchronous, DirectoryBrowseMethod cb) = 0;
|
||||
virtual void GetHomeFolder(bool synchronous, DirectoryBrowseCallback cb) = 0;
|
||||
virtual bool ListFolder(QString path, bool synchronous, DirectoryBrowseCallback cb) = 0;
|
||||
virtual QString CopyCaptureToRemote(const QString &localpath, QWidget *window) = 0;
|
||||
virtual void CopyCaptureFromRemote(const QString &remotepath, const QString &localpath,
|
||||
QWidget *window) = 0;
|
||||
@@ -391,8 +391,8 @@ struct ICaptureContext
|
||||
virtual void ShowStatisticsViewer() = 0;
|
||||
|
||||
virtual IShaderViewer *EditShader(bool customShader, const QString &entryPoint,
|
||||
const QStringMap &files, IShaderViewer::SaveMethod saveCallback,
|
||||
IShaderViewer::CloseMethod closeCallback, QWidget *parent) = 0;
|
||||
const QStringMap &files, IShaderViewer::SaveCallback saveCallback,
|
||||
IShaderViewer::CloseCallback closeCallback, QWidget *parent) = 0;
|
||||
|
||||
virtual IShaderViewer *DebugShader(const ShaderBindpointMapping *bind,
|
||||
const ShaderReflection *shader, ShaderStage stage,
|
||||
|
||||
@@ -99,7 +99,7 @@ QStringList ReplayManager::GetRemoteSupport()
|
||||
return ret;
|
||||
}
|
||||
|
||||
void ReplayManager::GetHomeFolder(bool synchronous, DirectoryBrowseMethod cb)
|
||||
void ReplayManager::GetHomeFolder(bool synchronous, DirectoryBrowseCallback cb)
|
||||
{
|
||||
if(!m_Remote)
|
||||
return;
|
||||
@@ -127,7 +127,7 @@ void ReplayManager::GetHomeFolder(bool synchronous, DirectoryBrowseMethod cb)
|
||||
cb(home.c_str(), rdctype::array<PathEntry>());
|
||||
}
|
||||
|
||||
bool ReplayManager::ListFolder(QString path, bool synchronous, DirectoryBrowseMethod cb)
|
||||
bool ReplayManager::ListFolder(QString path, bool synchronous, DirectoryBrowseCallback cb)
|
||||
{
|
||||
if(!m_Remote)
|
||||
return false;
|
||||
@@ -230,7 +230,7 @@ bool ReplayManager::IsRunning()
|
||||
return m_Thread && m_Thread->isRunning() && m_Running;
|
||||
}
|
||||
|
||||
void ReplayManager::AsyncInvoke(const QString &tag, ReplayManager::InvokeMethod m)
|
||||
void ReplayManager::AsyncInvoke(const QString &tag, ReplayManager::InvokeCallback m)
|
||||
{
|
||||
{
|
||||
QMutexLocker autolock(&m_RenderLock);
|
||||
@@ -255,7 +255,7 @@ void ReplayManager::AsyncInvoke(const QString &tag, ReplayManager::InvokeMethod
|
||||
PushInvoke(cmd);
|
||||
}
|
||||
|
||||
void ReplayManager::AsyncInvoke(ReplayManager::InvokeMethod m)
|
||||
void ReplayManager::AsyncInvoke(ReplayManager::InvokeCallback m)
|
||||
{
|
||||
InvokeHandle *cmd = new InvokeHandle(m);
|
||||
cmd->selfdelete = true;
|
||||
@@ -263,7 +263,7 @@ void ReplayManager::AsyncInvoke(ReplayManager::InvokeMethod m)
|
||||
PushInvoke(cmd);
|
||||
}
|
||||
|
||||
void ReplayManager::BlockInvoke(ReplayManager::InvokeMethod m)
|
||||
void ReplayManager::BlockInvoke(ReplayManager::InvokeCallback m)
|
||||
{
|
||||
InvokeHandle *cmd = new InvokeHandle(m);
|
||||
|
||||
|
||||
@@ -61,9 +61,9 @@ public:
|
||||
// processed.
|
||||
// the manager processes only the request on the top of the queue, so when a new tagged invoke
|
||||
// comes in, we remove any other requests in the queue before it that have the same tag
|
||||
void AsyncInvoke(const QString &tag, InvokeMethod m);
|
||||
void AsyncInvoke(InvokeMethod m);
|
||||
void BlockInvoke(InvokeMethod m);
|
||||
void AsyncInvoke(const QString &tag, InvokeCallback m);
|
||||
void AsyncInvoke(InvokeCallback m);
|
||||
void BlockInvoke(InvokeCallback m);
|
||||
|
||||
void CloseThread();
|
||||
|
||||
@@ -78,15 +78,15 @@ public:
|
||||
CaptureOptions opts);
|
||||
|
||||
QStringList GetRemoteSupport();
|
||||
void GetHomeFolder(bool synchronous, DirectoryBrowseMethod cb);
|
||||
bool ListFolder(QString path, bool synchronous, DirectoryBrowseMethod cb);
|
||||
void GetHomeFolder(bool synchronous, DirectoryBrowseCallback cb);
|
||||
bool ListFolder(QString path, bool synchronous, DirectoryBrowseCallback cb);
|
||||
QString CopyCaptureToRemote(const QString &localpath, QWidget *window);
|
||||
void CopyCaptureFromRemote(const QString &remotepath, const QString &localpath, QWidget *window);
|
||||
|
||||
private:
|
||||
struct InvokeHandle
|
||||
{
|
||||
InvokeHandle(InvokeMethod m, const QString &t = QString())
|
||||
InvokeHandle(InvokeCallback m, const QString &t = QString())
|
||||
{
|
||||
tag = t;
|
||||
method = m;
|
||||
@@ -94,7 +94,7 @@ private:
|
||||
}
|
||||
|
||||
QString tag;
|
||||
InvokeMethod method;
|
||||
InvokeCallback method;
|
||||
QSemaphore processed;
|
||||
bool selfdelete;
|
||||
};
|
||||
|
||||
@@ -62,7 +62,7 @@ CONTAINER_TYPEMAPS(QMap)
|
||||
%rename("%s") IReplayManager::BlockInvoke;
|
||||
|
||||
%extend IReplayManager {
|
||||
void BlockInvoke(InvokeMethod m) {
|
||||
void BlockInvoke(InvokeCallback m) {
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
$self->BlockInvoke(m);
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
@@ -47,8 +47,8 @@ class ShaderViewer : public QFrame, public IShaderViewer, public ILogViewer
|
||||
|
||||
public:
|
||||
static IShaderViewer *EditShader(ICaptureContext &ctx, bool customShader, const QString &entryPoint,
|
||||
const QStringMap &files, IShaderViewer::SaveMethod saveCallback,
|
||||
IShaderViewer::CloseMethod closeCallback, QWidget *parent)
|
||||
const QStringMap &files, IShaderViewer::SaveCallback saveCallback,
|
||||
IShaderViewer::CloseCallback closeCallback, QWidget *parent)
|
||||
{
|
||||
ShaderViewer *ret = new ShaderViewer(ctx, parent);
|
||||
ret->m_SaveCallback = saveCallback;
|
||||
@@ -157,8 +157,8 @@ private:
|
||||
QPair<int, int> prevResult;
|
||||
} m_FindState;
|
||||
|
||||
SaveMethod m_SaveCallback;
|
||||
CloseMethod m_CloseCallback;
|
||||
SaveCallback m_SaveCallback;
|
||||
CloseCallback m_CloseCallback;
|
||||
|
||||
ShaderDebugTrace *m_Trace = NULL;
|
||||
int m_CurrentStep;
|
||||
|
||||
Reference in New Issue
Block a user