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

Unified Diff: chromeos/display/output_configurator.h

Issue 10909242: Add "panel_fitting" GPU feature type and use it for mirror mode. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Reorganized code per oshima's suggestion. Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chromeos/display/output_configurator.h
diff --git a/chromeos/display/output_configurator.h b/chromeos/display/output_configurator.h
index ca03bfd1bf4462d01772bab949adc06fb6aef7ad..dd14e74d0fdfd7324f3f8f93f6c926c065b22e7a 100644
--- a/chromeos/display/output_configurator.h
+++ b/chromeos/display/output_configurator.h
@@ -22,6 +22,8 @@ typedef XID RRMode;
struct _XRRScreenResources;
typedef _XRRScreenResources XRRScreenResources;
+struct _XRROutputInfo;
+typedef _XRROutputInfo XRROutputInfo;
namespace chromeos {
@@ -57,6 +59,10 @@ class CHROMEOS_EXPORT OutputConfigurator : public MessageLoop::Dispatcher {
OutputState output_state() const { return output_state_; }
+ // Initialization, must be called right after constructor.
+ // |is_panel_fitting_supported| indicates hardware panel fitting support.
+ void Init(bool is_panel_fitting_supported);
+
// Called when the user hits ctrl-F4 to request a display mode change.
// This method should only return false if it was called in a single-head or
// headless mode.
@@ -85,6 +91,9 @@ class CHROMEOS_EXPORT OutputConfigurator : public MessageLoop::Dispatcher {
// Tells if the output specified by |name| is for internal display.
static bool IsInternalOutputName(const std::string& name);
+ // Returns output's native mode, None if not found.
+ static RRMode GetOutputNativeMode(const XRROutputInfo* output_info);
+
private:
// Fires OnDisplayModeChanged() event to the observers.
void NotifyOnDisplayChanged();
@@ -96,6 +105,10 @@ class CHROMEOS_EXPORT OutputConfigurator : public MessageLoop::Dispatcher {
// configuration to immediately fail without changing the state.
bool is_running_on_chrome_os_;
+ // This is set externally in Init,
+ // and is used to enable modes which rely on panel fitting.
+ bool is_panel_fitting_supported_;
cwolfe 2012/09/18 13:27:47 Weak preference for something like use_panel_fitti
ynovikov 2012/09/21 18:48:27 Done.
+
// The number of outputs that are connected.
int connected_output_count_;

Powered by Google App Engine
This is Rietveld 408576698