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

Unified Diff: chrome/browser/thumbnails/simple_thumbnail_crop.cc

Issue 2799283003: remove legacy code from PlatformCanvas days (Closed)
Patch Set: 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/thumbnails/content_based_thumbnailing_algorithm.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/thumbnails/simple_thumbnail_crop.cc
diff --git a/chrome/browser/thumbnails/simple_thumbnail_crop.cc b/chrome/browser/thumbnails/simple_thumbnail_crop.cc
index 4c13ea67a8008167310e92b4b81a9dcb2ed270c5..918aecf5a3c430af533ae7e8837b71443338e6c0 100644
--- a/chrome/browser/thumbnails/simple_thumbnail_crop.cc
+++ b/chrome/browser/thumbnails/simple_thumbnail_crop.cc
@@ -177,24 +177,6 @@ SkBitmap SimpleThumbnailCrop::CreateThumbnail(const SkBitmap& bitmap,
// close, and let the caller make it the exact size if desired.
SkBitmap result = SkBitmapOperations::DownsampleByTwoUntilSize(
clipped_bitmap, desired_size.width(), desired_size.height());
-#if !defined(USE_AURA)
- // This is a bit subtle. SkBitmaps are refcounted, but the magic
- // ones in PlatformCanvas can't be assigned to SkBitmap with proper
- // refcounting. If the bitmap doesn't change, then the downsampler
- // will return the input bitmap, which will be the reference to the
- // weird PlatformCanvas one insetad of a regular one. To get a
- // regular refcounted bitmap, we need to copy it.
- //
- // On Aura, the PlatformCanvas is platform-independent and does not have
- // any native platform resources that can't be refounted, so this issue does
- // not occur.
- //
- // Note that GetClippedBitmap() does extractSubset() but it won't copy
- // the pixels, hence we check result size == clipped_bitmap size here.
- if (clipped_bitmap.width() == result.width() &&
- clipped_bitmap.height() == result.height())
- clipped_bitmap.copyTo(&result, kN32_SkColorType);
-#endif
LOCAL_HISTOGRAM_TIMES(kThumbnailHistogramName,
base::TimeTicks::Now() - begin_compute_thumbnail);
« no previous file with comments | « chrome/browser/thumbnails/content_based_thumbnailing_algorithm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698