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

Unified Diff: chrome/browser/bitmap_fetcher.cc

Issue 322233003: Remove an unnecessary SkBitmap copy on BitmapFetcher::OnImageDecoded. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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/bitmap_fetcher.cc
diff --git a/chrome/browser/bitmap_fetcher.cc b/chrome/browser/bitmap_fetcher.cc
index 023111b58c07ab49f50b12d17209b971b6df68bc..f04751a8356d592b58cc46565f325442fd6dad65 100644
--- a/chrome/browser/bitmap_fetcher.cc
+++ b/chrome/browser/bitmap_fetcher.cc
@@ -67,12 +67,8 @@ void BitmapFetcher::OnURLFetchDownloadProgress(const net::URLFetcher* source,
void BitmapFetcher::OnImageDecoded(const ImageDecoder* decoder,
const SkBitmap& decoded_image) {
- // Make a copy of the bitmap which we pass back to the UI thread.
- scoped_ptr<SkBitmap> bitmap(new SkBitmap());
- decoded_image.deepCopyTo(bitmap.get());
-
// Report success.
- delegate_->OnFetchComplete(url_, bitmap.get());
+ delegate_->OnFetchComplete(url_, &decoded_image);
}
void BitmapFetcher::OnDecodeImageFailed(const ImageDecoder* decoder) {
« 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