Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 69ba935

Browse filesBrowse files
committed
fixed: use reserve method of the cairo_images_cache
1 parent 9bf7acc commit 69ba935
Copy full SHA for 69ba935

File tree

Expand file treeCollapse file tree

1 file changed

+1
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-3
lines changed

‎src/web_page.cpp

Copy file name to clipboardExpand all lines: src/web_page.cpp
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,10 +270,8 @@ void litebrowser::web_page::load_image(const char *src, const char *baseurl, boo
270270
std::string url;
271271
make_url(src, baseurl, url);
272272

273-
if(!m_images.exists(url))
273+
if(m_images.reserve(url))
274274
{
275-
m_images.add_image(url, nullptr);
276-
277275
auto data = std::make_shared<image_file>(url, redraw_on_ready);
278276
auto cb_on_data = std::bind(&image_file::on_data, data, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4);
279277
auto cb_on_finish = std::bind(&web_page::on_image_downloaded, this, data, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.