aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/lua/lua_pictures.cpp
Commit message (Collapse)AuthorAge
* Make iOS main() functions normal.Gravatar Mike Klein2017-02-06
| | | | | | | | | | | The weird foo_mains are no longer needed when we build with GN. CQ_INCLUDE_TRYBOTS=skia.primary:Build-Mac-Clang-arm-Debug-iOS Change-Id: Iae50696741e0dc277d96dda4968a1ae41cb17c8a Reviewed-on: https://skia-review.googlesource.com/8064 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Stephan Altmueller <stephana@google.com>
* Revert[2] "Change SkCanvas to *not* inherit from SkRefCnt"Gravatar Mike Reed2016-11-13
| | | | | | | | | | | | | | | | | Changes over original: - conditionalize ownership in SkPictureRecorder - conditionalize ownership in SkCanvasStateUtils This reverts commit b613c266df48cf45296ecc23d1bd7098c84bb7ba. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4742 Change-Id: Ib25514d6f546c69b6650b5c957403b04f7380dc2 Reviewed-on: https://skia-review.googlesource.com/4742 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* GN: build Lua tools when skia_use_lua.Gravatar Mike Klein2016-11-11
| | | | | | | | | | | | | | | | | When we opt into Lua, this builds SampleLua into SampleApp, and the lua_app and lua_pictures tools. I've tested this builds with and without skia_use_system_lua on my Mac laptop and Linux desktop. I've made lua_pictures.cpp's flags static to avoid conflicts with flags in SkCommonFlags.cpp. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4699 DOCS_PREVIEW= https://skia.org/?cl=4699 Change-Id: I8176fd51d8a38746e7d730cfcce66da42b9a015a Reviewed-on: https://skia-review.googlesource.com/4699 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Revert "Change SkCanvas to *not* inherit from SkRefCnt"Gravatar Heather Miller2016-11-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 824075071885b6b741c141cbe2134d8345d34589. Reason for revert: Breaking WebView (chromium:663959) Original change's description: > Change SkCanvas to *not* inherit from SkRefCnt > > Definitely tricky for classes like SkNWayCanvas, where the caller (today) > need not pay attention to ownership of the canvases it gave the NWay > (after this CL, the caller *must* managed ownership) > > BUG=skia: > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4441 > > DOCS_PREVIEW= https://skia.org/?cl=4441 > > Change-Id: Ib1ac07a3cdf0686d78e7aaa4735d45cc90bea081 > Reviewed-on: https://skia-review.googlesource.com/4441 > Commit-Queue: Mike Reed <reed@google.com> > Reviewed-by: Florin Malita <fmalita@chromium.org> > Reviewed-by: Robert Phillips <robertphillips@google.com> > TBR=djsollen@google.com,mtklein@google.com,halcanary@google.com,robertphillips@google.com,fmalita@chromium.org,fmalita@google.com,reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I5e3b3e876b7d2c09833cf841801321033b6b968b Reviewed-on: https://skia-review.googlesource.com/4687 Commit-Queue: Heather Miller <hcm@google.com> Reviewed-by: Heather Miller <hcm@google.com>
* Change SkCanvas to *not* inherit from SkRefCntGravatar Mike Reed2016-11-09
| | | | | | | | | | | | | | | | | | Definitely tricky for classes like SkNWayCanvas, where the caller (today) need not pay attention to ownership of the canvases it gave the NWay (after this CL, the caller *must* managed ownership) BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4441 DOCS_PREVIEW= https://skia.org/?cl=4441 Change-Id: Ib1ac07a3cdf0686d78e7aaa4735d45cc90bea081 Reviewed-on: https://skia-review.googlesource.com/4441 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Missing SkOSPath include in lua_pictures.cppGravatar fmalita2016-11-09
| | | | | | | TBR=bungeman@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2494443002 Review-Url: https://codereview.chromium.org/2494443002
* tools: s/SkAutoTUnref/sk_sp/Gravatar Hal Canary2016-11-03
| | | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4391 Change-Id: Iae8b032b00d3579c77f3b86370dde71c4649da45 Reviewed-on: https://skia-review.googlesource.com/4391 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* SkFontData to use smart pointers.Gravatar bungeman2016-09-16
| | | | | | | | | | | | | | | | | The SkFontData type is not exposed externally, so any method which uses it can be updated to use smart pointers without affecting external users. Updating this first will make updating the public API much easier. This also updates SkStreamAsset* SkStream::NewFromFile(const char*) to std::unique_ptr<SkStreamAsset> SkStream::MakeFromFile(const char*). It appears that no one outside Skia is currently using SkStream::NewfromFile so this is a good time to update it as well. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339273002 Committed: https://skia.googlesource.com/skia/+/d8c2476a8b1e1e1a1771b17e8dd4db8645914f8c Review-Url: https://codereview.chromium.org/2339273002
* Revert of SkFontData to use smart pointers. (patchset #3 id:40001 of ↵Gravatar bungeman2016-09-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/2339273002/ ) Reason for revert: Killing Mac Original issue's description: > SkFontData to use smart pointers. > > The SkFontData type is not exposed externally, so any method which uses > it can be updated to use smart pointers without affecting external > users. Updating this first will make updating the public API much > easier. > > This also updates SkStreamAsset* SkStream::NewFromFile(const char*) to > std::unique_ptr<SkStreamAsset> SkStream::MakeFromFile(const char*). It > appears that no one outside Skia is currently using SkStream::NewfromFile > so this is a good time to update it as well. > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339273002 > > Committed: https://skia.googlesource.com/skia/+/d8c2476a8b1e1e1a1771b17e8dd4db8645914f8c TBR=mtklein@chromium.org,halcanary@google.com,mtklein@google.com,reed@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review-Url: https://codereview.chromium.org/2343933002
* SkFontData to use smart pointers.Gravatar bungeman2016-09-15
| | | | | | | | | | | | | | | | The SkFontData type is not exposed externally, so any method which uses it can be updated to use smart pointers without affecting external users. Updating this first will make updating the public API much easier. This also updates SkStreamAsset* SkStream::NewFromFile(const char*) to std::unique_ptr<SkStreamAsset> SkStream::MakeFromFile(const char*). It appears that no one outside Skia is currently using SkStream::NewfromFile so this is a good time to update it as well. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339273002 Review-Url: https://codereview.chromium.org/2339273002
* Move off SK_SUPPORT_LEGACY_DATA_FACTORIES.Gravatar bungeman2016-08-02
| | | | | | | This moves Skia code off of SK_SUPPORT_LEGACY_DATA_FACTORIES. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2206633004 Review-Url: https://codereview.chromium.org/2206633004
* Style bikeshed - remove extraneous whitespaceGravatar halcanary2016-03-29
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1842753002 Review URL: https://codereview.chromium.org/1842753002
* return pictures as sk_spGravatar reed2016-03-18
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1811703002 Review URL: https://codereview.chromium.org/1811703002
* Remove unused tools and unused includes of SkImageDecoderGravatar msarett2016-03-03
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1760583003 Review URL: https://codereview.chromium.org/1760583003
* Make SkPicture/SkImageGenerator default to SkCodecGravatar msarett2016-02-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | Remove reference to SkImageDecoder from SkPicture. Make the default InstallPixelRefProc passed to CreateFromStream use SkImageGenerator::NewFromEncoded instead. Make SkImageGenerator::NewFromEncoded create an SkCodecImageGenerator. Remove the old version that used SkImageDecoder. Remove all versions of lazy_decode_bitmap/LazyDecodeBitmap. The default now behaves lazily. Update all clients to use the default. Move SkImageDecoderGenerator into KtxTest.cpp, and use it directly. This is a rebased version of: https://codereview.chromium.org/1671193002/ TBR=reed@google.com BUG=skia:4691 BUG=skia:4290 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1699183004 Review URL: https://codereview.chromium.org/1699183004
* Revert of Make SkPicture/SkImageGenerator default to SkCodec (patchset #7 ↵Gravatar kjlubick2016-02-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | id:120001 of https://codereview.chromium.org/1671193002/ ) Reason for revert: Breaks Ubuntu and Mac CMAKE Original issue's description: > Make SkPicture/SkImageGenerator default to SkCodec > > Remove reference to SkImageDecoder from SkPicture. Make the default > InstallPixelRefProc passed to CreateFromStream use > SkImageGenerator::NewFromEncoded instead. > > Make SkImageGenerator::NewFromEncoded create an SkCodecImageGenerator. > Remove the old version that used SkImageDecoder. > > Remove all versions of lazy_decode_bitmap/LazyDecodeBitmap. The default > now behaves lazily. > > Update all clients to use the default. > > Move SkImageDecoderGenerator into KtxTest.cpp, and use it directly. > > BUG=skia:4691 > BUG=skia:4290 > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1671193002 > > Committed: https://skia.googlesource.com/skia/+/026388a01864c74208ad57d1ba4f711602d101c6 TBR=msarett@google.com,reed@google.com,scroggo@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:4691 Review URL: https://codereview.chromium.org/1685963004
* Make SkPicture/SkImageGenerator default to SkCodecGravatar scroggo2016-02-10
| | | | | | | | | | | | | | | | | | | | | | Remove reference to SkImageDecoder from SkPicture. Make the default InstallPixelRefProc passed to CreateFromStream use SkImageGenerator::NewFromEncoded instead. Make SkImageGenerator::NewFromEncoded create an SkCodecImageGenerator. Remove the old version that used SkImageDecoder. Remove all versions of lazy_decode_bitmap/LazyDecodeBitmap. The default now behaves lazily. Update all clients to use the default. Move SkImageDecoderGenerator into KtxTest.cpp, and use it directly. BUG=skia:4691 BUG=skia:4290 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1671193002 Review URL: https://codereview.chromium.org/1671193002
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* Remove include of stdlib.h from SkTypes.h.Gravatar bungeman2015-08-26
| | | | | | | | | | | | | | | Unfortunately, immintrin.h (which is also included by SkTypes) includes xmmintrin.h which includes mm_malloc.h which includes stdlib.h for malloc even though, from the implementation, it is difficult to see why. Fortunately, arm_neon.h does not seem to be involved in such shenanigans, so building for Android will keep things sane. TBR=reed@google.com Doesn't change Skia API, just moves an include. Review URL: https://codereview.chromium.org/1313203003
* Make SkStream *not* ref counted.Gravatar scroggo2015-01-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SkStream is a stateful object, so it does not make sense for it to have multiple owners. Make SkStream inherit directly from SkNoncopyable. Update methods which previously called SkStream::ref() (e.g. SkImageDecoder::buildTileIndex() and SkFrontBufferedStream::Create(), which required the existing owners to call SkStream::unref()) to take ownership of their SkStream parameters and delete when done (including on failure). Switch all SkAutoTUnref<SkStream>s to SkAutoTDelete<SkStream>s. In some cases this means heap allocating streams that were previously stack allocated. Respect ownership rules of SkTypeface::CreateFromStream() and SkImageDecoder::buildTileIndex(). Update the comments for exceptional methods which do not affect the ownership of their SkStream parameters (e.g. SkPicture::CreateFromStream() and SkTypeface::Deserialize()) to be explicit about ownership. Remove test_stream_life, which tested that buildTileIndex() behaved correctly when SkStream was a ref counted object. The test does not make sense now that it is not. In SkPDFStream, remove the SkMemoryStream member. Instead of using it, create a new SkMemoryStream to pass to fDataStream (which is now an SkAutoTDelete). Make other pdf rasterizers behave like SkPDFDocumentToBitmap. SkPDFDocumentToBitmap delete the SkStream, so do the same in the following pdf rasterizers: SkPopplerRasterizePDF SkNativeRasterizePDF SkNoRasterizePDF Requires a change to Android, which currently treats SkStreams as ref counted objects. Review URL: https://codereview.chromium.org/849103004
* use SkData::NewUninitializedGravatar reed2014-09-12
| | | | | | | | | BUG=skia: R=bungeman@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/565803005
* 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
* 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
* Alter SkCanvas::drawPicture (devirtualize, take const SkPicture, take pointer)Gravatar robertphillips2014-06-04
| | | | | | | | R=reed@google.com, bsalomon@google.com, mtklein@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/313613004
* Add quiet mode to lua_pictures.Gravatar commit-bot@chromium.org2014-03-19
| | | | | | | | | | | | | | | | | | This allows: for i in {0..5}; do out/Debug/lua_pictures -q --skpPath $SKP_PATH -l $SCRIPT --modulo $i 6 done to generate output similar to what telemetry will generate. R=reed@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/197793007 git-svn-id: http://skia.googlecode.com/svn/trunk@13861 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add the lazy decoder from PictureFlags to SkImageDecoderGravatar commit-bot@chromium.org2013-07-16
| | | | | | | | | | R=caryclark@google.com, scroggo@google.com Author: sglez@google.com Review URL: https://chromiumcodereview.appspot.com/19109002 git-svn-id: http://skia.googlecode.com/svn/trunk@10111 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
* Add modulo flag to lua_pictures.Gravatar commit-bot@chromium.org2013-06-21
| | | | | | | | | | | | The intended use is spawning processes to save time. R=caryclark@google.com, reed@google.com Author: sglez@google.com Review URL: https://chromiumcodereview.appspot.com/16950025 git-svn-id: http://skia.googlecode.com/svn/trunk@9736 2bbb7eff-a529-9590-31e7-b0007b416f81
* Allow files, making ".skp files or directories are required." less of a lie.Gravatar commit-bot@chromium.org2013-06-18
| | | | | | | | | | | BUG= R=reed@google.com Author: mtklein@google.com Review URL: https://chromiumcodereview.appspot.com/17151008 git-svn-id: http://skia.googlecode.com/svn/trunk@9665 2bbb7eff-a529-9590-31e7-b0007b416f81
* use ForceLinking to get codecs into lua_pictureGravatar reed@google.com2013-06-12
| | | | | | | | | BUG= R=scroggo@google.com Review URL: https://codereview.chromium.org/16847002 git-svn-id: http://skia.googlecode.com/svn/trunk@9549 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-06-01
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@9387 2bbb7eff-a529-9590-31e7-b0007b416f81
* sort the glyphID arraysGravatar reed@google.com2013-05-31
| | | | | | add head/tail code git-svn-id: http://skia.googlecode.com/svn/trunk@9376 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 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
* 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
* 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
* 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