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

Unified Diff: chrome/browser/favicon/select_favicon_frames.cc

Issue 10823385: [Coverity] Pass-by-ref instead of pass-by-val (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/favicon/select_favicon_frames.cc
diff --git a/chrome/browser/favicon/select_favicon_frames.cc b/chrome/browser/favicon/select_favicon_frames.cc
index 52cb6ab880226775b94e8be2b9da0f31be76f003..411818e1d7834d3954cd4c8979d440646585c1a0 100644
--- a/chrome/browser/favicon/select_favicon_frames.cc
+++ b/chrome/browser/favicon/select_favicon_frames.cc
@@ -24,7 +24,9 @@ size_t BiggestCandidate(const std::vector<SkBitmap>& bitmaps) {
return max_index;
}
-SkBitmap PadWithBorder(SkBitmap contents, int desired_size, int source_size) {
+SkBitmap PadWithBorder(const SkBitmap& contents,
Nico 2012/09/19 10:29:16 SkBitmaps are refcounted and by design very cheap
sky 2012/09/19 14:25:05 We should still pass by ref if possible.
+ int desired_size,
+ int source_size) {
SkBitmap bitmap;
bitmap.setConfig(
SkBitmap::kARGB_8888_Config, desired_size, desired_size);
@@ -41,7 +43,7 @@ SkBitmap PadWithBorder(SkBitmap contents, int desired_size, int source_size) {
return bitmap;
}
-SkBitmap SampleNearestNeighbor(SkBitmap contents, int desired_size) {
+SkBitmap SampleNearestNeighbor(const SkBitmap& contents, int desired_size) {
SkBitmap bitmap;
bitmap.setConfig(
SkBitmap::kARGB_8888_Config, desired_size, desired_size);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698