[pypy-commit] lang-smalltalk storage-display-refactoring: Added comment.
anton_gulenko
noreply at buildbot.pypy.org
Tue Jul 22 23:27:03 CEST 2014
Author: Anton Gulenko <anton.gulenko at googlemail.com>
Branch: storage-display-refactoring
Changeset: r936:6f3f768d7ce8
Date: 2014-07-22 21:01 +0200
http://bitbucket.org/pypy/lang-smalltalk/changeset/6f3f768d7ce8/
Log: Added comment.
diff --git a/spyvm/model_display.py b/spyvm/model_display.py
--- a/spyvm/model_display.py
+++ b/spyvm/model_display.py
@@ -171,7 +171,7 @@
W_DisplayBitmap.__init__(self, space, w_class, size, depth)
def take_over_display(self):
- pitch = r_uint(self.display.pitch)
+ pitch = r_uint(self.display.pitch) # The pitch is different from the width input to SDL!
self.pitch = pitch
self.bits_in_last_word = pitch % BITS
self.words_per_line = r_uint((pitch - self.bits_in_last_word) / BITS)
@@ -202,4 +202,4 @@
word_on_line = n % self.words_per_line
y = r_uint((n - word_on_line) / self.words_per_line)
x = word_on_line * BITS / r_uint(self._depth)
- return y * r_uint(self.pitch) + x
+ return y * self.pitch + x
More information about the pypy-commit
mailing list