aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
Commit message (Collapse)AuthorAge
* 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
* add script to scrape glyph usage in drawText callsGravatar reed@google.com2013-05-30
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@9353 2bbb7eff-a529-9590-31e7-b0007b416f81
* rebaseline.py: use argparse command-line flags for more flexibilityGravatar epoger@google.com2013-05-30
| | | | | | | | | | | | | | | | | | | | --tests is the only mandatory argument. If you used to run this: rebaseline.py aaclip bigmatrix Run this instead: rebaseline.py --tests aaclip bigmatrix That's the only change you NEED to make. And then, if you WANT to specify --configs, --subdirs, etc. you CAN. R=senorblanco@chromium.org Review URL: https://codereview.chromium.org/15675010 git-svn-id: http://skia.googlecode.com/svn/trunk@9348 2bbb7eff-a529-9590-31e7-b0007b416f81
* Refactor rebaseline.py into functions ; no behavioral changes.Gravatar epoger@google.com2013-05-29
| | | | | | | | R=senorblanco@chromium.org Review URL: https://codereview.chromium.org/16160008 git-svn-id: http://skia.googlecode.com/svn/trunk@9318 2bbb7eff-a529-9590-31e7-b0007b416f81
* Reland 'Add path utils, plus a test for it.'Gravatar scroggo@google.com2013-05-28
| | | | | | | | | | | | | | | Build SkPathJoin and SkBasename on windows also. Previous CL did not build on Windows because the two functions were accidentally placed inside an ifdef that did not include windows. Move the functions to the top of the file, and add a comment by the endif for clarity. Previously reviewed at https://codereview.chromium.org/15747004/ Review URL: https://codereview.chromium.org/15740024 git-svn-id: http://skia.googlecode.com/svn/trunk@9295 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Add path utils, plus a test for it."Gravatar scroggo@google.com2013-05-24
| | | | | | | | | | This reverts commit d172374b46cae0bd5d7c024b9848f5bdafcc6a16. This CL broke on Windows. Review URL: https://codereview.chromium.org/15986004 git-svn-id: http://skia.googlecode.com/svn/trunk@9278 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add path utils, plus a test for it.Gravatar scroggo@google.com2013-05-24
| | | | | | | | | | | | | | | | | | | | | | | | SkOSFile: Added class SkOSPath with functions for modifying strings representing path names. OSPathTest.cpp: Test of the new utilities. factory.cpp: Use SkPathJoin. gmmain and gm_expectations: Use SkOSPath::SkPathJoin instead of a local version. skimage_main.cpp: Use the new location of SkPathJoin and SkBasename. R=epoger@google.com Review URL: https://codereview.chromium.org/15747004 git-svn-id: http://skia.googlecode.com/svn/trunk@9277 2bbb7eff-a529-9590-31e7-b0007b416f81
* GM: create GmResultDigest that encapsulates digest type ("bitmap-64bitMD5") ↵Gravatar epoger@google.com2013-05-24
| | | | | | | | | | and value (12345) R=scroggo@google.com Review URL: https://codereview.chromium.org/15883004 git-svn-id: http://skia.googlecode.com/svn/trunk@9271 2bbb7eff-a529-9590-31e7-b0007b416f81
* expand SkLua to handle creation of its own StateGravatar reed@google.com2013-05-22
| | | | | | | | | | | add lua sample BUG= R=robertphillips@google.com Review URL: https://codereview.chromium.org/15742009 git-svn-id: http://skia.googlecode.com/svn/trunk@9247 2bbb7eff-a529-9590-31e7-b0007b416f81
* add dumpops.lua as a sample scraper that just dumps the argumentsGravatar reed@google.com2013-05-22
| | | | | | | | | | | add SkLua.h for common utilities BUG= R=rmistry@google.com Review URL: https://codereview.chromium.org/15737010 git-svn-id: http://skia.googlecode.com/svn/trunk@9242 2bbb7eff-a529-9590-31e7-b0007b416f81
* move all flag bits up by 1, to accomodate new flag in SkPaintGravatar reed@google.com2013-05-22
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/15739006 git-svn-id: http://skia.googlecode.com/svn/trunk@9237 2bbb7eff-a529-9590-31e7-b0007b416f81
* New API for encoding bitmaps during serialization.Gravatar scroggo@google.com2013-05-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change gives more flexibility to the implementation of EncodeBitmap to prefer calling refEncodedData, doing its own encode, or even doing both and making a decision about which to use. The new function signature also allows the implementation to tell the ordered write buffer whether to store the pixel offset, in the case where the encoded bitmap represents the larger bitmap, or to ignore the pixel offset, in the case where the implementation only encoded the subset that is used. Requires changes to chromium to use the new function signature. (https://codereview.chromium.org/15496006/) SkPicture: New API for EncodeBitmap. SkOrderedReadBuffer: Ifdef'd out addition of reading the offset. SkOrderedWriteBuffer: Never call refEncodedData. Allow the user to call that from their EncodeBitmap function, if desired. This addresses https://code.google.com/p/skia/issues/detail?id=1239 Add in ifdef'd out code to record the offset. PictureTest and PictureRenderer: Implement the new definition of EncodeBitmap. Also update the name of the function to meet coding style guidelines. BUG=https://code.google.com/p/skia/issues/detail?id=1239 R=reed@google.com Review URL: https://codereview.chromium.org/15489004 git-svn-id: http://skia.googlecode.com/svn/trunk@9226 2bbb7eff-a529-9590-31e7-b0007b416f81
* add SkPath as real lua objectGravatar reed@google.com2013-05-21
| | | | | | | | R=robertphillips@google.com Review URL: https://codereview.chromium.org/15563013 git-svn-id: http://skia.googlecode.com/svn/trunk@9221 2bbb7eff-a529-9590-31e7-b0007b416f81
* add startcanvas/endcanvas entry-points for the script. rename all "official" ↵Gravatar reed@google.com2013-05-21
| | | | | | | | | | entry-points to use "sk_scrape_" prefix BUG= Review URL: https://codereview.chromium.org/15511006 git-svn-id: http://skia.googlecode.com/svn/trunk@9216 2bbb7eff-a529-9590-31e7-b0007b416f81
* disable dumping the ctm on every drawRect verb (was there for testing)Gravatar reed@google.com2013-05-21
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/15470017 git-svn-id: http://skia.googlecode.com/svn/trunk@9213 2bbb7eff-a529-9590-31e7-b0007b416f81
* support SkCanvas as a real lua objectGravatar mike@reedtribe.org2013-05-21
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@9208 2bbb7eff-a529-9590-31e7-b0007b416f81
* allow multiple lua files to be used in lua_picturesGravatar mike@reedtribe.org2013-05-21
| | | | | | | | | begin "stdlib" for skia in lua add comments to scrape.lua git-svn-id: http://skia.googlecode.com/svn/trunk@9206 2bbb7eff-a529-9590-31e7-b0007b416f81
* printf name of picture *before* we try to scrape it.Gravatar mike@reedtribe.org2013-05-21
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@9205 2bbb7eff-a529-9590-31e7-b0007b416f81
* add encodeData() to SkImageEncoder, and add encoding to SkImageGravatar reed@google.com2013-05-20
| | | | | | | | | BUG= R=scroggo@google.com Review URL: https://codereview.chromium.org/15002004 git-svn-id: http://skia.googlecode.com/svn/trunk@9193 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make rebaseline.py pull msaa imagesGravatar bsalomon@google.com2013-05-17
| | | | | | | | R=robertphillips@google.com Review URL: https://codereview.chromium.org/15299005 git-svn-id: http://skia.googlecode.com/svn/trunk@9179 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-05-16
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@9159 2bbb7eff-a529-9590-31e7-b0007b416f81
* lua accumulate now receives a table of the draw parametersGravatar mike@reedtribe.org2013-05-16
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@9158 2bbb7eff-a529-9590-31e7-b0007b416f81
* add SkLuaCanvasGravatar reed@google.com2013-05-15
| | | | | | | | | | | add lua 5.2 to third_party BUG= R=bungeman@google.com Review URL: https://codereview.chromium.org/14907017 git-svn-id: http://skia.googlecode.com/svn/trunk@9149 2bbb7eff-a529-9590-31e7-b0007b416f81
* Use separate subset directories in skimage.Gravatar scroggo@google.com2013-05-15
| | | | | | | | | | | | Create separate directories for the results of decodeSubset and extractSubset, and use the same name for each version, so that they can be compared easily, using skdiff or visual inspection. R=epoger@google.com Review URL: https://codereview.chromium.org/14672017 git-svn-id: http://skia.googlecode.com/svn/trunk@9148 2bbb7eff-a529-9590-31e7-b0007b416f81
* Update rebaseline.py for N10.Gravatar bsalomon@google.com2013-05-14
| | | | | | | | R=jvanverth@google.com Review URL: https://codereview.chromium.org/14581014 git-svn-id: http://skia.googlecode.com/svn/trunk@9126 2bbb7eff-a529-9590-31e7-b0007b416f81
* Create a self test for skimage.Gravatar scroggo@google.com2013-05-14
| | | | | | | | | | | | Runs skimage twice: once to create an expectations file, and a second time comparing against the file. Uses the files in resources as test files. R=epoger@google.com Review URL: https://codereview.chromium.org/14969007 git-svn-id: http://skia.googlecode.com/svn/trunk@9123 2bbb7eff-a529-9590-31e7-b0007b416f81
* skimage: report failure if expectation not found.Gravatar scroggo@google.com2013-05-14
| | | | | | | | | | | | | | | If the expectation file exists, but the particular file being decoded has no expectation, report a failure. This is more appropriate since the intended use is that an expectation will be created for each file. Without an expectation, we cannot know whether the decoder has changed. R=epoger@google.com Review URL: https://codereview.chromium.org/15094011 git-svn-id: http://skia.googlecode.com/svn/trunk@9122 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix memory leak in filter toolGravatar robertphillips@google.com2013-05-10
| | | | | | | | | https://codereview.chromium.org/15029008/ (SkipBuildbotRuns) git-svn-id: http://skia.googlecode.com/svn/trunk@9094 2bbb7eff-a529-9590-31e7-b0007b416f81
* Write/compare against expectations in skimage tool.Gravatar scroggo@google.com2013-05-08
| | | | | | | | | | | | | | | | | | | | | skimage: Add two new modes: one to write expectations to a json file, and another to compare results against expectations. Use SkPATH_SEPARATOR instead of '/'. gm_expectations: Split into a static library so it can be used by skimage. Make functions non static and move function definitions into source file. Capitalize static member functions to follow the coding style guidelines. BUG=https://code.google.com/p/skia/issues/detail?id=1241 R=epoger@google.com Review URL: https://codereview.chromium.org/14670021 git-svn-id: http://skia.googlecode.com/svn/trunk@9069 2bbb7eff-a529-9590-31e7-b0007b416f81
* Run bench_pictures with "--config msaa4" on Razr I, Nexus 10, and GNexGravatar borenet@google.com2013-05-07
| | | | | | | | Addresses: https://code.google.com/p/skia/issues/detail?id=1276 Review URL: https://codereview.chromium.org/15012002 git-svn-id: http://skia.googlecode.com/svn/trunk@9027 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add a new mode to render_pictures.Gravatar scroggo@google.com2013-05-03
| | | | | | | | | | | In the new mode, if an SKP file has encoded bitmap data, draw the data to a file with the appropriate name. R=borenet@google.com Review URL: https://codereview.chromium.org/14637011 git-svn-id: http://skia.googlecode.com/svn/trunk@9001 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix more warnings.Gravatar scroggo@google.com2013-05-03
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/14624008 git-svn-id: http://skia.googlecode.com/svn/trunk@9000 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make rebaseline.py pull GN Debug images.Gravatar bsalomon@google.com2013-05-03
| | | | | | | | R=senorblanco@chromium.org Review URL: https://codereview.chromium.org/14743004 git-svn-id: http://skia.googlecode.com/svn/trunk@8999 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix build (warning).Gravatar scroggo@google.com2013-05-03
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/14789014 git-svn-id: http://skia.googlecode.com/svn/trunk@8998 2bbb7eff-a529-9590-31e7-b0007b416f81
* Test region decoding in skimage, plus fixes.Gravatar scroggo@google.com2013-05-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add tests in skimage to perform region decoding. Write out a PNG of the region as well as a bitmap obtained with extractSubset for comparison. Rename decodeRegion to decodeSubset, so it will not be confused with SkRegion. (Leave a function called decodeRegion which calls decodeSubset.) Clean up some comments. Use png_set_interlaced_pass instead of modifying pass directly. Make some changes to region decoding to fix problems I discovered during testing: Only call getAddr within a valid range. Check for a NULL fInputStream. Return a boolean for whether cropBitmap succeeded. In cropBitmap, do not attempt to draw to a bitmap to an Index8 bitmap, which crashes. Use extractSubset instead. Remove an assert. R=djsollen@google.com Review URL: https://codereview.chromium.org/14567011 git-svn-id: http://skia.googlecode.com/svn/trunk@8996 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add msaa configs to bench_pictures.Gravatar jvanverth@google.com2013-05-02
| | | | | | | | | | Enables msaa4 and msaa16 configs in bench_pictures and render_pictures (and anything else that may use PictureRenderer). Review URL: https://codereview.chromium.org/14544007/ git-svn-id: http://skia.googlecode.com/svn/trunk@8952 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix submit_try for new builder namesGravatar borenet@google.com2013-05-02
| | | | | | | | | (SkipBuildbotRuns) Unreviewed. Review URL: https://codereview.chromium.org/14611009 git-svn-id: http://skia.googlecode.com/svn/trunk@8950 2bbb7eff-a529-9590-31e7-b0007b416f81
* Force linking with image decoders for images project.Gravatar scroggo@google.com2013-05-01
| | | | | | | | | | | | | | | | | | | | | Previously, each tool that wanted to use image decoders but did not specifically reference them had to create a dummy function that references them in order to ensure they are not stripped by the linker. Instead of making each tool reference each image decoder, do it once in SkImageDecoder.cpp. Now each tool will have image decoders linked in, assuming it includes the images project. This fixes a bug where SKPs with encoded data could not be read by bench_ or render_pictures. R=djsollen@google.com, robertphillips@google.com Review URL: https://codereview.chromium.org/14678003 git-svn-id: http://skia.googlecode.com/svn/trunk@8941 2bbb7eff-a529-9590-31e7-b0007b416f81
* Housekeeper should not fail when skia-autogen is reset. Gravatar rmistry@google.com2013-05-01
| | | | | | | | | | | | Created to fix https://code.google.com/p/skia/issues/detail?id=1269 : UpdateDoxygen and UploadDoxygen steps fail when skia-autogen repository is reset. (SkipBuildbotRuns) R=borenet@google.com Review URL: https://codereview.chromium.org/14772003 git-svn-id: http://skia.googlecode.com/svn/trunk@8935 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix builder name referencesGravatar borenet@google.com2013-04-30
| | | | | | | | | | | ... as a result of https://codereview.chromium.org/14517004/ (SkipBuildbotRuns) R=bensong@google.com, rmistry@google.com, senorblanco@chromium.org Review URL: https://codereview.chromium.org/14544003 git-svn-id: http://skia.googlecode.com/svn/trunk@8921 2bbb7eff-a529-9590-31e7-b0007b416f81
* Updates to skimage tool to use it for testing.Gravatar scroggo@google.com2013-04-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | skimage_main.cpp: More changes in the interest of testing our decoders. force_all_opaque before writing PNG files. Test reencoding the image to its original type (if possible), and then test redecoding it (to make sure the encoding was successful). Add an option to turn off this behavior. Merge decodeFileAndWrite with decodeFile. SkImageDecoder: Add kUnknown_Type to SkImageEncoder::Types. Add a static function to get the Format of an SkStream. In getFormatName(), remove an incorrect assert. When calling the flavor of DecodeStream that returns the Format, check the stream if the decoder returns kUnknown_Format. BUG=https://code.google.com/p/skia/issues/detail?id=1241 Review URL: https://codereview.chromium.org/14363003 git-svn-id: http://skia.googlecode.com/svn/trunk@8862 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 the build.Gravatar scroggo@google.com2013-04-24
| | | | | | | | | | Allow NULL for defaultValue in SkCommandLineFlags. unreviewed. Review URL: https://codereview.chromium.org/14472017 git-svn-id: http://skia.googlecode.com/svn/trunk@8847 2bbb7eff-a529-9590-31e7-b0007b416f81
* Treat default command line argument properly.Gravatar scroggo@google.com2013-04-24
| | | | | | | | | | | | | | | | | | | In SkCommandLineFlags, if the client sets a default value of multiple arguments (e.g. "arg0 arg1 ..."), set the actual defaults to all of those arguments separately (i.e. an array with [0] == "arg0", [1] == "arg1", ...), rather than as one string (i.e. [0] == "arg0 arg1 ..."). Remove the hack that worked around this bug. Also move the increasingly complicated implementation of SkFlagInfo::CreateStringFlag into the cpp file. BUG=https://code.google.com/p/skia/issues/detail?id=1237 Review URL: https://codereview.chromium.org/14366034 git-svn-id: http://skia.googlecode.com/svn/trunk@8845 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
* Fix an SkCommandLineFlags bug.Gravatar scroggo@google.com2013-04-23
| | | | | | | | | | | | | | | | | Previously I was storing an SkTDArray of const char*, which fails if the strings go out of scope. Instead, store an SkTArray of SkString, and copy the strings, so we do not depend on the strings sticking around. Using an SkTArray because it is smart enough to call the destructors, so the copies can be destroyed on program exit. BUG=https://code.google.com/p/skia/issues/detail?id=1237 Review URL: https://codereview.chromium.org/14414008 git-svn-id: http://skia.googlecode.com/svn/trunk@8829 2bbb7eff-a529-9590-31e7-b0007b416f81
* Link webp in skimage and debugger.Gravatar scroggo@google.com2013-04-15
| | | | | | Review URL: https://codereview.chromium.org/14103020 git-svn-id: http://skia.googlecode.com/svn/trunk@8691 2bbb7eff-a529-9590-31e7-b0007b416f81
* Include gif image decoding in images/ on linux.Gravatar scroggo@google.com2013-04-11
| | | | | | | | | | | | | Build SkImageDecoder_libgif in images project and link against libgif on linux. Ensure that the GIF decoder is used in skimage. Requires a new dependency on libgif-dev when building on linux. Review URL: https://codereview.chromium.org/14029011 git-svn-id: http://skia.googlecode.com/svn/trunk@8627 2bbb7eff-a529-9590-31e7-b0007b416f81
* Updates for the skimage tool.Gravatar scroggo@google.com2013-04-11
| | | | | | | | | | | | | | | | | | Allow passing files or folders on the command line. Group the output to show all successes together, all failures together, etc. When writing a new png, do not make its file type ".png.png" if the original was a png. Force linking for JPEG decoder. Use SkCommandLineFlags. Review URL: https://codereview.chromium.org/14089002 git-svn-id: http://skia.googlecode.com/svn/trunk@8615 2bbb7eff-a529-9590-31e7-b0007b416f81
* Simplify bench pictures render target creation.Gravatar commit-bot@chromium.org2013-04-10
| | | | | | | | | | Author: bsalomon@google.com Reviewed By: robertphillips@google.com Review URL: https://chromiumcodereview.appspot.com/13947016 git-svn-id: http://skia.googlecode.com/svn/trunk@8596 2bbb7eff-a529-9590-31e7-b0007b416f81