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

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

Issue 2496913003: Display linear-srgb color managed canvas (Closed)
Patch Set: Setting the layout test to fail on Mac. Created 4 years, 1 month 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 647 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 const display::Display display = window 658 const display::Display display = window
659 ? screen->GetDisplayNearestWindow(window) 659 ? screen->GetDisplayNearestWindow(window)
660 : screen->GetPrimaryDisplay(); 660 : screen->GetPrimaryDisplay();
661 results->rect = display.bounds(); 661 results->rect = display.bounds();
662 results->available_rect = display.work_area(); 662 results->available_rect = display.work_area();
663 // TODO(derat|oshima): Don't hardcode this. Get this from display object. 663 // TODO(derat|oshima): Don't hardcode this. Get this from display object.
664 results->depth = 24; 664 results->depth = 24;
665 results->depth_per_component = 8; 665 results->depth_per_component = 8;
666 results->is_monochrome = false; 666 results->is_monochrome = false;
667 results->device_scale_factor = display.device_scale_factor(); 667 results->device_scale_factor = display.device_scale_factor();
668 results->icc_profile = gfx::ICCProfile::FromBestMonitor();
669 if (results->icc_profile == gfx::ICCProfile())
670 results->icc_profile =
671 gfx::ICCProfile::FromColorSpace(gfx::ColorSpace::CreateSRGB());
sadrul 2016/11/17 21:42:43 {}?
zakerinasab 2016/11/18 14:38:27 Done.
668 672
669 // The Display rotation and the ScreenInfo orientation are not the same 673 // The Display rotation and the ScreenInfo orientation are not the same
670 // angle. The former is the physical display rotation while the later is the 674 // angle. The former is the physical display rotation while the later is the
671 // rotation required by the content to be shown properly on the screen, in 675 // rotation required by the content to be shown properly on the screen, in
672 // other words, relative to the physical display. 676 // other words, relative to the physical display.
673 results->orientation_angle = display.RotationAsDegree(); 677 results->orientation_angle = display.RotationAsDegree();
674 if (results->orientation_angle == 90) 678 if (results->orientation_angle == 90)
675 results->orientation_angle = 270; 679 results->orientation_angle = 270;
676 else if (results->orientation_angle == 270) 680 else if (results->orientation_angle == 270)
677 results->orientation_angle = 90; 681 results->orientation_angle = 90;
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
1249 bool allow_multiple_selection) { 1253 bool allow_multiple_selection) {
1250 NOTIMPLEMENTED() << " show " << items.size() << " menu items"; 1254 NOTIMPLEMENTED() << " show " << items.size() << " menu items";
1251 } 1255 }
1252 1256
1253 void WebContentsViewAura::HidePopupMenu() { 1257 void WebContentsViewAura::HidePopupMenu() {
1254 NOTIMPLEMENTED(); 1258 NOTIMPLEMENTED();
1255 } 1259 }
1256 #endif 1260 #endif
1257 1261
1258 } // namespace content 1262 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698