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

Unified Diff: ios/chrome/browser/google/google_logo_service.mm

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 | « headless/lib/browser/headless_clipboard.cc ('k') | skia/config/SkUserConfig.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/google/google_logo_service.mm
diff --git a/ios/chrome/browser/google/google_logo_service.mm b/ios/chrome/browser/google/google_logo_service.mm
index c4cf895362dadea456231ba24ae29c45a2bbbd44..69252ecc161e3b4ccdf224aa368387063f5c4cc0 100644
--- a/ios/chrome/browser/google/google_logo_service.mm
+++ b/ios/chrome/browser/google/google_logo_service.mm
@@ -121,7 +121,10 @@ void GoogleLogoService::SetCachedLogo(const search_provider_logos::Logo* logo) {
if (cached_metadata_.fingerprint == logo->metadata.fingerprint) {
return;
}
- logo->image.deepCopyTo(&cached_image_);
+ if (cached_image_.tryAllocPixels(logo->image.info())) {
+ logo->image.readPixels(cached_image_.info(), cached_image_.getPixels(),
+ cached_image_.rowBytes(), 0, 0);
+ }
cached_metadata_ = logo->metadata;
} else {
cached_image_ = SkBitmap();
« no previous file with comments | « headless/lib/browser/headless_clipboard.cc ('k') | skia/config/SkUserConfig.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698