[pitivi] previewer.py: add spacing offset to thumbnail duration, eliminates some uncessary re-renderings
- From: Edward Hervey <edwardrv src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [pitivi] previewer.py: add spacing offset to thumbnail duration, eliminates some uncessary re-renderings
- Date: Wed, 30 Sep 2009 09:24:52 +0000 (UTC)
commit d56b490a38696e359831bad48aca6c9b621fc1bf
Author: Brandon Lewis <brandon_lewis berkeley edu>
Date: Thu Sep 24 13:25:01 2009 -0700
previewer.py: add spacing offset to thumbnail duration, eliminates some uncessary re-renderings
pitivi/ui/previewer.py | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/pitivi/ui/previewer.py b/pitivi/ui/previewer.py
index f44118a..70337d3 100644
--- a/pitivi/ui/previewer.py
+++ b/pitivi/ui/previewer.py
@@ -250,12 +250,14 @@ class RandomAccessPreviewer(Previewer):
# further, which would result in fewer thumbnails needing to be
# generated.
j = Zoomable.pixelToNs(i - sof)
+ istep = self.twidth + self._spacing()
+ jstep = self.tdur + Zoomable.pixelToNs(self.spacing)
while i < bounds.x2:
self._thumbForTime(cr, j, i, y1)
cr.rectangle(i - 1, y1, self.twidth + 2, self.theight)
- i += self.twidth + self._spacing()
- j += self.tdur
+ i += istep
+ j += jstep
cr.fill()
def _spacing(self):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]