Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/cycles/integrator/path_trace_display.cpp')
-rw-r--r--intern/cycles/integrator/path_trace_display.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/intern/cycles/integrator/path_trace_display.cpp b/intern/cycles/integrator/path_trace_display.cpp
index c1cade923b1..4af622065c2 100644
--- a/intern/cycles/integrator/path_trace_display.cpp
+++ b/intern/cycles/integrator/path_trace_display.cpp
@@ -26,15 +26,20 @@ PathTraceDisplay::PathTraceDisplay(unique_ptr<DisplayDriver> driver) : driver_(m
{
}
-void PathTraceDisplay::reset(const BufferParams &buffer_params)
+void PathTraceDisplay::reset(const BufferParams &buffer_params, const bool reset_rendering)
{
thread_scoped_lock lock(mutex_);
- params_.full_offset = make_int2(buffer_params.full_x, buffer_params.full_y);
+ params_.full_offset = make_int2(buffer_params.full_x + buffer_params.window_x,
+ buffer_params.full_y + buffer_params.window_y);
params_.full_size = make_int2(buffer_params.full_width, buffer_params.full_height);
- params_.size = make_int2(buffer_params.width, buffer_params.height);
+ params_.size = make_int2(buffer_params.window_width, buffer_params.window_height);
texture_state_.is_outdated = true;
+
+ if (!reset_rendering) {
+ driver_->next_tile_begin();
+ }
}
void PathTraceDisplay::mark_texture_updated()
@@ -248,4 +253,9 @@ bool PathTraceDisplay::draw()
return !is_outdated;
}
+void PathTraceDisplay::flush()
+{
+ driver_->flush();
+}
+
CCL_NAMESPACE_END