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

Unified Diff: content/browser/media/capture/web_contents_video_capture_device.cc

Issue 672823002: Remove IsDIPEnabled from Screen (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dpi-cleanup-1
Patch Set: rebase Created 6 years, 2 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: content/browser/media/capture/web_contents_video_capture_device.cc
diff --git a/content/browser/media/capture/web_contents_video_capture_device.cc b/content/browser/media/capture/web_contents_video_capture_device.cc
index 2a10c94181a1a1fa30a4c38f8fd35275a73803f0..4a931fc54b0c150ed9b4a1f11ed03a4f65862c4d 100644
--- a/content/browser/media/capture/web_contents_video_capture_device.cc
+++ b/content/browser/media/capture/web_contents_video_capture_device.cc
@@ -667,15 +667,13 @@ gfx::Size WebContentsCaptureMachine::ComputeOptimalTargetSize() const {
if (rwhv) {
const gfx::NativeView view = rwhv->GetNativeView();
gfx::Screen* const screen = gfx::Screen::GetScreenFor(view);
- if (screen->IsDIPEnabled()) {
- const gfx::Display display = screen->GetDisplayNearestWindow(view);
- const float scale = display.device_scale_factor();
- if (scale > 1.0f) {
- const gfx::Size shrunk_size(
- gfx::ToFlooredSize(gfx::ScaleSize(optimal_size, 1.0f / scale)));
- if (shrunk_size.width() > 0 && shrunk_size.height() > 0)
- optimal_size = shrunk_size;
- }
+ const gfx::Display display = screen->GetDisplayNearestWindow(view);
+ const float scale = display.device_scale_factor();
+ if (scale > 1.0f) {
+ const gfx::Size shrunk_size(
+ gfx::ToFlooredSize(gfx::ScaleSize(optimal_size, 1.0f / scale)));
+ if (shrunk_size.width() > 0 && shrunk_size.height() > 0)
+ optimal_size = shrunk_size;
}
}

Powered by Google App Engine
This is Rietveld 408576698