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

Unified Diff: chrome/browser/profiles/profile_shortcut_manager_win.cc

Issue 2855503003: Replace uses of legacy SkBitmap::copyTo() API (Closed)
Patch Set: Remove braces Created 3 years, 8 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 | « chrome/browser/extensions/bookmark_app_helper.cc ('k') | chrome/renderer/chrome_render_frame_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_shortcut_manager_win.cc
diff --git a/chrome/browser/profiles/profile_shortcut_manager_win.cc b/chrome/browser/profiles/profile_shortcut_manager_win.cc
index c996b48f9a51d29ef157dc0b0e55184b83a9069a..ce6c1639a2179767d2cdc340472551f7ed00fde3 100644
--- a/chrome/browser/profiles/profile_shortcut_manager_win.cc
+++ b/chrome/browser/profiles/profile_shortcut_manager_win.cc
@@ -675,7 +675,9 @@ SkBitmap GetSkBitmapCopy(const gfx::Image& image) {
DCHECK(!image.IsEmpty());
const SkBitmap* image_bitmap = image.ToSkBitmap();
SkBitmap bitmap_copy;
- image_bitmap->deepCopyTo(&bitmap_copy);
+ if (bitmap_copy.tryAllocPixels(image_bitmap->info()))
+ image_bitmap->readPixels(bitmap_copy.info(), bitmap_copy.getPixels(),
+ bitmap_copy.rowBytes(), 0, 0);
return bitmap_copy;
}
« no previous file with comments | « chrome/browser/extensions/bookmark_app_helper.cc ('k') | chrome/renderer/chrome_render_frame_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698