Skip to content

Commit

Permalink
Merge pull request #109 from kyamagu/upgrade-to-m86
Browse files Browse the repository at this point in the history
Upgrade skia to m86
  • Loading branch information
kyamagu committed Sep 11, 2020
2 parents 5c02ed9 + 41a3d4b commit 81643da
Show file tree
Hide file tree
Showing 15 changed files with 1,021 additions and 938 deletions.
4 changes: 2 additions & 2 deletions docs/tutorial/paint.rst
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ Bitmap Shader

.. code-block:: python
image = skia.Image.DecodeToRaster(
image = skia.Image.MakeFromEncoded(
skia.Data.MakeFromFileName('../skia/resources/images/color_wheel.png'))
canvas.clear(skia.ColorWHITE)
Expand Down Expand Up @@ -397,7 +397,7 @@ Color Matrix Color Filter

.. code-block:: python
image = skia.Image.DecodeToRaster(
image = skia.Image.MakeFromEncoded(
skia.Data.MakeFromFileName(
'../skia/resources/images/mandrill_512_q075.jpg'))
Expand Down
13 changes: 10 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
pass

NAME = 'skia-python'
__version__ = '85.0'
__version__ = '86.0'

SKIA_PATH = os.getenv('SKIA_PATH', 'skia')
SKIA_OUT_PATH = os.getenv(
Expand All @@ -33,6 +33,7 @@
EXTRA_COMPILE_ARGS = [
'/std:c++17', # c++20 fails.
'/DVERSION_INFO=%s' % __version__,
'/DSK_GL',
'/Zc:inline',
# Disable a bunch of warnings.
'/wd5030', # Warnings about unknown attributes.
Expand All @@ -47,7 +48,10 @@
'/OPT:REF',
]
elif sys.platform == 'darwin':
DEFINE_MACROS = [('VERSION_INFO', __version__)]
DEFINE_MACROS = [
('VERSION_INFO', __version__),
('SK_GL', ''),
]
LIBRARIES = [
'dl',
]
Expand All @@ -67,7 +71,10 @@
'-framework', 'OpenGL',
]
else:
DEFINE_MACROS = [('VERSION_INFO', __version__)]
DEFINE_MACROS = [
('VERSION_INFO', __version__),
('SK_GL', ''),
]
LIBRARIES = [
'dl',
'fontconfig',
Expand Down
2 changes: 1 addition & 1 deletion skia
Submodule skia updated from e684c6 to bdeb0a
26 changes: 0 additions & 26 deletions src/skia/Bitmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,32 +391,6 @@ bitmap
:return: true if :py:class:`ImageInfo` :py:class:`AlphaType` is
:py:attr:`~AlphaType.kOpaque_AlphaType`
)docstring")
.def("isVolatile", &SkBitmap::isVolatile,
R"docstring(
Provides a hint to caller that pixels should not be cached.
Only true if :py:meth:`setIsVolatile` has been called to mark as
volatile.
Volatile state is not shared by other bitmaps sharing the same
:py:class:`PixelRef`.
:return: true if marked volatile
)docstring")
.def("setIsVolatile", &SkBitmap::setIsVolatile,
R"docstring(
Sets if pixels should be read from :py:class:`PixelRef` on every access.
:py:class:`Bitmap` are not volatile by default; a GPU back end may
upload pixel values expecting them to be accessed repeatedly. Marking
temporary :py:class:`Bitmap` as volatile provides a hint to
:py:class:`BaseDevice` that the :py:class:`Bitmap` pixels should not be
cached. This can improve performance by avoiding overhead and reducing
resource consumption on :py:class:`BaseDevice`.
:param bool isVolatile: true if backing pixels are temporary
)docstring",
py::arg("isVolatile") = true)
.def("reset", &SkBitmap::reset,
R"docstring(
Resets to its initial state; all fields are set to zero, as if
Expand Down
6 changes: 0 additions & 6 deletions src/skia/Font.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -641,12 +641,6 @@ py::class_<SkFontMgr, sk_sp<SkFontMgr>, SkRefCnt>(m, "FontMgr",
)docstring",
py::arg("familyName"), py::arg("style"), py::arg("bcp47"),
py::arg("character"))
.def("matchFaceStyle",
[] (const SkFontMgr& fontmgr, const SkTypeface* face,
const SkFontStyle& style) {
return sk_sp<SkTypeface>(fontmgr.matchFaceStyle(face, style));
},
py::arg("face"), py::arg("style"))
.def("makeFromData", &SkFontMgr::makeFromData,
R"docstring(
Create a typeface for the specified data and TTC index (pass 0 for none)
Expand Down
Loading

0 comments on commit 81643da

Please sign in to comment.