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

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

Issue 22871010: chromeos: Include mode details in OutputSnapshot. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge 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
« no previous file with comments | « chromeos/display/output_util.cc ('k') | chromeos/display/real_output_configurator_delegate.cc » ('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 (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 21 matching lines...) Expand all
32 virtual void InitXRandRExtension(int* event_base) OVERRIDE; 32 virtual void InitXRandRExtension(int* event_base) OVERRIDE;
33 virtual void UpdateXRandRConfiguration( 33 virtual void UpdateXRandRConfiguration(
34 const base::NativeEvent& event) OVERRIDE; 34 const base::NativeEvent& event) OVERRIDE;
35 virtual void GrabServer() OVERRIDE; 35 virtual void GrabServer() OVERRIDE;
36 virtual void UngrabServer() OVERRIDE; 36 virtual void UngrabServer() OVERRIDE;
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(
43 RRMode mode,
44 int* width,
45 int* height,
46 bool* interlaced) OVERRIDE;
47 virtual bool ConfigureCrtc( 42 virtual bool ConfigureCrtc(
48 RRCrtc crtc, 43 RRCrtc crtc,
49 RRMode mode, 44 RRMode mode,
50 RROutput output, 45 RROutput output,
51 int x, 46 int x,
52 int y) OVERRIDE; 47 int y) OVERRIDE;
53 virtual void CreateFrameBuffer( 48 virtual void CreateFrameBuffer(
54 int width, 49 int width,
55 int height, 50 int height,
56 const std::vector<OutputConfigurator::OutputSnapshot>& outputs) OVERRIDE; 51 const std::vector<OutputConfigurator::OutputSnapshot>& outputs) OVERRIDE;
57 virtual void ConfigureCTM( 52 virtual void ConfigureCTM(
58 int touch_device_id, 53 int touch_device_id,
59 const OutputConfigurator::CoordinateTransformation& ctm) OVERRIDE; 54 const OutputConfigurator::CoordinateTransformation& ctm) OVERRIDE;
60 virtual void SendProjectingStateToPowerManager(bool projecting) OVERRIDE; 55 virtual void SendProjectingStateToPowerManager(bool projecting) OVERRIDE;
61 56
62 private: 57 private:
58 // Gets details corresponding to |mode|. Parameters may be NULL. Returns
59 // true on success.
60 bool GetModeDetails(RRMode mode, int* width, int* height, bool* interlaced);
61
62 // Helper method for GetOutputs() that returns an OutputSnapshot struct based
63 // on the passed-in information. Further initialization is required (e.g.
64 // |selected_mode|, |mirror_mode|, and |touch_device_id|).
65 OutputConfigurator::OutputSnapshot InitOutputSnapshot(
66 RROutput id,
67 XRROutputInfo* info,
68 RRCrtc* last_used_crtc,
69 int index);
70
63 // Destroys unused CRTCs and parks used CRTCs in a way which allows a 71 // Destroys unused CRTCs and parks used CRTCs in a way which allows a
64 // framebuffer resize. This is faster than turning them off, resizing, 72 // framebuffer resize. This is faster than turning them off, resizing,
65 // then turning them back on. 73 // then turning them back on.
66 void DestroyUnusedCrtcs( 74 void DestroyUnusedCrtcs(
67 const std::vector<OutputConfigurator::OutputSnapshot>& outputs); 75 const std::vector<OutputConfigurator::OutputSnapshot>& outputs);
68 76
69 // Returns whether |id| is configured to preserve aspect when scaling. 77 // Returns whether |id| is configured to preserve aspect when scaling.
70 bool IsOutputAspectPreservingScaling(RROutput id); 78 bool IsOutputAspectPreservingScaling(RROutput id);
71 79
72 // Looks for a mode on internal and external outputs having same 80 // Looks for a mode on internal and external outputs having same
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 113
106 // Used to enable modes which rely on panel fitting. 114 // Used to enable modes which rely on panel fitting.
107 bool is_panel_fitting_enabled_; 115 bool is_panel_fitting_enabled_;
108 116
109 DISALLOW_COPY_AND_ASSIGN(RealOutputConfiguratorDelegate); 117 DISALLOW_COPY_AND_ASSIGN(RealOutputConfiguratorDelegate);
110 }; 118 };
111 119
112 } // namespace chromeos 120 } // namespace chromeos
113 121
114 #endif // CHROMEOS_DISPLAY_REAL_OUTPUT_CONFIGURATOR_DELEGATE_H_ 122 #endif // CHROMEOS_DISPLAY_REAL_OUTPUT_CONFIGURATOR_DELEGATE_H_
OLDNEW
« no previous file with comments | « chromeos/display/output_util.cc ('k') | chromeos/display/real_output_configurator_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698