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:
authorLukas Stockner <lukas.stockner@freenet.de>2017-01-19 02:41:55 +0300
committerLukas Stockner <lukas.stockner@freenet.de>2017-03-20 17:28:36 +0300
commitd544a61e8a366f05a6360d9e5baea84edcaa2ca0 (patch)
tree7c4cdc3fda05f53c9e0ebfccc8d2b0c3453d7b2c /intern/cycles/render/session.cpp
parenta201b99c5aaa7945bd0702c42987a60e3d70ee46 (diff)
Cycles: Update remaining time once per second without waiting for a tile change
Previously, the code would only update the status string if the main status changed. However, the main status did not include the remaining time, and therefore it wasn't updated until the amount of rendered tiles (which is part of the main status) changed. This commit therefore makes the BlenderSession remember the time of the last status update and forces a status update if the last one was more than a second ago. Reviewers: sergey Differential Revision: https://developer.blender.org/D2465
Diffstat (limited to 'intern/cycles/render/session.cpp')
-rw-r--r--intern/cycles/render/session.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/render/session.cpp b/intern/cycles/render/session.cpp
index 0c7bd271371..e7050f9ef37 100644
--- a/intern/cycles/render/session.cpp
+++ b/intern/cycles/render/session.cpp
@@ -833,7 +833,7 @@ void Session::update_status_time(bool show_pause, bool show_done)
int progressive_sample = tile_manager.state.sample;
int num_samples = tile_manager.get_num_effective_samples();
- int tile = tile_manager.state.num_rendered_tiles;
+ int tile = progress.get_finished_tiles();
int num_tiles = tile_manager.state.num_tiles;
/* update status */
@@ -841,7 +841,7 @@ void Session::update_status_time(bool show_pause, bool show_done)
if(!params.progressive) {
const bool is_cpu = params.device.type == DEVICE_CPU;
- const bool is_last_tile = (progress.get_finished_tiles() + 1) == num_tiles;
+ const bool is_last_tile = (tile + 1) == num_tiles;
substatus = string_printf("Path Tracing Tile %d/%d", tile, num_tiles);