summaryrefslogtreecommitdiff
path: root/vcl/workben/jpgfuzzer.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-05-08 16:52:00 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-05-08 19:20:40 +0200
commite8a05109d91bb9e82fcec5204514766f4bdbbee8 (patch)
tree76009a4aa599708ce4a7d07252d52f789249fe8d /vcl/workben/jpgfuzzer.cxx
parentb88103c74293dd6d3cfa83639a8a4eab644905a1 (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 'vcl/workben/jpgfuzzer.cxx')
-rw-r--r--vcl/workben/jpgfuzzer.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/workben/jpgfuzzer.cxx b/vcl/workben/jpgfuzzer.cxx
index c5fddc150043..5fa270b69e7e 100644
--- a/vcl/workben/jpgfuzzer.cxx
+++ b/vcl/workben/jpgfuzzer.cxx
@@ -21,7 +21,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
{
SvMemoryStream aStream(const_cast<uint8_t*>(data), size, StreamMode::READ);
Graphic aGraphic;
- (void)ImportJPEG(aStream, aGraphic, GraphicFilterImportFlags::NONE);
+ (void)ImportJPEG(aStream, aGraphic, GraphicFilterImportFlags::NONE, nullptr);
return 0;
}