aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/render_pdfs_main.cpp
Commit message (Collapse)AuthorAge
* render_pdfs cull rect output formated betterGravatar halcanary2014-10-16
| | | | Review URL: https://codereview.chromium.org/657353004
* Try out scalar picture sizesGravatar robertphillips2014-08-29
| | | | | | | | | | This paves the way for removing the 'fTile' parameter from SkPictureShader (although that should be a different CL). If we like this we could also move to providing an entire cull SkRect. R=reed@google.com, mtklein@google.com, fmalita@google.com, fmalita@chromium.org Author: robertphillips@google.com Review URL: https://codereview.chromium.org/513983002
* Print max RSS in GM and nanobench too.Gravatar mtklein2014-08-19
| | | | | | | | | | | Everyone used MB, so update the API to just return that. BUG=skia: R=halcanary@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/483323002
* clean up render_pdfs:Gravatar halcanary2014-08-11
| | | | | | | | | | | | | | | | | | Remove unused headers replace dynamic memory wstream with null wstream. Use SkAutoTDelete when appropriate. Replace PdfRenderer class with short function: pdf_to_stream. Collapse render_pdf, process_input, tool_main_core functions Split out process_input_files function. Don't crash when no arguments given. print out max rss on each skp. prettier output R=mtklein@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/463603002
* Process Statistics header, add max RSS to render_pdfsGravatar halcanary2014-08-11
| | | | | | | | | | Committed: https://skia.googlesource.com/skia/+/6274baae7fe82ce6481da367687aa6168356e1e1 R=mtklein@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/448993003
* Revert of Process Statistics header, add max RSS to render_pdfs ↵Gravatar bungeman2014-08-07
| | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/448993003/) Reason for revert: Reverting due to breaking iOS bots. Original issue's description: > Process Statistics header, add max RSS to render_pdfs > > Committed: https://skia.googlesource.com/skia/+/6274baae7fe82ce6481da367687aa6168356e1e1 R=mtklein@google.com, halcanary@google.com TBR=halcanary@google.com, mtklein@google.com NOTREECHECKS=true NOTRY=true Author: bungeman@google.com Review URL: https://codereview.chromium.org/448243003
* Process Statistics header, add max RSS to render_pdfsGravatar halcanary2014-08-07
| | | | | | | | R=mtklein@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/448993003
* render_pdfs implements --matchGravatar halcanary2014-08-07
| | | | | | | | | | BUG=skia:2743 NOTRY=true R=djsollen@google.com, mtklein@google.com, borenet@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/441423002
* Revert of Memory improvements to render_pdfs; better DM pool size defaults ↵Gravatar halcanary2014-08-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/433063002/) Reason for revert: breaking android tests Original issue's description: > Memory improvements to render_pdfs; better DM pool size defaults > > Make SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE equal to > skia_resource_cache_mb_limit, if that value is >0 (true for some > low-memory Android devices). > > render_pdfs test program uses lazy decoding (and the discardable > memory pool). > > BUG=skia:2743 > > Committed: https://skia.googlesource.com/skia/+/66058b614d9c8cb63c24b1c779dd1a9a80752217 R=djsollen@google.com, mtklein@google.com TBR=djsollen@google.com, mtklein@google.com NOTREECHECKS=true NOTRY=true BUG=skia:2743 Author: halcanary@google.com Review URL: https://codereview.chromium.org/418173012
* Memory improvements to render_pdfs; better DM pool size defaultsGravatar halcanary2014-08-01
| | | | | | | | | | | | | | | | Make SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE equal to skia_resource_cache_mb_limit, if that value is >0 (true for some low-memory Android devices). render_pdfs test program uses lazy decoding (and the discardable memory pool). BUG=skia:2743 R=djsollen@google.com, mtklein@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/433063002
* Cleanup: Rename SkOSPath functions.Gravatar tfarina2014-07-28
| | | | | | | | | | | | | | | | Mostly for brevity and matches better with Python: Python | Old C++ | New C++ os.path.join | SkOSPath::SkPathJoin | SkOSPath::Join os.path.basename | SkOSPath::SkBasename | SkOSPath::Basename BUG=None TEST=make all R=mtklein@google.com, bsalomon@google.com Author: tfarina@chromium.org Review URL: https://codereview.chromium.org/428443002
* Cleanup: Delete sk_tools::make_filepath() in favor of SkOSPath::SkPathJoin().Gravatar tfarina2014-06-12
| | | | | | | | | | BUG=None TEST=make tools tests && out/Debug/tests R=epoger@google.com Author: tfarina@chromium.org Review URL: https://codereview.chromium.org/327403002
* Cleanup: Delete sk_tools::get_basename() in favor of SkOSPath::SkBasename().Gravatar tfarina2014-06-11
| | | | | | | | | | BUG=None TEST=make tests && out/Debug/tests R=epoger@google.com Author: tfarina@chromium.org Review URL: https://codereview.chromium.org/321693002
* Do not define SK_SUPPORT_DEEPCOPYTO_CONFIG in Skia.Gravatar commit-bot@chromium.org2014-02-24
| | | | | | | | | | | | Clean up our callers who depend on the deprecated function. R=scroggo@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/178003003 git-svn-id: http://skia.googlecode.com/svn/trunk@13566 2bbb7eff-a529-9590-31e7-b0007b416f81
* change offset to xy for pixelref subsettingGravatar reed@google.com2014-01-08
| | | | | | | | | BUG= R=scroggo@google.com Review URL: https://codereview.chromium.org/105893012 git-svn-id: http://skia.googlecode.com/svn/trunk@12958 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add SkPDFDeviceFlatenner which extends SkPDFDevice to add support to flatten ↵Gravatar commit-bot@chromium.org2013-10-14
| | | | | | | | | | | | | | | the path and the text when we have perspective. prepare to deprecate SkPDFDevice constructor, and route gm and render_pdfs to use SkDocument::Create pdf interface instead. - controlled by a flag add comments where we are supposed to flatten other features (paint, shaders, ... ) R=reed@google.com, bungeman@google.com, scroggo@google.com, vandebo@chromium.org, bsalomon@google.com Author: edisonn@google.com Review URL: https://codereview.chromium.org/24811002 git-svn-id: http://skia.googlecode.com/svn/trunk@11751 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
* Replace SkPicture(SkStream) constructors with a factory.Gravatar scroggo@google.com2013-06-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SkPicture: Remove the constructors which take an SkStream as an argument. Rather than having to check a variable for success, the factory will return NULL on failure. Add a protected function for determining if an SkStream is an SKP to share code with SkTimedPicture. In the factory, check for a NULL SkStream. Use a default decoder (from BUG: https://code.google.com/p/skia/issues/detail?id=1325) SkDebuggerGUI: Call SkPicture::CreateFromStream when necessary. Write a factory for creating SkTimedPictures and use it. Use the factory throughout tools. Add include/lazy to utils and effects gyp include_dirs so SkPicture.h can reference SkImageDecoder.h which references SkBitmapFactory.h (in include/lazy). Changes code Chromium uses, so this will require a temporary Skia and then a change to Chromium to use the new Skia code. TODO: Create a decoder that does nothing to be used by pinspect, lua pictures, etc, and allow it to not assert in SkOrderedReadBuffer. R=reed@google.com Review URL: https://codereview.chromium.org/17113004 git-svn-id: http://skia.googlecode.com/svn/trunk@9822 2bbb7eff-a529-9590-31e7-b0007b416f81
* Separate core and images project.Gravatar scroggo@google.com2013-05-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SkImage calls functions on SkImageDecoder and SkImageEncoder. This is desired behavior, and it is also desired to include SkImage as a part of core. In order to keep core from depending on images, update SkImageDecoder_empty.cpp to implement all of SkImageDecoder and SkImageEncoder. This file will be built by chrome (in https://codereview.chromium.org/15960015). Move force_linking from SkImageDecoder.cpp to its own file. It must be called to force linking with the image decoders if desired. Call the function in tools that need it: sk_image render_pictures render_pdfs sk_hello filter bench_pictures debugger SkImageDecoder: Derive from SkNoncopyable, instead of duplicating its hiding of constructors. skhello: Return rather than trying to write a null SkData to the stream. Revert "Hamfistedly removed core dependence on images" (commit 0f05f682a90bc125323677abf3476e1027d174f5) and "Move SkImage::encode to SkImage_Codec.cpp." (commit 83e47a954d0bf65439f3d9c0c93213063dd70da3.) These two commits were temporary fixes that this change cleans up. SkSnapshot.cpp: Check for a NULL encoder returned by SkImageEncoder::Create. BUG=https://code.google.com/p/skia/issues/detail?id=1275 R=djsollen@google.com, robertphillips@google.com Review URL: https://codereview.chromium.org/15806010 git-svn-id: http://skia.googlecode.com/svn/trunk@9364 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
* 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
* Collect minidump and print callstack if an app chrashes.Gravatar edisonn@google.com2013-03-08
| | | | | | Review URL: https://codereview.chromium.org/12387018 git-svn-id: http://skia.googlecode.com/svn/trunk@8044 2bbb7eff-a529-9590-31e7-b0007b416f81
* Create SkLazyPixelRef which performs lazy decoding.Gravatar scroggo@google.com2013-02-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new pixel ref behaves similarly to SkImageRef, with some key differences: It does not depend on the images project. It requires an SkImageCache, which handles allocation and caching of the pixel memory. It takes a function signature for decoding which decodes into already allocated pixel memory rather than into an SkBitmap. Add two implementations of SkImageCache: SkLruImageCache and SkAshmemImageCache. Replace SkSerializationHelpers::DecodeBitmap with SkPicture::InstallPixelRefProc, and update sites that referenced it. SkBitmapFactory now sets the pixel ref to a new object of the new class SkLazyPixelRef, provided it has an SkImageCache for caching. Provide an option to do lazy decodes in render_pictures and bench_pictures. SkPicture: Eliminate the default parameters in the constructor. If a proc for decoding bitmaps is installed, use it to decode any encoded data in subpictures. When parsing deserializing subpictures, check for success. When serializing subpictures, pass the picture's bitmap encoder to the subpicture's call to serialize. Update BitmapFactoryTest to test its new behavior. BUG=https://code.google.com/p/skia/issues/detail?id=1008 BUG=https://code.google.com/p/skia/issues/detail?id=1009 Review URL: https://codereview.appspot.com/7060052 git-svn-id: http://skia.googlecode.com/svn/trunk@7835 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2013-01-26
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@7406 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add option to render PDFs to memory only.Gravatar edisonn@google.com2013-01-11
| | | | | | Review URL: https://codereview.appspot.com/7097045 git-svn-id: http://skia.googlecode.com/svn/trunk@7140 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix warning in render pdf toolGravatar humper@google.com2013-01-07
| | | | | | | | BUG= Review URL: https://codereview.appspot.com/7033056 git-svn-id: http://skia.googlecode.com/svn/trunk@7063 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2012-11-02
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6258 2bbb7eff-a529-9590-31e7-b0007b416f81
* Support render_pdfs in iOS too (add tool_main()).Gravatar edisonn@google.com2012-11-01
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6254 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add utility to convert skp files to pdf files. Code compatible with ↵Gravatar edisonn@google.com2012-11-01
render_pictures_main.cpp. I could have refactored the code to avoid code duplication, but it does not seem right, and it will overcomplicate the code. Review URL: https://codereview.appspot.com/6615073 git-svn-id: http://skia.googlecode.com/svn/trunk@6253 2bbb7eff-a529-9590-31e7-b0007b416f81