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

Side by Side Diff: ui/display/chromeos/x11/native_display_delegate_x11.cc

Issue 1028563003: Load and apply a vcgt table from an ICC file to the internal display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix ozone build Created 5 years, 7 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/chromeos/x11/native_display_delegate_x11.h ('k') | ui/display/display.gyp » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/chromeos/x11/native_display_delegate_x11.h" 5 #include "ui/display/chromeos/x11/native_display_delegate_x11.h"
6 6
7 #include <X11/Xatom.h> 7 #include <X11/Xatom.h>
8 #include <X11/Xlib.h> 8 #include <X11/Xlib.h>
9 #include <X11/extensions/dpms.h> 9 #include <X11/extensions/dpms.h>
10 #include <X11/extensions/Xrandr.h> 10 #include <X11/extensions/Xrandr.h>
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 } 616 }
617 617
618 XRRCrtcGamma* NativeDisplayDelegateX11::CreateGammaRampForProfile( 618 XRRCrtcGamma* NativeDisplayDelegateX11::CreateGammaRampForProfile(
619 const DisplaySnapshotX11& x11_output, 619 const DisplaySnapshotX11& x11_output,
620 ColorCalibrationProfile new_profile) { 620 ColorCalibrationProfile new_profile) {
621 // TODO(mukai|marcheu): Creates the appropriate gamma ramp data from the 621 // TODO(mukai|marcheu): Creates the appropriate gamma ramp data from the
622 // profile enum. It would be served by the vendor. 622 // profile enum. It would be served by the vendor.
623 return NULL; 623 return NULL;
624 } 624 }
625 625
626 bool NativeDisplayDelegateX11::SetGammaRamp(
627 const ui::DisplaySnapshot& output,
628 const std::vector<GammaRampRGBEntry>& lut) {
629 NOTIMPLEMENTED();
630 return false;
631 }
632
626 void NativeDisplayDelegateX11::DrawBackground() { 633 void NativeDisplayDelegateX11::DrawBackground() {
627 if (!background_color_argb_) 634 if (!background_color_argb_)
628 return; 635 return;
629 // Configuring CRTCs/Framebuffer clears the boot screen image. Paint the 636 // Configuring CRTCs/Framebuffer clears the boot screen image. Paint the
630 // same background color after updating framebuffer to minimize the 637 // same background color after updating framebuffer to minimize the
631 // duration of black screen at boot time. 638 // duration of black screen at boot time.
632 XColor color; 639 XColor color;
633 Colormap colormap = DefaultColormap(display_, 0); 640 Colormap colormap = DefaultColormap(display_, 0);
634 // XColor uses 16 bits per color. 641 // XColor uses 16 bits per color.
635 color.red = (background_color_argb_ & 0x00FF0000) >> 8; 642 color.red = (background_color_argb_ & 0x00FF0000) >> 8;
636 color.green = (background_color_argb_ & 0x0000FF00); 643 color.green = (background_color_argb_ & 0x0000FF00);
637 color.blue = (background_color_argb_ & 0x000000FF) << 8; 644 color.blue = (background_color_argb_ & 0x000000FF) << 8;
638 color.flags = DoRed | DoGreen | DoBlue; 645 color.flags = DoRed | DoGreen | DoBlue;
639 XAllocColor(display_, colormap, &color); 646 XAllocColor(display_, colormap, &color);
640 647
641 GC gc = XCreateGC(display_, window_, 0, 0); 648 GC gc = XCreateGC(display_, window_, 0, 0);
642 XSetForeground(display_, gc, color.pixel); 649 XSetForeground(display_, gc, color.pixel);
643 XSetFillStyle(display_, gc, FillSolid); 650 XSetFillStyle(display_, gc, FillSolid);
644 int width = DisplayWidth(display_, DefaultScreen(display_)); 651 int width = DisplayWidth(display_, DefaultScreen(display_));
645 int height = DisplayHeight(display_, DefaultScreen(display_)); 652 int height = DisplayHeight(display_, DefaultScreen(display_));
646 XFillRectangle(display_, window_, gc, 0, 0, width, height); 653 XFillRectangle(display_, window_, gc, 0, 0, width, height);
647 XFreeGC(display_, gc); 654 XFreeGC(display_, gc);
648 XFreeColors(display_, colormap, &color.pixel, 1, 0); 655 XFreeColors(display_, colormap, &color.pixel, 1, 0);
649 } 656 }
650 657
651 } // namespace ui 658 } // namespace ui
OLDNEW
« no previous file with comments | « ui/display/chromeos/x11/native_display_delegate_x11.h ('k') | ui/display/display.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698