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

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

Issue 1118373006: Revert of 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: 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
633 void NativeDisplayDelegateX11::DrawBackground() { 626 void NativeDisplayDelegateX11::DrawBackground() {
634 if (!background_color_argb_) 627 if (!background_color_argb_)
635 return; 628 return;
636 // Configuring CRTCs/Framebuffer clears the boot screen image. Paint the 629 // Configuring CRTCs/Framebuffer clears the boot screen image. Paint the
637 // same background color after updating framebuffer to minimize the 630 // same background color after updating framebuffer to minimize the
638 // duration of black screen at boot time. 631 // duration of black screen at boot time.
639 XColor color; 632 XColor color;
640 Colormap colormap = DefaultColormap(display_, 0); 633 Colormap colormap = DefaultColormap(display_, 0);
641 // XColor uses 16 bits per color. 634 // XColor uses 16 bits per color.
642 color.red = (background_color_argb_ & 0x00FF0000) >> 8; 635 color.red = (background_color_argb_ & 0x00FF0000) >> 8;
643 color.green = (background_color_argb_ & 0x0000FF00); 636 color.green = (background_color_argb_ & 0x0000FF00);
644 color.blue = (background_color_argb_ & 0x000000FF) << 8; 637 color.blue = (background_color_argb_ & 0x000000FF) << 8;
645 color.flags = DoRed | DoGreen | DoBlue; 638 color.flags = DoRed | DoGreen | DoBlue;
646 XAllocColor(display_, colormap, &color); 639 XAllocColor(display_, colormap, &color);
647 640
648 GC gc = XCreateGC(display_, window_, 0, 0); 641 GC gc = XCreateGC(display_, window_, 0, 0);
649 XSetForeground(display_, gc, color.pixel); 642 XSetForeground(display_, gc, color.pixel);
650 XSetFillStyle(display_, gc, FillSolid); 643 XSetFillStyle(display_, gc, FillSolid);
651 int width = DisplayWidth(display_, DefaultScreen(display_)); 644 int width = DisplayWidth(display_, DefaultScreen(display_));
652 int height = DisplayHeight(display_, DefaultScreen(display_)); 645 int height = DisplayHeight(display_, DefaultScreen(display_));
653 XFillRectangle(display_, window_, gc, 0, 0, width, height); 646 XFillRectangle(display_, window_, gc, 0, 0, width, height);
654 XFreeGC(display_, gc); 647 XFreeGC(display_, gc);
655 XFreeColors(display_, colormap, &color.pixel, 1, 0); 648 XFreeColors(display_, colormap, &color.pixel, 1, 0);
656 } 649 }
657 650
658 } // namespace ui 651 } // 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