Skip to content

Commit 79a59bf

Browse files
committed
MSS: Speed-up grabbing o the 3 platforms
1 parent 1b99ce4 commit 79a59bf

20 files changed

Lines changed: 187 additions & 94 deletions

.github/ISSUE_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ General informations:
77
* Monitor 1: _800x600_
88
* Monitor 2: _1920x1080_
99
* Python version: _3.6.4_
10-
* MSS version: __3.1.3__
10+
* MSS version: __3.2.0__
1111

1212

1313
For GNU/Linux users:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ MANIFEST*
1010
*.png
1111
*.png.old
1212
*.pyc
13+
.pytest_cache

.travis.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
language: python
22
python:
33
- 2.7
4-
- 3.4
54
- 3.5
65
- 3.6
7-
# - nightly # currently points to 3.7-dev
6+
- nightly # currently points to 3.7-dev
87

98
addons:
109
apt:
@@ -25,12 +24,9 @@ install:
2524
script:
2625
- py.test --showlocals --display=":42.0"
2726
- flake8 .
28-
- pylint mss
27+
- if [[ $TRAVIS_PYTHON_VERSION < '3.7' ]]; then pylint mss; fi
2928
- if [[ $TRAVIS_PYTHON_VERSION > '2.8' ]]; then cd docs && make clean html; fi
3029

3130
after_script:
3231
- xpra stop :42
3332
- cat ~/.xpra/*.log
34-
35-
matrix:
36-
fast_finish: true

CHANGELOG

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ History:
44

55
dev 2018/xx/xx
66
- add PNG compression level control
7-
- MSS: add Screenshot.bgra attribute
7+
- MSS: add the Screenshot.bgra attribute
8+
- MSS: speed-up grabbing on the 3 platforms
9+
- tests: add leaks.py and benchmarks.py for manual testing
810

911
3.1.2 2018/01/05
1012
- removed support for Python 3.3
@@ -26,7 +28,7 @@ dev 2018/xx/xx
2628
- Mac: properly support all display scaling and resolutions (fix #14, #19, #21, #23)
2729
- Mac: fix memory leaks (fix #24)
2830
- Linux: handle bad display value
29-
- Windows: Take into account zoom factor for high-DPI displays (fix #20)
31+
- Windows: take into account zoom factor for high-DPI displays (fix #20)
3032

3133
3.0.1 2017/07/06
3234
- fix examples links

CHANGES.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
3.1.3 (2018-xx-xx)
1+
3.2.0 (2018-xx-xx)
22
==================
33

44
base.py
55
-------
66
- Added ``MSSBase.compression_level`` to control the PNG compression level
77

8+
linux.py
9+
--------
10+
- Added ``MSS.drawable`` to speed-up grabbing.
11+
812
screenshot.py
913
-------------
1014
- Added ``Screenshot.bgra`` to get BGRA bytes.

docs/source/api.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ Methods
124124

125125
.. versionadded:: 3.0.0
126126

127-
.. versionadded:: 3.1.3
127+
.. versionadded:: 3.2.0
128128

129129
Added the ``level`` keyword argument to control the PNG compression level.
130130

@@ -169,7 +169,7 @@ Properties
169169

170170
:rtype: bytes
171171

172-
.. versionadded:: 3.1.3
172+
.. versionadded:: 3.2.0
173173

174174
.. attribute:: height
175175

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
# built documents.
3232
#
3333
# The short X.Y version.
34-
version = '3.1.3'
34+
version = '3.2.0'
3535

3636
# The full version, including alpha/beta/rc tags.
3737
release = 'latest'

docs/source/developers.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ You will need `pytest <https://pypi.python.org/pypi/pytest>`_::
2323
$ pip install pytest
2424

2525

26-
How to test?
26+
How to Test?
2727
------------
2828

2929
Enable the developer mode::
@@ -39,7 +39,7 @@ Launch the test suit::
3939
As he module is Python 2 and 3 compliant, do no forgot to test for both. If you cannot, just say it when sending the patch, someone else will validate for you.
4040

4141

42-
Validating the code
42+
Validating the Code
4343
===================
4444

4545
It is important to keep a clean base code. Use tools like `flake8 <https://pypi.python.org/pypi/flake8>`_ and `Pylint <https://pypi.python.org/pypi/pylint>`_.
@@ -53,7 +53,7 @@ Install required packages::
5353
$ pip install flake8 pylint
5454

5555

56-
How to validate?
56+
How to Validate?
5757
----------------
5858

5959
::
@@ -64,7 +64,7 @@ How to validate?
6464
If there is no output, you are good ;)
6565

6666

67-
Static type checking
67+
Static Type Checking
6868
====================
6969

7070
`mypy <http://mypy-lang.org/>`_ is a compile-time static type checker for Python, allowing optional, gradual typing of Python code.
@@ -79,7 +79,7 @@ Install required packages::
7979
$ pip install mypy-lang
8080

8181

82-
Running mypy
82+
Running Mypy
8383
------------
8484

8585
::
@@ -98,7 +98,7 @@ You will need `Sphinx <http://sphinx-doc.org/>`_::
9898
$ pip install sphinx
9999

100100

101-
How to build?
101+
How to Build?
102102
-------------
103103

104104
::

docs/source/examples.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ You can tweak the PNG compression level (see :py:func:`zlib.compress()` for deta
6363

6464
sct.compression_level = 2
6565

66-
.. versionadded:: 3.1.3
66+
.. versionadded:: 3.2.0
6767

6868
Advanced
6969
========

docs/source/installation.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
Installation
55
============
66

7-
Recommended way
7+
Recommended Way
88
===============
99

1010
Quite simple::
1111

1212
$ pip install --upgrade mss
1313

1414

15-
From sources
15+
From Sources
1616
============
1717

1818
Alternatively, you can get a copy of the module from GitHub::

0 commit comments

Comments
 (0)