Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mem release #646

Draft
wants to merge 15 commits into
base: master
Choose a base branch
from
2 changes: 2 additions & 0 deletions pxr/imaging/plugin/hdRpr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ pxr_plugin(hdRpr
PRIVATE_HEADERS
baseRprim.h
api.h
resourceWatcher.h

RESOURCE_FILES
plugInfo.json
Expand All @@ -163,6 +164,7 @@ pxr_plugin(hdRpr
${CMAKE_CURRENT_BINARY_DIR}/config.cpp
ndrDiscoveryPlugin.cpp
ndrParserPlugin.cpp
resourceWatcher.cpp
)

if(RPR_EXR_EXPORT_ENABLED)
Expand Down
6 changes: 6 additions & 0 deletions pxr/imaging/plugin/hdRpr/renderDelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ limitations under the License.
#include <sstream>
#include <cstdio>

#include "resourceWatcher.h"

PXR_NAMESPACE_OPEN_SCOPE

static HdRprApi* g_rprApi = nullptr;
Expand Down Expand Up @@ -186,9 +188,11 @@ HdRprDelegate::HdRprDelegate(HdRenderSettingsMap const& renderSettings) {
}

m_lastCreatedInstance = this;
InitWatcher();
}

HdRprDelegate::~HdRprDelegate() {
NotifyRenderFinished();
g_rprApi = nullptr;
m_lastCreatedInstance = nullptr;
}
Expand Down Expand Up @@ -386,11 +390,13 @@ bool HdRprDelegate::IsPauseSupported() const {
}

bool HdRprDelegate::Pause() {
NotifyRenderFinished();
m_renderThread.PauseRender();
return true;
}

bool HdRprDelegate::Resume() {
NotifyRenderStarted();
m_renderThread.ResumeRender();
return true;
}
Expand Down
Loading