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

Side by Side Diff: chromeos/display/real_output_configurator_delegate.h

Issue 22605008: chromeos: Make OutputConfigurator save latest config. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix interpretation of XRRSetCrtcConfig return value Created 7 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #ifndef CHROMEOS_DISPLAY_REAL_OUTPUT_CONFIGURATOR_DELEGATE_H_ 5 #ifndef CHROMEOS_DISPLAY_REAL_OUTPUT_CONFIGURATOR_DELEGATE_H_
6 #define CHROMEOS_DISPLAY_REAL_OUTPUT_CONFIGURATOR_DELEGATE_H_ 6 #define CHROMEOS_DISPLAY_REAL_OUTPUT_CONFIGURATOR_DELEGATE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 26 matching lines...) Expand all
37 virtual void SyncWithServer() OVERRIDE; 37 virtual void SyncWithServer() OVERRIDE;
38 virtual void SetBackgroundColor(uint32 color_argb) OVERRIDE; 38 virtual void SetBackgroundColor(uint32 color_argb) OVERRIDE;
39 virtual void ForceDPMSOn() OVERRIDE; 39 virtual void ForceDPMSOn() OVERRIDE;
40 virtual std::vector<OutputConfigurator::OutputSnapshot> GetOutputs( 40 virtual std::vector<OutputConfigurator::OutputSnapshot> GetOutputs(
41 const OutputConfigurator::StateController* state_controller) OVERRIDE; 41 const OutputConfigurator::StateController* state_controller) OVERRIDE;
42 virtual bool GetModeDetails( 42 virtual bool GetModeDetails(
43 RRMode mode, 43 RRMode mode,
44 int* width, 44 int* width,
45 int* height, 45 int* height,
46 bool* interlaced) OVERRIDE; 46 bool* interlaced) OVERRIDE;
47 virtual void ConfigureCrtc(OutputConfigurator::CrtcConfig* config) OVERRIDE; 47 virtual bool ConfigureCrtc(
48 RRCrtc crtc,
49 RRMode mode,
50 RROutput output,
51 int x,
52 int y) OVERRIDE;
48 virtual void CreateFrameBuffer( 53 virtual void CreateFrameBuffer(
49 int width, 54 int width,
50 int height, 55 int height,
51 const std::vector<OutputConfigurator::CrtcConfig>& configs) OVERRIDE; 56 const std::vector<OutputConfigurator::OutputSnapshot>& outputs) OVERRIDE;
52 virtual void ConfigureCTM( 57 virtual void ConfigureCTM(
53 int touch_device_id, 58 int touch_device_id,
54 const OutputConfigurator::CoordinateTransformation& ctm) OVERRIDE; 59 const OutputConfigurator::CoordinateTransformation& ctm) OVERRIDE;
55 virtual void SendProjectingStateToPowerManager(bool projecting) OVERRIDE; 60 virtual void SendProjectingStateToPowerManager(bool projecting) OVERRIDE;
56 61
57 private: 62 private:
58 // Destroys unused CRTCs and parks used CRTCs in a way which allows a 63 // Destroys unused CRTCs and parks used CRTCs in a way which allows a
59 // framebuffer resize. This is faster than turning them off, resizing, 64 // framebuffer resize. This is faster than turning them off, resizing,
60 // then turning them back on. 65 // then turning them back on.
61 void DestroyUnusedCrtcs( 66 void DestroyUnusedCrtcs(
62 const std::vector<OutputConfigurator::CrtcConfig>& configs); 67 const std::vector<OutputConfigurator::OutputSnapshot>& outputs);
63 68
64 // Returns whether |id| is configured to preserve aspect when scaling. 69 // Returns whether |id| is configured to preserve aspect when scaling.
65 bool IsOutputAspectPreservingScaling(RROutput id); 70 bool IsOutputAspectPreservingScaling(RROutput id);
66 71
67 // Looks for a mode on internal and external outputs having same 72 // Looks for a mode on internal and external outputs having same
68 // resolution. |internal_info| and |external_info| are used to search 73 // resolution. |internal_info| and |external_info| are used to search
69 // for the modes. |internal_output_id| is used to create a new mode, if 74 // for the modes. |internal_output_id| is used to create a new mode, if
70 // applicable. |try_creating|=true will enable creating panel-fitting 75 // applicable. |try_creating|=true will enable creating panel-fitting
71 // mode on the |internal_info| output instead of only searching for a 76 // mode on the |internal_info| output instead of only searching for a
72 // matching mode. Note: it may lead to a crash, if |internal_info| is 77 // matching mode. Note: it may lead to a crash, if |internal_info| is
(...skipping 27 matching lines...) Expand all
100 105
101 // Used to enable modes which rely on panel fitting. 106 // Used to enable modes which rely on panel fitting.
102 bool is_panel_fitting_enabled_; 107 bool is_panel_fitting_enabled_;
103 108
104 DISALLOW_COPY_AND_ASSIGN(RealOutputConfiguratorDelegate); 109 DISALLOW_COPY_AND_ASSIGN(RealOutputConfiguratorDelegate);
105 }; 110 };
106 111
107 } // namespace chromeos 112 } // namespace chromeos
108 113
109 #endif // CHROMEOS_DISPLAY_REAL_OUTPUT_CONFIGURATOR_DELEGATE_H_ 114 #endif // CHROMEOS_DISPLAY_REAL_OUTPUT_CONFIGURATOR_DELEGATE_H_
OLDNEW
« no previous file with comments | « chromeos/display/output_configurator_unittest.cc ('k') | chromeos/display/real_output_configurator_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698