| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/thumbnails/content_based_thumbnailing_algorithm.h" | 5 #include "chrome/browser/thumbnails/content_based_thumbnailing_algorithm.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram_macros.h" |
| 10 #include "base/threading/sequenced_worker_pool.h" | 10 #include "base/threading/sequenced_worker_pool.h" |
| 11 #include "chrome/browser/thumbnails/content_analysis.h" | 11 #include "chrome/browser/thumbnails/content_analysis.h" |
| 12 #include "chrome/browser/thumbnails/simple_thumbnail_crop.h" | 12 #include "chrome/browser/thumbnails/simple_thumbnail_crop.h" |
| 13 #include "content/public/browser/browser_thread.h" | 13 #include "content/public/browser/browser_thread.h" |
| 14 #include "third_party/skia/include/core/SkBitmap.h" | 14 #include "third_party/skia/include/core/SkBitmap.h" |
| 15 #include "ui/gfx/color_utils.h" | 15 #include "ui/gfx/color_utils.h" |
| 16 #include "ui/gfx/geometry/size_conversions.h" | 16 #include "ui/gfx/geometry/size_conversions.h" |
| 17 #include "ui/gfx/scrollbar_size.h" | 17 #include "ui/gfx/scrollbar_size.h" |
| 18 #include "ui/gfx/skbitmap_operations.h" | 18 #include "ui/gfx/skbitmap_operations.h" |
| 19 #include "ui/gfx/skia_util.h" | 19 #include "ui/gfx/skia_util.h" |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 } else { | 235 } else { |
| 236 clipping_rect = gfx::Rect(source_size); | 236 clipping_rect = gfx::Rect(source_size); |
| 237 target_size->SetSize(source_size.width() / 2, source_size.height() / 2); | 237 target_size->SetSize(source_size.width() / 2, source_size.height() / 2); |
| 238 *clip_result = CLIP_RESULT_NOT_CLIPPED; | 238 *clip_result = CLIP_RESULT_NOT_CLIPPED; |
| 239 } | 239 } |
| 240 | 240 |
| 241 return clipping_rect; | 241 return clipping_rect; |
| 242 } | 242 } |
| 243 | 243 |
| 244 } // namespace thumbnails | 244 } // namespace thumbnails |
| OLD | NEW |