[Cogl] [PATCH] By default enable swap throttling

Robert Bragg robert at sixbynine.org
Mon May 14 14:21:03 PDT 2012


From: Robert Bragg <robert at linux.intel.com>

This ensures that when we initialize a CoglOnscreenTemplate that
->swap_throttled is set to TRUE so by default Cogl applications should
have their swap buffer requests throttled to the vblank frequency.
---
 cogl/cogl-onscreen-template.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/cogl/cogl-onscreen-template.c b/cogl/cogl-onscreen-template.c
index 1ce8b97..5fa5b99 100644
--- a/cogl/cogl-onscreen-template.c
+++ b/cogl/cogl-onscreen-template.c
@@ -57,6 +57,7 @@ cogl_onscreen_template_new (CoglSwapChain *swap_chain)
   else
     onscreen_template->config.swap_chain = cogl_swap_chain_new ();
 
+  onscreen_template->config.swap_throttled = TRUE;
   onscreen_template->config.need_stencil = TRUE;
   onscreen_template->config.samples_per_pixel = 0;
 
-- 
1.7.7.6



More information about the Cogl mailing list