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

Side by Side Diff: content/browser/web_contents/web_contents_view_aura.cc

Issue 2742383006: Display: set color_depth and depth_per_component value based on kEnableHDROutput (Closed)
Patch Set: rebase Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/web_contents/web_contents_view_aura.h" 5 #include "content/browser/web_contents/web_contents_view_aura.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 namespace { 696 namespace {
697 697
698 void GetScreenInfoForWindow(ScreenInfo* results, 698 void GetScreenInfoForWindow(ScreenInfo* results,
699 aura::Window* window) { 699 aura::Window* window) {
700 display::Screen* screen = display::Screen::GetScreen(); 700 display::Screen* screen = display::Screen::GetScreen();
701 const display::Display display = window 701 const display::Display display = window
702 ? screen->GetDisplayNearestWindow(window) 702 ? screen->GetDisplayNearestWindow(window)
703 : screen->GetPrimaryDisplay(); 703 : screen->GetPrimaryDisplay();
704 results->rect = display.bounds(); 704 results->rect = display.bounds();
705 results->available_rect = display.work_area(); 705 results->available_rect = display.work_area();
706 // TODO(derat|oshima): Don't hardcode this. Get this from display object. 706 results->depth = display.color_depth();
707 results->depth = 24; 707 results->depth_per_component = display.depth_per_component();
708 results->depth_per_component = 8; 708 results->is_monochrome = display.is_monochrome();
709 results->is_monochrome = false;
710 results->device_scale_factor = display.device_scale_factor(); 709 results->device_scale_factor = display.device_scale_factor();
711 results->icc_profile = gfx::ICCProfile::FromBestMonitor(); 710 results->icc_profile = gfx::ICCProfile::FromBestMonitor();
712 if (!results->icc_profile.IsValid()) 711 if (!results->icc_profile.IsValid())
713 gfx::ColorSpace::CreateSRGB().GetICCProfile(&results->icc_profile); 712 gfx::ColorSpace::CreateSRGB().GetICCProfile(&results->icc_profile);
714 DCHECK(results->icc_profile.IsValid()); 713 DCHECK(results->icc_profile.IsValid());
715 714
716 // The Display rotation and the ScreenInfo orientation are not the same 715 // The Display rotation and the ScreenInfo orientation are not the same
717 // angle. The former is the physical display rotation while the later is the 716 // angle. The former is the physical display rotation while the later is the
718 // rotation required by the content to be shown properly on the screen, in 717 // rotation required by the content to be shown properly on the screen, in
719 // other words, relative to the physical display. 718 // other words, relative to the physical display.
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
1338 bool allow_multiple_selection) { 1337 bool allow_multiple_selection) {
1339 NOTIMPLEMENTED() << " show " << items.size() << " menu items"; 1338 NOTIMPLEMENTED() << " show " << items.size() << " menu items";
1340 } 1339 }
1341 1340
1342 void WebContentsViewAura::HidePopupMenu() { 1341 void WebContentsViewAura::HidePopupMenu() {
1343 NOTIMPLEMENTED(); 1342 NOTIMPLEMENTED();
1344 } 1343 }
1345 #endif 1344 #endif
1346 1345
1347 } // namespace content 1346 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698