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

Unified Diff: chrome/browser/bitmap_fetcher/bitmap_fetcher_browsertest.cc

Issue 2855503003: Replace uses of legacy SkBitmap::copyTo() API (Closed)
Patch Set: Fix paren errors 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
Index: chrome/browser/bitmap_fetcher/bitmap_fetcher_browsertest.cc
diff --git a/chrome/browser/bitmap_fetcher/bitmap_fetcher_browsertest.cc b/chrome/browser/bitmap_fetcher/bitmap_fetcher_browsertest.cc
index 458a755f8b4a043a6303c93c84afbb4f1336e971..f188149f2e8e901eaef2c9b8ebc093d2c8a75806 100644
--- a/chrome/browser/bitmap_fetcher/bitmap_fetcher_browsertest.cc
+++ b/chrome/browser/bitmap_fetcher/bitmap_fetcher_browsertest.cc
@@ -42,7 +42,10 @@ class BitmapFetcherTestDelegate : public BitmapFetcherDelegate {
url_ = url;
if (bitmap) {
success_ = true;
- bitmap->deepCopyTo(&bitmap_);
+ if (bitmap_.tryAllocPixels(bitmap->info())) {
+ bitmap->readPixels(bitmap_.info(), bitmap_.getPixels(),
+ bitmap_.rowBytes(), 0, 0);
+ }
}
// For async calls, we need to quit the run loop so the test can continue.
if (async_)

Powered by Google App Engine
This is Rietveld 408576698