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

Unified Diff: chrome/browser/android/thumbnail/thumbnail_cache.cc

Issue 2619103002: android: Use Display in thumbnail_cache (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/thumbnail/thumbnail_cache.cc
diff --git a/chrome/browser/android/thumbnail/thumbnail_cache.cc b/chrome/browser/android/thumbnail/thumbnail_cache.cc
index f72a51ac12f1f7849218b5b6568a4bfe5d9649b5..138e3e8b2b04c78aaa0fa23bc32790b328a95d0c 100644
--- a/chrome/browser/android/thumbnail/thumbnail_cache.cc
+++ b/chrome/browser/android/thumbnail/thumbnail_cache.cc
@@ -28,7 +28,8 @@
#include "third_party/skia/include/core/SkMallocPixelRef.h"
#include "third_party/skia/include/core/SkPixelRef.h"
#include "ui/android/resources/ui_resource_provider.h"
-#include "ui/gfx/android/device_display_info.h"
+#include "ui/display/display.h"
+#include "ui/display/screen.h"
#include "ui/gfx/geometry/size_conversions.h"
namespace {
@@ -694,9 +695,9 @@ bool ReadFromFile(base::File& file,
// Do some simple sanity check validation. We can't have thumbnails larger
// than the max display size of the screen. We also can't have etc1 texture
// data larger than the next power of 2 up from that.
- gfx::DeviceDisplayInfo display_info;
- int max_dimension = std::max(display_info.GetDisplayWidth(),
- display_info.GetDisplayHeight());
+ gfx::Size display_size =
+ display::Screen::GetScreen()->GetPrimaryDisplay().GetSizeInPixel();
+ int max_dimension = std::max(display_size.width(), display_size.height());
if (content_width > max_dimension
|| content_height > max_dimension
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698