gfx: Switch the default to CPU painting.

We've discussed this some and I think there's consensus to do it as a
pragmatic decision for now. CPU painting is more stable, especially with
buggy drivers, and faster (because we aren't caching the necessary
OpenGL objects yet and possibly for other reasons), so it provides a
better "out of the box" experience for newcomers to Servo who don't know
to pass the `-c` option. This patch continues to reftest both Skia and
Skia-GL out of a desire to keep options open. Skia-GL remains a
first-class citizen.
This commit is contained in:
Patrick Walton 2014-10-20 23:12:50 -07:00
parent 156ca98236
commit 32e34663cd
4 changed files with 15 additions and 11 deletions

View file

@ -162,7 +162,7 @@ impl<C:RenderListener + Send> RenderTask<C> {
{ // Ensures RenderTask and graphics context are destroyed before shutdown msg
let native_graphics_context = compositor.get_graphics_metadata().map(
|md| NativePaintingGraphicsContext::from_metadata(&md));
let cpu_painting = opts::get().cpu_painting;
let gpu_painting = opts::get().gpu_painting;
// FIXME: rust/#5967
let mut render_task = RenderTask {
@ -173,10 +173,10 @@ impl<C:RenderListener + Send> RenderTask<C> {
font_ctx: box FontContext::new(fc.clone()),
time_profiler_chan: time_profiler_chan,
graphics_context: if cpu_painting {
CpuGraphicsContext
} else {
graphics_context: if gpu_painting {
GpuGraphicsContext
} else {
CpuGraphicsContext
},
native_graphics_context: native_graphics_context,