Lines Matching refs:mode

27 get_mode_frequency(const display_mode& mode)
30 float timing = float(mode.timing.h_total * mode.timing.v_total);
34 return rint(10 * float(mode.timing.pixel_clock * 1000)
64 /*! Finds the mode in the mode list that is closest to the mode specified.
65 As long as the mode list is not empty, this method will always succeed.
90 Screen::SetMode(const display_mode& mode)
94 if (!memcmp(&mode, &current, sizeof(display_mode)))
99 status_t status = fHWInterface->SetMode(mode);
112 display_mode mode;
113 mode.timing = timing;
114 mode.space = colorSpace;
115 mode.virtual_width = width;
116 mode.virtual_height = height;
117 mode.h_display_start = 0;
118 mode.v_display_start = 0;
119 mode.flags = 0;
121 return SetMode(mode);
129 // search for a matching mode
141 debug_printf("app_server: Finding best mode for %ux%u (%" B_PRIu32
150 // Just use the first mode in the list
156 display_mode mode = modes[index];
159 float modeFrequency = get_mode_frequency(mode);
160 display_mode originalMode = mode;
166 mode.timing.pixel_clock = ((uint32)mode.timing.h_total
167 * mode.timing.v_total / 10 * int32(frequency * 10)) / 1000;
170 status = SetMode(mode);
172 // try again with the unchanged mode
183 display_mode mode;
184 status_t status = fHWInterface->GetPreferredMode(&mode);
188 return SetMode(mode);
193 Screen::GetMode(display_mode& mode) const
195 fHWInterface->GetMode(&mode);
203 display_mode mode;
204 fHWInterface->GetMode(&mode);
206 width = mode.virtual_width;
207 height = mode.virtual_height;
208 colorspace = mode.space;
209 frequency = get_mode_frequency(mode);
230 display_mode mode;
231 fHWInterface->GetMode(&mode);
233 return BRect(0, 0, mode.virtual_width - 1, mode.virtual_height - 1);
240 display_mode mode;
241 fHWInterface->GetMode(&mode);
243 return (color_space)mode.space;
247 /*! \brief Returns the mode that matches the given criteria best.
258 const display_mode& mode = modes[i];
259 if (mode.virtual_width != width)
264 int32 diff = 1000 * abs(mode.timing.v_display - height)
265 + int32(fabs(get_mode_frequency(mode) - frequency) * 10)
266 + 100 * abs((int)(mode.space - colorSpace));