Merge pull request #172 from linebender/query_pool_size

Fix query pool size
diff --git a/piet-gpu/bin/android.rs b/piet-gpu/bin/android.rs
index 8254cc0..968405e 100644
--- a/piet-gpu/bin/android.rs
+++ b/piet-gpu/bin/android.rs
@@ -110,7 +110,7 @@
                 .map(|_| session.create_semaphore())
                 .collect::<Result<Vec<_>, Error>>()?;
             let query_pools = (0..NUM_FRAMES)
-                .map(|_| session.create_query_pool(8))
+                .map(|_| session.create_query_pool(Renderer::QUERY_POOL_SIZE))
                 .collect::<Result<Vec<_>, Error>>()?;
             let submitted = Default::default();
             let cmd_bufs = Default::default();
diff --git a/piet-gpu/bin/cli.rs b/piet-gpu/bin/cli.rs
index 7d577d3..79914bf 100644
--- a/piet-gpu/bin/cli.rs
+++ b/piet-gpu/bin/cli.rs
@@ -232,7 +232,7 @@
         let session = Session::new(device);
 
         let mut cmd_buf = session.cmd_buf()?;
-        let query_pool = session.create_query_pool(8)?;
+        let query_pool = session.create_query_pool(Renderer::QUERY_POOL_SIZE)?;
 
         let mut ctx = PietGpuRenderContext::new();
         if let Some(input) = matches.value_of("INPUT") {
diff --git a/piet-gpu/bin/winit.rs b/piet-gpu/bin/winit.rs
index 78867f5..8f84da4 100644
--- a/piet-gpu/bin/winit.rs
+++ b/piet-gpu/bin/winit.rs
@@ -70,7 +70,7 @@
             .map(|_| session.create_semaphore())
             .collect::<Result<Vec<_>, Error>>()?;
         let query_pools = (0..NUM_FRAMES)
-            .map(|_| session.create_query_pool(12))
+            .map(|_| session.create_query_pool(Renderer::QUERY_POOL_SIZE))
             .collect::<Result<Vec<_>, Error>>()?;
         let mut cmd_bufs: [Option<CmdBuf>; NUM_FRAMES] = Default::default();
         let mut submitted: [Option<SubmittedCmdBuf>; NUM_FRAMES] = Default::default();
diff --git a/piet-gpu/src/lib.rs b/piet-gpu/src/lib.rs
index ba06e71..c75f41f 100644
--- a/piet-gpu/src/lib.rs
+++ b/piet-gpu/src/lib.rs
@@ -143,6 +143,9 @@
 }
 
 impl Renderer {
+    /// The number of query pool entries needed to run the renderer.
+    pub const QUERY_POOL_SIZE: u32 = 12;
+
     pub unsafe fn new(
         session: &Session,
         width: usize,