diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-05-08 16:52:00 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-05-08 19:20:40 +0200 |
commit | e8a05109d91bb9e82fcec5204514766f4bdbbee8 (patch) | |
tree | 76009a4aa599708ce4a7d07252d52f789249fe8d /include/vcl/graphicfilter.hxx | |
parent | b88103c74293dd6d3cfa83639a8a4eab644905a1 (diff) |
vcl: split jpeg import into two parts
Split the import into two:
1) Just create the bitmap, this part is not thread-safe (e.g.
OpenGLContext::makeCurrent() is called when OpenGL is enabled).
2) Import the image into an existing bitmap.
The point is that the second part takes much more time than the first,
and in the future that part may be executed on a thread, while without
such a split the whole ImportJPEG() can't do that. For now
GraphicFilter::ImportGraphic() simply invokes the two parts after each
other, so no real functional changes yet.
Change-Id: Iee742a2cd3c581aeaf1a1ed9f55cd543955a85e0
Reviewed-on: https://gerrit.libreoffice.org/37397
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'include/vcl/graphicfilter.hxx')
-rw-r--r-- | include/vcl/graphicfilter.hxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/vcl/graphicfilter.hxx b/include/vcl/graphicfilter.hxx index c0bbb3d62a77..8b8a7cef3008 100644 --- a/include/vcl/graphicfilter.hxx +++ b/include/vcl/graphicfilter.hxx @@ -56,10 +56,14 @@ enum class GraphicFilterImportFlags DontSetLogsizeForJpeg = 0x002, ForPreview = 0x004, AllowPartialStreamRead = 0x010, + /// Only create a bitmap, do not read pixel data. + OnlyCreateBitmap = 0x020, + /// Read pixel data into an existing bitmap. + UseExistingBitmap = 0x040, }; namespace o3tl { - template<> struct typed_flags<GraphicFilterImportFlags> : is_typed_flags<GraphicFilterImportFlags, 0x0017> {}; + template<> struct typed_flags<GraphicFilterImportFlags> : is_typed_flags<GraphicFilterImportFlags, 0x0077> {}; } #define IMP_BMP "SVBMP" |