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

Side by Side Diff: ui/display/android/screen_android.cc

Issue 2325773003: cc: Plumb the monitor color profile to renderer for rasterization (Closed)
Patch Set: Unrevert Created 4 years, 3 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
« no previous file with comments | « ui/display/BUILD.gn ('k') | ui/display/display.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ui/display/screen.h" 5 #include "ui/display/screen.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "ui/display/display.h" 9 #include "ui/display/display.h"
10 #include "ui/gfx/android/device_display_info.h" 10 #include "ui/gfx/android/device_display_info.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 ? device_info.GetPhysicalDisplayHeight() 42 ? device_info.GetPhysicalDisplayHeight()
43 : device_info.GetDisplayHeight()); 43 : device_info.GetDisplayHeight());
44 const gfx::Rect bounds_in_dip = gfx::Rect(gfx::ScaleToCeiledSize( 44 const gfx::Rect bounds_in_dip = gfx::Rect(gfx::ScaleToCeiledSize(
45 bounds_in_pixels.size(), 1.0f / device_scale_factor)); 45 bounds_in_pixels.size(), 1.0f / device_scale_factor));
46 Display display(0, bounds_in_dip); 46 Display display(0, bounds_in_dip);
47 if (!Display::HasForceDeviceScaleFactor()) 47 if (!Display::HasForceDeviceScaleFactor())
48 display.set_device_scale_factor(device_scale_factor); 48 display.set_device_scale_factor(device_scale_factor);
49 display.SetRotationAsDegree(device_info.GetRotationDegrees()); 49 display.SetRotationAsDegree(device_info.GetRotationDegrees());
50 display.set_color_depth(device_info.GetBitsPerPixel()); 50 display.set_color_depth(device_info.GetBitsPerPixel());
51 display.set_depth_per_component(device_info.GetBitsPerComponent()); 51 display.set_depth_per_component(device_info.GetBitsPerComponent());
52 display.set_is_monochrome(device_info.GetBitsPerComponent() == 0);
52 return display; 53 return display;
53 } 54 }
54 55
55 Display GetDisplayNearestWindow(gfx::NativeView view) const override { 56 Display GetDisplayNearestWindow(gfx::NativeView view) const override {
56 return GetPrimaryDisplay(); 57 return GetPrimaryDisplay();
57 } 58 }
58 59
59 Display GetDisplayNearestPoint(const gfx::Point& point) const override { 60 Display GetDisplayNearestPoint(const gfx::Point& point) const override {
60 return GetPrimaryDisplay(); 61 return GetPrimaryDisplay();
61 } 62 }
(...skipping 18 matching lines...) Expand all
80 81
81 private: 82 private:
82 DISALLOW_COPY_AND_ASSIGN(ScreenAndroid); 83 DISALLOW_COPY_AND_ASSIGN(ScreenAndroid);
83 }; 84 };
84 85
85 Screen* CreateNativeScreen() { 86 Screen* CreateNativeScreen() {
86 return new ScreenAndroid; 87 return new ScreenAndroid;
87 } 88 }
88 89
89 } // namespace display 90 } // namespace display
OLDNEW
« no previous file with comments | « ui/display/BUILD.gn ('k') | ui/display/display.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698