Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/session/session.cpp
| Show First 20 Lines • Show All 362 Lines • ▼ Show 20 Lines | |||||
| void Session::draw() | void Session::draw() | ||||
| { | { | ||||
| path_trace_->draw(); | path_trace_->draw(); | ||||
| } | } | ||||
| int2 Session::get_effective_tile_size() const | int2 Session::get_effective_tile_size() const | ||||
| { | { | ||||
| const int image_width = buffer_params_.width; | |||||
| const int image_height = buffer_params_.height; | |||||
| /* No support yet for baking with tiles. */ | /* No support yet for baking with tiles. */ | ||||
| if (!params.use_auto_tile || scene->bake_manager->get_baking()) { | if (!params.use_auto_tile || scene->bake_manager->get_baking()) { | ||||
| return make_int2(buffer_params_.width, buffer_params_.height); | return make_int2(image_width, image_height); | ||||
| } | } | ||||
| /* TODO(sergey): Take available memory into account, and if there is enough memory do not tile | const int64_t image_area = static_cast<int64_t>(image_width) * image_height; | ||||
| * and prefer optimal performance. */ | |||||
| /* TODO(sergey): Take available memory into account, and if there is enough memory do not | |||||
| * tile and prefer optimal performance. */ | |||||
| const int tile_size = tile_manager_.compute_render_tile_size(params.tile_size); | const int tile_size = tile_manager_.compute_render_tile_size(params.tile_size); | ||||
| const int64_t actual_tile_area = static_cast<int64_t>(tile_size) * tile_size; | |||||
| if (actual_tile_area >= image_area) { | |||||
| return make_int2(image_width, image_height); | |||||
| } | |||||
| return make_int2(tile_size, tile_size); | return make_int2(tile_size, tile_size); | ||||
| } | } | ||||
| void Session::do_delayed_reset() | void Session::do_delayed_reset() | ||||
| { | { | ||||
| if (!delayed_reset_.do_reset) { | if (!delayed_reset_.do_reset) { | ||||
| return; | return; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 239 Lines • Show Last 20 Lines | |||||