| 123 | } |
| 124 | |
| 125 | void Screenshoter::Start() |
| 126 | { |
| 127 | if (m_state != State::NotStarted) |
| 128 | return; |
| 129 | |
| 130 | if (m_screenshotParams.m_dstPath.empty()) |
| 131 | m_screenshotParams.m_dstPath = base::JoinPath(m_screenshotParams.m_kmlPath, "screenshots"); |
| 132 | |
| 133 | LOG(LINFO, ("\nScreenshoter parameters:" |
| 134 | "\n mode:", |
| 135 | m_screenshotParams.m_mode, "\n kml_path:", m_screenshotParams.m_kmlPath, |
| 136 | "\n points:", m_screenshotParams.m_points, "\n rects:", m_screenshotParams.m_rects, |
| 137 | "\n dst_path:", m_screenshotParams.m_dstPath, "\n width:", m_screenshotParams.m_width, |
| 138 | "\n height:", m_screenshotParams.m_height, "\n dpi_scale:", m_screenshotParams.m_dpiScale)); |
| 139 | |
| 140 | if (!Platform::MkDirChecked(m_screenshotParams.m_dstPath)) |
| 141 | { |
| 142 | ChangeState(State::FileError); |
| 143 | return; |
| 144 | } |
| 145 | |
| 146 | if (!PrepareItemsToProcess()) |
| 147 | return; |
| 148 | |
| 149 | ChangeState(State::Ready); |
| 150 | ProcessNextItem(); |
| 151 | } |
| 152 | |
| 153 | void Screenshoter::ProcessNextItem() |
| 154 | { |
no test coverage detected