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

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: Minor fixes 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
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 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 } 601 }
602 602
603 XRRCrtcGamma* NativeDisplayDelegateX11::CreateGammaRampForProfile( 603 XRRCrtcGamma* NativeDisplayDelegateX11::CreateGammaRampForProfile(
604 const DisplaySnapshotX11& x11_output, 604 const DisplaySnapshotX11& x11_output,
605 ColorCalibrationProfile new_profile) { 605 ColorCalibrationProfile new_profile) {
606 // TODO(mukai|marcheu): Creates the appropriate gamma ramp data from the 606 // TODO(mukai|marcheu): Creates the appropriate gamma ramp data from the
607 // profile enum. It would be served by the vendor. 607 // profile enum. It would be served by the vendor.
608 return NULL; 608 return NULL;
609 } 609 }
610 610
611 bool NativeDisplayDelegateX11::SetGammaRamp(
612 const ui::DisplaySnapshot& output,
613 const std::vector<GammaRampRGBEntry>& lut) {
614 NOTIMPLEMENTED();
615 return false;
616 }
617
611 void NativeDisplayDelegateX11::DrawBackground() { 618 void NativeDisplayDelegateX11::DrawBackground() {
612 if (!background_color_argb_) 619 if (!background_color_argb_)
613 return; 620 return;
614 // Configuring CRTCs/Framebuffer clears the boot screen image. Paint the 621 // Configuring CRTCs/Framebuffer clears the boot screen image. Paint the
615 // same background color after updating framebuffer to minimize the 622 // same background color after updating framebuffer to minimize the
616 // duration of black screen at boot time. 623 // duration of black screen at boot time.
617 XColor color; 624 XColor color;
618 Colormap colormap = DefaultColormap(display_, 0); 625 Colormap colormap = DefaultColormap(display_, 0);
619 // XColor uses 16 bits per color. 626 // XColor uses 16 bits per color.
620 color.red = (background_color_argb_ & 0x00FF0000) >> 8; 627 color.red = (background_color_argb_ & 0x00FF0000) >> 8;
621 color.green = (background_color_argb_ & 0x0000FF00); 628 color.green = (background_color_argb_ & 0x0000FF00);
622 color.blue = (background_color_argb_ & 0x000000FF) << 8; 629 color.blue = (background_color_argb_ & 0x000000FF) << 8;
623 color.flags = DoRed | DoGreen | DoBlue; 630 color.flags = DoRed | DoGreen | DoBlue;
624 XAllocColor(display_, colormap, &color); 631 XAllocColor(display_, colormap, &color);
625 632
626 GC gc = XCreateGC(display_, window_, 0, 0); 633 GC gc = XCreateGC(display_, window_, 0, 0);
627 XSetForeground(display_, gc, color.pixel); 634 XSetForeground(display_, gc, color.pixel);
628 XSetFillStyle(display_, gc, FillSolid); 635 XSetFillStyle(display_, gc, FillSolid);
629 int width = DisplayWidth(display_, DefaultScreen(display_)); 636 int width = DisplayWidth(display_, DefaultScreen(display_));
630 int height = DisplayHeight(display_, DefaultScreen(display_)); 637 int height = DisplayHeight(display_, DefaultScreen(display_));
631 XFillRectangle(display_, window_, gc, 0, 0, width, height); 638 XFillRectangle(display_, window_, gc, 0, 0, width, height);
632 XFreeGC(display_, gc); 639 XFreeGC(display_, gc);
633 XFreeColors(display_, colormap, &color.pixel, 1, 0); 640 XFreeColors(display_, colormap, &color.pixel, 1, 0);
634 } 641 }
635 642
636 } // namespace ui 643 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698