Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(285)

Unified Diff: components/favicon_base/favicon_util.h

Issue 2313563002: Reduce jank from favicon downscaling. (Closed)
Patch Set: Add description comment in header Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/favicon/core/favicon_service.cc ('k') | components/favicon_base/favicon_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/favicon_base/favicon_util.h
diff --git a/components/favicon_base/favicon_util.h b/components/favicon_base/favicon_util.h
index 912f06f2f8d2c53363ee7a9fe46dc8e7cdc46917..088b471c47dabfb4d8462a95ae3bdcd2ec4d8064 100644
--- a/components/favicon_base/favicon_util.h
+++ b/components/favicon_base/favicon_util.h
@@ -36,6 +36,15 @@ gfx::Image SelectFaviconFramesFromPNGs(
const std::vector<float>& favicon_scales,
int favicon_size);
+// Generates a favicon_bitmap_result sized exactly to [desired_size,
+// desired_size] from the provided result set. If the exact size is found in
+// the set, it just returns that; otherwise, it will decode the PNG, scale,
+// and encode a new PNG.
+favicon_base::FaviconRawBitmapResult ResizeFaviconBitmapResult(
+ const std::vector<favicon_base::FaviconRawBitmapResult>&
+ favicon_bitmap_results,
+ int desired_size_in_pixel);
+
} // namspace favicon_base
#endif // COMPONENTS_FAVICON_BASE_FAVICON_UTIL_H_
« no previous file with comments | « components/favicon/core/favicon_service.cc ('k') | components/favicon_base/favicon_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698