summaryrefslogtreecommitdiff
path: root/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
AgeCommit message (Collapse)Author
2015-06-19Disintermediation.Tom Sepez
Removed several header files that simply proxy other headers. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1199553002.
2015-06-18Move libopenjpeg to third_party/Tom Sepez
We get to delete a whole bunch of fx_foo.c files that did nothing but #include "foo.c" after defining _CRT_SECURE_NO_WARNINGS. Do this from the .gyp/.gn files instead. Also sort some "config"s in .gn file. R=thestig@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/c7a17bf9cdb0d646aa8b653e6ab2678a1837ed6a Review URL: https://codereview.chromium.org/1185373010.
2015-06-17Revert "Move libopenjpeg to third_party/"Tom Sepez
This reverts commit c7a17bf9cdb0d646aa8b653e6ab2678a1837ed6a.
2015-06-17Move libopenjpeg to third_party/Tom Sepez
We get to delete a whole bunch of fx_foo.c files that did nothing but #include "foo.c" after defining _CRT_SECURE_NO_WARNINGS. Do this from the .gyp/.gn files instead. Also sort some "config"s in .gn file. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1185373010.
2015-06-17Move lcms2 into third_partyTom Sepez
Second CL to apply less restrictive flags to third party. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1181943008.
2015-06-15Do some IWYU cleanups.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1176333002.
2015-06-11Remove trailing whitespaces in core.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1177973008.
2015-06-11Kill FXSYS_mem{cpy,cmp,set.move}{32,8}.Tom Sepez
At one point in time, it may have made sense to indicate the expected alignment of the memory you're about to copy, but that was last century. The compiler will take care of it just fine. I stopped short of removing the FXSYS_ wrapper macros entirely. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1179693003.
2015-06-10Cleanup: Remove uses of "this->" in core/Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1173223002.
2015-06-10Remove typdefs for pointer types in fx_system.h.Tom Sepez
This involves fixing some multiple variable per line declarations, as the textually-substituted "*" applies only to the first one. This involves moving some consts around following the substitution. This involves replacing some typedefs used as constructors with better code. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1171733003
2015-06-09Use stdint.h types throughout PDFium.Tom Sepez
It's redundant nowadays to provide our own equivalents, now that this is done for us by the system header. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1177483002
2015-05-19Re-land: Remove FX_Alloc() null checks now that it can't return NULL.Tom Sepez
Fixes the ordering of some assignments broken when converting to checked numerics in CFX_PathData::AddPointCount(). Original Review URL: https://codereview.chromium.org/1142713005 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1135893008
2015-05-19Revert "Remove FX_Alloc() null checks now that it can't return NULL."Tom Sepez
This reverts commit eb6527763171cdb4b0fbfea5a20d691f4d67b660. Reason for revert: broke javascript tests. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1145843005
2015-05-19Remove FX_Alloc() null checks now that it can't return NULL.Tom Sepez
This permits some functions to become void's since they, in turn, can't fail. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1142713005
2015-05-08Fix a bunch of -Wunused-but-set-variable warnings.Lei Zhang
Also fix a few nits and other errors along the way. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1098583002
2015-04-16Replace FX_NEW with new, remote tests from fxcodecTom Sepez
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1084303002
2015-04-14Kill CFX_Object.Tom Sepez
CFX_Object is a type that implements its own new operators that return NULL on error. There's no need for this given the |new (std::nothrow)| syntax; in fact, the current code can only work if there is no activity in the constructors. This may explain the pervasive lack of constructors and reliance on Init() methods throughout the codebase. The activity takes place in fx_memory.h, where FX_NEW is mapped onto the std::nothrow syntax. The rest is just cleanup. Down the road, we will simply throw and remove all the error-checking paths for new objects. Landing this patch first will at least show a simple path back to the old behaviour without having to re-introduce CFX_Object should someone want to do so in their own fork. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1088733002
2015-03-20Fix missing include for std::minTom Sepez
Build broken on trybot at http://build.chromium.org/p/tryserver.chromium.win/builders/win8_chromium_rel/builds/66012/steps/compile%20%28with%20patch%29/logs/stdio R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1026843002
2015-03-19Fix subtle issues in opj_skip_from_memory and add unit tests.Tom Sepez
Follow on to https://codereview.chromium.org/990683002/. This more closely mimics what fseek() actually does, so as to avoid subtle bugs down the road. Move the DecodeData struct into a header so the test can use it, and provide a constructor for it. Along the way, I added include guards, removed the p_ prefix from some non-pointer vars, fixed some IWYU, and resolved some signed/unsigned comparison warnings with careful casting. BUG=452671 R=jun_fang@foxitsoftware.com, thestig@chromium.org Review URL: https://codereview.chromium.org/1016203002
2015-03-16Fix a bug that JPX images can't be shownJUN FANG
In the process of opj_end_decompress, it will return fail when the end of coding stream is reached. However it returns true in the same scenario implemented in openJPEG. So the final solution is from openJPEG. Return true when the end of coding stream is reached. BUG=452671 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/990683002
2015-01-05Cleanup: Get rid of CRLF line endings.Lei Zhang
R=brucedawson@chromium.org Review URL: https://codereview.chromium.org/837533003
2014-10-21More fixes in sycc422_to_rgb and sycc420_to_rgb when image width is oddBo Xu
This patch is supplementary to issue 418881 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/645793007
2014-10-10Fix a bug when image width is odd in sycc422_to_rgbBo Xu
BUG=418881 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/648823002
2014-09-30Update openjpegBo Xu
BUG=407964, 414182, 413447 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/589243004
2014-09-02Tidy up opj_ callback functions in fx_codec_jpx_obj.cppTom Sepez
This is code cleanup rather than bug fixing. The motivation for this was to fix the casts at line 97 of the original file. These are wrong; you cannot correct via casting a function signature mismatch when passing a function as an argument. In theory, there's no reason to believe that the compiler will pass args in the same manner for a function of type (void*, size_t, void*) as for a function of type (void*, size_t, some_struct*). The cast will suppress the compile error, but you can't be assured the call will work as intended. In practice, it does, since the last architecture where a void* had a different representation than a struct* went extinct in the late 80s. In the functions themselves, note that we currently bail out if srcData->offset >= srcData->src_size, so the expression bufferLength = (OPJ_SIZE_T)(srcData->src_size - srcData->offset) will always be > 0. Hence the check if(bufferLength <= 0) is pointless, esp. since bufferLength is a signed type and < 0 makes no sense. The opj_seek_from_memory() has a bool return value, so returning -1 on error doesn't seem reasonable. Change this to TRUE/FALSE, and return false on seek past end. If we're truly passing readonly data, then perhaps it makes sense to make the write() function always return -1. I didn't do this. Lastly, I capitalize "DecodeData" so that it looks like a struct, and change its members to be size_t's to avoid casting back and forth. R=jun_fang@foxitsoftware.com Review URL: https://codereview.chromium.org/507273003
2014-08-26Bounds check before fixed-size memcmp() in CJPX_Decoder::Init().Tom Sepez
BUG=407476 R=jun_fang@foxitsoftware.com Review URL: https://codereview.chromium.org/489703004
2014-08-13Remove try/catch blockBo Xu
BUG=pdfium:28 R=thakis@chromium.org Review URL: https://codereview.chromium.org/472563002
2014-05-24Fix warnings in android build, fix font rendering issue, fix issue 357588: ↵Bo Xu
wrong characters representation, and addjust some code indent BUG= R=jam@chromium.org Review URL: https://codereview.chromium.org/294353002
2014-05-23Convert all line endings to LF.John Abd-El-Malek
2014-05-17Initial commit.John Abd-El-Malek