Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/integrator/render_scheduler.cpp
| Show First 20 Lines • Show All 706 Lines • ▼ Show 20 Lines | const double update_interval = guess_display_update_interval_in_seconds_for_num_samples( | ||||
| state_.last_display_update_sample); | state_.last_display_update_sample); | ||||
| return (time_dt() - state_.last_display_update_time) > update_interval; | return (time_dt() - state_.last_display_update_time) > update_interval; | ||||
| } | } | ||||
| bool RenderScheduler::work_need_rebalance() | bool RenderScheduler::work_need_rebalance() | ||||
| { | { | ||||
| /* This is the minimum time, as the rebalancing can not happen more often than the path trace | /* This is the minimum time, as the rebalancing can not happen more often than the path trace | ||||
| * work. */ | * work. */ | ||||
| static const double kRebalanceIntervalInSeconds = 5; | static const double kRebalanceIntervalInSeconds = 1; | ||||
| if (state_.resolution_divider != pixel_size_) { | if (state_.resolution_divider != pixel_size_) { | ||||
| /* Don't rebalance at a non-final resolution divider. Some reasons for this: | /* Don't rebalance at a non-final resolution divider. Some reasons for this: | ||||
| * - It will introduce unnecessary during navigation. | * - It will introduce unnecessary during navigation. | ||||
| * - Per-render device timing information is not very reliable yet. */ | * - Per-render device timing information is not very reliable yet. */ | ||||
| return false; | return false; | ||||
| } | } | ||||
| if (state_.num_rendered_samples == 1) { | |||||
| return true; | |||||
| } | |||||
| return (time_dt() - state_.last_rebalance_time) > kRebalanceIntervalInSeconds; | return (time_dt() - state_.last_rebalance_time) > kRebalanceIntervalInSeconds; | ||||
| } | } | ||||
| void RenderScheduler::update_start_resolution_divider() | void RenderScheduler::update_start_resolution_divider() | ||||
| { | { | ||||
| if (start_resolution_divider_ == 0) { | if (start_resolution_divider_ == 0) { | ||||
| /* Resolution divider has never been calculated before: use default resolution, so that we have | /* Resolution divider has never been calculated before: use default resolution, so that we have | ||||
| * somewhat good initial behavior, giving a chance to collect real numbers. */ | * somewhat good initial behavior, giving a chance to collect real numbers. */ | ||||
| ▲ Show 20 Lines • Show All 156 Lines • Show Last 20 Lines | |||||