aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/PDFPrimitivesTest.cpp
Commit message (Collapse)AuthorAge
* replace setConfig+allocPixels with single callGravatar mike@reedtribe.org2014-02-13
| | | | | | | | BUG=skia: Review URL: https://codereview.chromium.org/162643002 git-svn-id: http://skia.googlecode.com/svn/trunk@13426 2bbb7eff-a529-9590-31e7-b0007b416f81
* Cleanup: Sanitize the order of includes under tests/Gravatar tfarina@chromium.org2014-01-24
| | | | | | | | | | | | | | | | Initially this was to make sure Test.h appeared after the Sk*.h includes. Patch generated by the following command line: $ ~/chromium/src/tools/sort-headers.py tests/*.cpp BUG=None TEST=tests R=robertphillips@google.com Review URL: https://codereview.chromium.org/145313004 git-svn-id: http://skia.googlecode.com/svn/trunk@13177 2bbb7eff-a529-9590-31e7-b0007b416f81
* Move macros from TestClassDef.h to Test.hGravatar commit-bot@chromium.org2014-01-14
| | | | | | | | | | | | | | Motivation: those macros don't make any sense without the definitions in Test.h. BUG= R=mtklein@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/138563004 git-svn-id: http://skia.googlecode.com/svn/trunk@13074 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove SK_SCALAR_IS_[FLOAT,FIXED] and assume floatsGravatar reed@google.com2013-12-17
| | | | | | | | | | | | | To keep the CL (slightly) managable, this does not make any changes to existing macros (e.g. SkScalarMul). Just tackling #ifdef constructs this time around. BUG= R=bsalomon@google.com, caryclark@google.com Review URL: https://codereview.chromium.org/117053002 git-svn-id: http://skia.googlecode.com/svn/trunk@12712 2bbb7eff-a529-9590-31e7-b0007b416f81
* Use DEFINE_TESTCLASS_SHORT macro in tests.Gravatar tfarina@chromium.org2013-12-12
| | | | | | | | | | | | | The three version of DEFINE_TESTCLASS macro is deprecated and thus just use the simple, short one. BUG=None TEST=out/Debug/tests R=mtklein@google.com, bsalomon@google.com, robertphillips@google.com Review URL: https://codereview.chromium.org/100113004 git-svn-id: http://skia.googlecode.com/svn/trunk@12653 2bbb7eff-a529-9590-31e7-b0007b416f81
* Use SkPicture::ExtractBitmap callback in pdf too, there is no need for a ↵Gravatar commit-bot@chromium.org2013-10-03
| | | | | | | | | | | | specialized function pointer for pdf only only to pass a rectangle, when we can use subseted bitmaps. R=scroggo@google.com, reed@google.com, vandebo@chromium.org, bsalomon@google.com Author: edisonn@google.com Review URL: https://codereview.chromium.org/25054002 git-svn-id: http://skia.googlecode.com/svn/trunk@11591 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix leaked SkPDFDevice in PDFPrimitivesTest.cppGravatar robertphillips@google.com2013-08-26
| | | | | | | | https://chromiumcodereview.appspot.com/23003035/ git-svn-id: http://skia.googlecode.com/svn/trunk@10910 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2013-04-25
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@8851 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix compile warning on mac that breaks a bot, and remove jpeg creation ↵Gravatar edisonn@google.com2013-04-24
| | | | | | bitmap since we mock the compression. git-svn-id: http://skia.googlecode.com/svn/trunk@8836 2bbb7eff-a529-9590-31e7-b0007b416f81
* Encode images with DCTDecode (JPEG) in PDFs if it makes sense. Fallback to ↵Gravatar edisonn@google.com2013-04-24
| | | | | | | | | FlateDecode (zip) if it makes sense. Otherewise include uncompressed stream. This change will reduce the size of PDFs to 50% (in the case of the existing SKPs, we reduce the total size of PDFs from 105MB to 50MB) Review URL: https://codereview.appspot.com/7068055 git-svn-id: http://skia.googlecode.com/svn/trunk@8835 2bbb7eff-a529-9590-31e7-b0007b416f81
* resubmit https://code.google.com/p/skia/source/detail?r=7883 (in the meantime weGravatar edisonn@google.com2013-04-02
| | | | | | | added capability to collect minidump and callstack if buildbot fails with heap coruption in windows, and a NPE bug was fixed in SkPDFDocument, when document was destroyed without ever beeing used and a field was NULL + a few minor conflicts have been resolved) git-svn-id: http://skia.googlecode.com/svn/trunk@8487 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix minor valgrind-found memory leaksGravatar robertphillips@google.com2013-03-21
| | | | | | | | https://codereview.chromium.org/12440066/ git-svn-id: http://skia.googlecode.com/svn/trunk@8297 2bbb7eff-a529-9590-31e7-b0007b416f81
* Reverting r8233 (Use SkSet in PDF)Gravatar robertphillips@google.com2013-03-20
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@8255 2bbb7eff-a529-9590-31e7-b0007b416f81
* resubmit https://code.google.com/p/skia/source/detail?r=7883 (in the ↵Gravatar edisonn@google.com2013-03-19
| | | | | | | | meantime we added capability to collect minidump and callstack if buildbot fails with heap coruption in windows. a few minor conflicts have been resolved) Review URL: https://codereview.chromium.org/12840004 git-svn-id: http://skia.googlecode.com/svn/trunk@8233 2bbb7eff-a529-9590-31e7-b0007b416f81
* Update flag to reflect actual meaning.Gravatar edisonn@google.com2013-03-12
| | | | | | Review URL: https://codereview.chromium.org/12754004 git-svn-id: http://skia.googlecode.com/svn/trunk@8118 2bbb7eff-a529-9590-31e7-b0007b416f81
* revert r7892Gravatar edisonn@google.com2013-02-28
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@7896 2bbb7eff-a529-9590-31e7-b0007b416f81
* resubmit after fixing assert issue: https://codereview.appspot.com/6744050Gravatar edisonn@google.com2013-02-27
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@7892 2bbb7eff-a529-9590-31e7-b0007b416f81
* Tests : Unused parameters cleanupGravatar sugoi@google.com2013-02-27
| | | | | | | I removed unused parameters in the tests wherever it was trivial to do so. I'm trying to get the easy ones out of the way before we get into more involved discussions around this. Review URL: https://codereview.appspot.com/7394055 git-svn-id: http://skia.googlecode.com/svn/trunk@7891 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert r7883Gravatar edisonn@google.com2013-02-27
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@7884 2bbb7eff-a529-9590-31e7-b0007b416f81
* Use SkSet to fix issue when pdf generates an exp number of resources.Gravatar edisonn@google.com2013-02-27
| | | | | | | | | | | | | | | The problem fixed - http://code.google.com/p/skia/issues/detail?id=940 - is that getResources will recursively obtain all child resource recursively without checking for duplicates. If we have lots of duplicates, then we try to build a very large vector (exponential with the number of nodes usually) and sooner or later we end up using too much memory and crash. A possible solution could have been to make sure resources do not have duplicates, but that requirement is impractical, and it this leaves the solution fragile, if there is any issue in the tree, we crash. When we emit the pdf, the large number of duplicates is not an issue, because SkPDFCatalog::addObject will deal with duplicates. I have run the gm with --config pdf, and the images are 100% same bits, while the pdfs have the same size but some very small changes, the order of some objects. Review URL: https://codereview.appspot.com/6744050 git-svn-id: http://skia.googlecode.com/svn/trunk@7883 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Handle invalid glyph IDs on drawText methods.Gravatar vandebo@chromium.org2013-01-25
| | | | | | Review URL: https://codereview.appspot.com/7179053 git-svn-id: http://skia.googlecode.com/svn/trunk@7401 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert r7341Gravatar edisonn@google.com2013-01-23
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@7347 2bbb7eff-a529-9590-31e7-b0007b416f81
* If getAdvance fails, getAdvanceData should not assert, but ignored.Gravatar edisonn@google.com2013-01-23
| | | | | | Review URL: https://codereview.appspot.com/7127056 git-svn-id: http://skia.googlecode.com/svn/trunk@7341 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove SkRefPtrGravatar vandebo@chromium.org2013-01-04
| | | | | | | | | (resubmit of https://codereview.appspot.com/7030059/) TBR=junov@google.com Review URL: https://codereview.appspot.com/7030065 git-svn-id: http://skia.googlecode.com/svn/trunk@7030 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Remove SkRefPtr" - r7021Gravatar vandebo@chromium.org2013-01-04
| | | | | | | | samplecode/ still needs to be updated. Review URL: https://codereview.appspot.com/7032048 git-svn-id: http://skia.googlecode.com/svn/trunk@7022 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove SkRefPtrGravatar vandebo@chromium.org2013-01-04
| | | | | | Review URL: https://codereview.appspot.com/7030059 git-svn-id: http://skia.googlecode.com/svn/trunk@7021 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Fix name generation - / needs to be escaped.Gravatar vandebo@chromium.org2012-09-21
| | | | | | | | BUG=chromium 148422 Review URL: https://codereview.appspot.com/6542044 git-svn-id: http://skia.googlecode.com/svn/trunk@5641 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Add link annotations.Gravatar vandebo@chromium.org2012-07-13
| | | | | | Review URL: https://codereview.appspot.com/6346100 git-svn-id: http://skia.googlecode.com/svn/trunk@4609 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixed Windows compiler complaintsGravatar robertphillips@google.com2012-07-10
| | | | | | | | http://codereview.appspot.com/6392044 git-svn-id: http://skia.googlecode.com/svn/trunk@4511 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix warnings on Mac in testsGravatar caryclark@google.com2012-06-06
| | | | | | | | | | | | | | | | | | Fix these class of warnings: - unused functions - unused locals - sign mismatch - missing function prototypes - missing newline at end of file - 64 to 32 bit truncation The changes prefer to link in dead code in the debug build with 'if (false)' than to comment it out, but trivial cases are commented out or sometimes deleted if it appears to be a copy/paste error. Review URL: https://codereview.appspot.com/6301045 git-svn-id: http://skia.googlecode.com/svn/trunk@4175 2bbb7eff-a529-9590-31e7-b0007b416f81
* Debug Windows compiler complaint fixesGravatar robertphillips@google.com2012-05-14
| | | | | | | | http://codereview.appspot.com/6208055/ git-svn-id: http://skia.googlecode.com/svn/trunk@3924 2bbb7eff-a529-9590-31e7-b0007b416f81
* Compile with c++0x.Gravatar bungeman@google.com2012-03-19
| | | | | | | http://codereview.appspot.com/5841074/ git-svn-id: http://skia.googlecode.com/svn/trunk@3434 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix copy paste error in test ref counting.Gravatar vandebo@chromium.org2012-03-05
| | | | | | | | TBR=reed@google.com Review URL: https://codereview.appspot.com/5727066 git-svn-id: http://skia.googlecode.com/svn/trunk@3320 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Fix name objects containing characters > 0x80 and add a test.Gravatar vandebo@chromium.org2012-03-05
| | | | | | | | This fixes chrome bug http://crbug.com/115258 Review URL: https://codereview.appspot.com/5726048 git-svn-id: http://skia.googlecode.com/svn/trunk@3319 2bbb7eff-a529-9590-31e7-b0007b416f81
* Automatic update of all copyright notices to reflect new license terms.Gravatar epoger@google.com2011-07-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I have manually examined all of these diffs and restored a few files that seem to require manual adjustment. The following files still need to be modified manually, in a separate CL: android_sample/SampleApp/AndroidManifest.xml android_sample/SampleApp/res/layout/layout.xml android_sample/SampleApp/res/menu/sample.xml android_sample/SampleApp/res/values/strings.xml android_sample/SampleApp/src/com/skia/sampleapp/SampleApp.java android_sample/SampleApp/src/com/skia/sampleapp/SampleView.java experimental/CiCarbonSampleMain.c experimental/CocoaDebugger/main.m experimental/FileReaderApp/main.m experimental/SimpleCocoaApp/main.m experimental/iOSSampleApp/Shared/SkAlertPrompt.h experimental/iOSSampleApp/Shared/SkAlertPrompt.m experimental/iOSSampleApp/SkiOSSampleApp-Base.xcconfig experimental/iOSSampleApp/SkiOSSampleApp-Debug.xcconfig experimental/iOSSampleApp/SkiOSSampleApp-Release.xcconfig gpu/src/android/GrGLDefaultInterface_android.cpp gyp/common.gypi gyp_skia include/ports/SkHarfBuzzFont.h include/views/SkOSWindow_wxwidgets.h make.bat make.py src/opts/memset.arm.S src/opts/memset16_neon.S src/opts/memset32_neon.S src/opts/opts_check_arm.cpp src/ports/SkDebug_brew.cpp src/ports/SkMemory_brew.cpp src/ports/SkOSFile_brew.cpp src/ports/SkXMLParser_empty.cpp src/utils/ios/SkImageDecoder_iOS.mm src/utils/ios/SkOSFile_iOS.mm src/utils/ios/SkStream_NSData.mm tests/FillPathTest.cpp Review URL: http://codereview.appspot.com/4816058 git-svn-id: http://skia.googlecode.com/svn/trunk@1982 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Fix bug in catalog substitution.Gravatar vandebo@chromium.org2011-07-25
| | | | | | Review URL: http://codereview.appspot.com/4816051 git-svn-id: http://skia.googlecode.com/svn/trunk@1955 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Make stream compression optional on a per device basis.Gravatar vandebo@chromium.org2011-07-20
| | | | | | | | | | | | | | | There are a lot of small pieces to make this change work: - SkPDFDocument (and SkPDFCatalog) take flags to disable compression (and font embedding - not implemented yet, can disable font subsetting for now). - SkPDFStream now defers compression until the size/emit step. - Classes that *had* a stream (because they didn't know the stream size at construction time) now *are* streams to make the substitution work correctly. - The SkPDFShader implementation got pulled apart into two classes, one that is a SkPDFDict, and one that is a SkPDFStream (making the common ancestor SkPDFObject). - Added helper methods in SkPDFObject for children that have simple resource lists. - Added an iterator to SkPDFDict so that a substitute SkPDFStream can get a copy of the stream dictionary. - Change SkPDFDocument to have a pointer to an SkPDFCatalog to remove a new circular header reference. Review URL: http://codereview.appspot.com/4700045 git-svn-id: http://skia.googlecode.com/svn/trunk@1911 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Add a concept of a substitute object to the SkPDFCatalog class.Gravatar vandebo@chromium.org2011-07-06
| | | | | | | | Code by Arthur Hsu, original code review: http://codereview.appspot.com/4650060/ Review URL: http://codereview.appspot.com/4639102 git-svn-id: http://skia.googlecode.com/svn/trunk@1812 2bbb7eff-a529-9590-31e7-b0007b416f81
* replace detach/getStream apis on dynamicwstream with SkDataGravatar reed@google.com2011-06-24
| | | | | | | | http://codereview.appspot.com/4657046/ git-svn-id: http://skia.googlecode.com/svn/trunk@1714 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Fix PDF primitives test for fixed scalars.Gravatar vandebo@chromium.org2011-05-18
| | | | | | | | | | 110999 is out of range for SkFixed (+/- 32767) BUG=269 Review URL: http://codereview.appspot.com/4530051 git-svn-id: http://skia.googlecode.com/svn/trunk@1365 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Restrict scalars to the range that PDF understands.Gravatar vandebo@chromium.org2011-03-04
| | | | | | | | | | | * Add a config flag to ignore the restrictions * Apply restriction to both SkPDFScalar and scalars used in content streams. * +/- 32,767 for the integer part. * +/1 1/65536 for the fraction part. Review URL: http://codereview.appspot.com/4240050 git-svn-id: http://skia.googlecode.com/svn/trunk@882 2bbb7eff-a529-9590-31e7-b0007b416f81
* First pieces of SkPDFDevice. Supports:Gravatar vandebo@chromium.org2010-10-20
| | | | | | | | | | | | Matrix transforms. Rendering bitmaps. Basic paint parameters. Rendering rectangles, points, lines, polygons. Render a paint to the page. Review URL: http://codereview.appspot.com/2584041 git-svn-id: http://skia.googlecode.com/svn/trunk@614 2bbb7eff-a529-9590-31e7-b0007b416f81
* High level pdf classes and pdf specific interface.Gravatar vandebo@chromium.org2010-10-12
| | | | | | | | The guts of the implementation will be in SkPDFDevice and below. This is a first implementation of everything above that point. Review URL: http://codereview.appspot.com/2342043 git-svn-id: http://skia.googlecode.com/svn/trunk@602 2bbb7eff-a529-9590-31e7-b0007b416f81
* Address senorblanco's comments on r600.Gravatar vandebo@chromium.org2010-10-01
| | | | | | | | | | | Don't inline constructors and destructors. Include license in test file. A few nits Also, cleanup a couple compile warnings. Review URL: http://codereview.appspot.com/2279043 git-svn-id: http://skia.googlecode.com/svn/trunk@601 2bbb7eff-a529-9590-31e7-b0007b416f81
* Initial PDF backend commit: directories, build rules, primitivesGravatar vandebo@chromium.org2010-09-24
This change establishes and tests the building blocks of the PDF file format. For now, PDF code is not compiled by default. Review URL: http://codereview.appspot.com/1950044 git-svn-id: http://skia.googlecode.com/svn/trunk@600 2bbb7eff-a529-9590-31e7-b0007b416f81