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

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

Issue 1182063002: Add support for more advanced color correction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@qcms-fixed-point-gamma
Patch Set: Rebase after quirks changes Created 4 years, 8 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 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 } 619 }
620 620
621 XRRCrtcGamma* NativeDisplayDelegateX11::CreateGammaRampForProfile( 621 XRRCrtcGamma* NativeDisplayDelegateX11::CreateGammaRampForProfile(
622 const DisplaySnapshotX11& x11_output, 622 const DisplaySnapshotX11& x11_output,
623 ColorCalibrationProfile new_profile) { 623 ColorCalibrationProfile new_profile) {
624 // TODO(mukai|marcheu): Creates the appropriate gamma ramp data from the 624 // TODO(mukai|marcheu): Creates the appropriate gamma ramp data from the
625 // profile enum. It would be served by the vendor. 625 // profile enum. It would be served by the vendor.
626 return NULL; 626 return NULL;
627 } 627 }
628 628
629 bool NativeDisplayDelegateX11::SetGammaRamp( 629 bool NativeDisplayDelegateX11::SetColorCorrection(
630 const ui::DisplaySnapshot& output, 630 const ui::DisplaySnapshot& output,
631 const std::vector<GammaRampRGBEntry>& lut) { 631 const std::vector<GammaRampRGBEntry>& degamma_lut,
632 const std::vector<GammaRampRGBEntry>& gamma_lut,
633 const std::vector<float>& correction_matrix) {
632 NOTIMPLEMENTED(); 634 NOTIMPLEMENTED();
633 return false; 635 return false;
634 } 636 }
635 637
636 void NativeDisplayDelegateX11::DrawBackground() { 638 void NativeDisplayDelegateX11::DrawBackground() {
637 if (!background_color_argb_) 639 if (!background_color_argb_)
638 return; 640 return;
639 // Configuring CRTCs/Framebuffer clears the boot screen image. Paint the 641 // Configuring CRTCs/Framebuffer clears the boot screen image. Paint the
640 // same background color after updating framebuffer to minimize the 642 // same background color after updating framebuffer to minimize the
641 // duration of black screen at boot time. 643 // duration of black screen at boot time.
(...skipping 10 matching lines...) Expand all
652 XSetForeground(display_, gc, color.pixel); 654 XSetForeground(display_, gc, color.pixel);
653 XSetFillStyle(display_, gc, FillSolid); 655 XSetFillStyle(display_, gc, FillSolid);
654 int width = DisplayWidth(display_, DefaultScreen(display_)); 656 int width = DisplayWidth(display_, DefaultScreen(display_));
655 int height = DisplayHeight(display_, DefaultScreen(display_)); 657 int height = DisplayHeight(display_, DefaultScreen(display_));
656 XFillRectangle(display_, window_, gc, 0, 0, width, height); 658 XFillRectangle(display_, window_, gc, 0, 0, width, height);
657 XFreeGC(display_, gc); 659 XFreeGC(display_, gc);
658 XFreeColors(display_, colormap, &color.pixel, 1, 0); 660 XFreeColors(display_, colormap, &color.pixel, 1, 0);
659 } 661 }
660 662
661 } // namespace ui 663 } // namespace ui
OLDNEW
« no previous file with comments | « ui/display/chromeos/x11/native_display_delegate_x11.h ('k') | ui/display/types/display_snapshot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698