aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/bench_pictures_main.cpp
Commit message (Collapse)AuthorAge
* Revert of Add image as a draw type that can be filtered (patchset #4 ↵Gravatar kkinnunen2015-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | id:60001 of https://codereview.chromium.org/960783003/) Reason for revert: Fails on mac for some reason. Also is a bit wrong, but this should not be reason for the failure.. Original issue's description: > Add image as a draw type that can be filtered > > Add image as a draw type that can be filtered. > > This is needed when SkImage is added as an object to be drawn so that > the draw is forwarded to SkBaseDevice. This would be used in making > filters use SkImages. > > BUG=skia:3388 > > Committed: https://skia.googlesource.com/skia/+/fa77eb1e51b9317ff993d1be504ada173b561e5f TBR=reed@google.com,bsalomon@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:3388 Review URL: https://codereview.chromium.org/980273002
* Add image as a draw type that can be filteredGravatar kkinnunen2015-03-05
| | | | | | | | | | | | Add image as a draw type that can be filtered. This is needed when SkImage is added as an object to be drawn so that the draw is forwarded to SkBaseDevice. This would be used in making filters use SkImages. BUG=skia:3388 Review URL: https://codereview.chromium.org/960783003
* patch from issue 886233004 at patchset 40001 ↵Gravatar mtklein2015-02-02
| | | | | | | | | | (http://crrev.com/886233004#ps40001) ... with changes proposed in the review. BUG=skia: Review URL: https://codereview.chromium.org/894013002
* Build gpu stats tracking in dev builds.Gravatar bsalomon2014-10-24
| | | | | | | | Fix cache stats, add more info. BUG=skia:2889 Review URL: https://codereview.chromium.org/655263005
* Update old tools to allow MultiPictureDraw renderingGravatar robertphillips2014-10-09
| | | | | | I'll post a separate patch for nanobench and dm Review URL: https://codereview.chromium.org/639013003
* Add counting of some GL callsGravatar robertphillips2014-09-18
| | | | | | | | | | I would like this facility for tracking FBO switch improvements. R=bsalomon@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/553583008
* Change SkPicture::draw to playbackGravatar robertphillips2014-09-04
| | | | | | | | R=reed@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/540963002
* 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
* Update tools for use of picture stats in GPU optimization decisionGravatar robertphillips2014-08-12
| | | | | | | | R=bsalomon@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/466733004
* 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
* Deprecate SkPicture::clone().Gravatar mtklein2014-06-27
| | | | | | | | | | | | | | | | | | Chrome will need -DSK_SUPPORT_LEGACY_PICTURE_CLONE. This removes the modes from our tools that use clone(). No bots run these. DM used clone() in a way that we can just share the picture now. I plan to bring back the ability to test multithreaded picture rendering soon. BUG=skia:2378 R=robertphillips@google.com, mtklein@google.com, bsalomon@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/338633011
* Make SKP bench JSON ouput betterGravatar kelvinly2014-06-26
| | | | | | | | | | BUG=skia: NOTREECHECKS=true R=bensong@google.com, jcgregorio@google.com, bsalomon@google.com, robertphillips@google.com, rmistry@google.com Author: kelvinly@google.com Review URL: https://codereview.chromium.org/329993008
* Move BenchTimer to tools as TimerGravatar mtklein2014-06-20
| | | | | | | | | | | | | | | This breaks a bunch of circular dependencies between tools and gm and bench. BUG=skia: Committed: https://skia.googlesource.com/skia/+/4ed75287aed6371c6e4a41ffcc78c8a49c9810ed CQ_EXTRA_TRYBOTS=tryserver.skia:Build-Mac10.7-Clang-Arm7-Debug-iOS-Trybot,Test-Ubuntu12-ShuttleA-GTX660-x86-Debug-Trybot R=tfarina@chromium.org, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/344213003
* Revert of Move BenchTimer to tools as Timer ↵Gravatar mtklein2014-06-20
| | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/344213003/) Reason for revert: GpuTimer broken Original issue's description: > Move BenchTimer to tools as Timer > > This breaks a bunch of circular dependencies between tools and gm and bench. > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/4ed75287aed6371c6e4a41ffcc78c8a49c9810ed R=tfarina@chromium.org, mtklein@chromium.org TBR=mtklein@chromium.org, tfarina@chromium.org NOTREECHECKS=true NOTRY=true BUG=skia: Author: mtklein@google.com Review URL: https://codereview.chromium.org/346753003
* Move BenchTimer to tools as TimerGravatar mtklein2014-06-20
| | | | | | | | | | | This breaks a bunch of circular dependencies between tools and gm and bench. BUG=skia: R=tfarina@chromium.org, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/344213003
* Remove Sk prefix from some bench classes.Gravatar tfarina2014-06-19
| | | | | | | | | | | | | | | | This idea came while commenting on https://codereview.chromium.org/343583005/ Since SkBenchmark, SkBenchLogger and SkGMBench are not part of the Skia library, they should not have the Sk prefix. BUG=None TEST=make all R=mtklein@google.com Author: tfarina@chromium.org Review URL: https://codereview.chromium.org/347823004
* Add basic stacktrace handler using libunwind.Gravatar mtklein2014-06-18
| | | | | | | | | | | This means we will all have to apt-get install libunwind8-dev on Linux. Mac comes with everything we need already. BUG=skia: R=reed@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/343583005
* In Android framework, make tools depend on jsoncppGravatar scroggo2014-06-18
| | | | | | | | | | | | | | | | | | Always build the tools with JSON, but either build our own or use the system's. Rename skia_build_json_writer to skia_use_system_jsoncpp, since we now always build with JSON. Remove SK_BUILD_JSON_WRITER, which was only there so we could build without JSON it in the framework. BUG=skia:2448 R=djsollen@google.com, reed@google.com Author: scroggo@google.com Review URL: https://codereview.chromium.org/303913002
* 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
* Reland https://codereview.chromium.org/286903025Gravatar commit-bot@chromium.org2014-05-29
| | | | | | | | | | | BUG=skia: R=bensong@google.com, epoger@google.com Author: kelvinly@google.com Review URL: https://codereview.chromium.org/304613002 git-svn-id: http://skia.googlecode.com/svn/trunk@14966 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of PictureBenchmark JSON logging ↵Gravatar commit-bot@chromium.org2014-05-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/286903025/) Reason for revert: Broke some Windows builds; see http://skbug.com/2609 ('certain Windows Build-* bots failing since r14905'). Before re-landing with a fix, please send to some of the trybots that failed the first time. Original issue's description: > Add JSON logging support to bench_pictures by adding a PictureResultsWriter class (in tools/PictureResultsWriter.h) to process logging information, using a very similar style as bench/ResultsWriter.h > > JSON format described in code, above PictureJSONResultsWriter class > > BUG=skia: > > Committed: http://code.google.com/p/skia/source/detail?r=14906 R=bensong@google.com, jcgregorio@google.com, kelvinly@google.com TBR=bensong@google.com, jcgregorio@google.com, kelvinly@google.com NOTREECHECKS=true NOTRY=true BUG=skia:2609 Author: epoger@google.com Review URL: https://codereview.chromium.org/306483010 git-svn-id: http://skia.googlecode.com/svn/trunk@14910 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add JSON logging support to bench_pictures by adding a PictureResultsWriter ↵Gravatar commit-bot@chromium.org2014-05-27
| | | | | | | | | | | | | | | class (in tools/PictureResultsWriter.h) to process logging information, using a very similar style as bench/ResultsWriter.h JSON format described in code, above PictureJSONResultsWriter class BUG=skia: R=bensong@google.com, jcgregorio@google.com Author: kelvinly@google.com Review URL: https://codereview.chromium.org/286903025 git-svn-id: http://skia.googlecode.com/svn/trunk@14906 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of Turn on preprocessing by default ↵Gravatar commit-bot@chromium.org2014-05-23
| | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/299033002/) Reason for revert: Don't want this enabled by default right now Original issue's description: > Turn on preprocessing by default > > The idea is to commit this late at night and then revert it after all the perf bots are running. It should only effect the GPU configs. > > Committed: http://code.google.com/p/skia/source/detail?r=14860 R=bsalomon@google.com TBR=bsalomon@google.com NOTREECHECKS=true NOTRY=true Author: robertphillips@google.com Review URL: https://codereview.chromium.org/299123002 git-svn-id: http://skia.googlecode.com/svn/trunk@14861 2bbb7eff-a529-9590-31e7-b0007b416f81
* Turn on preprocessing by defaultGravatar commit-bot@chromium.org2014-05-22
| | | | | | | | | | | | The idea is to commit this late at night and then revert it after all the perf bots are running. It should only effect the GPU configs. R=bsalomon@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/299033002 git-svn-id: http://skia.googlecode.com/svn/trunk@14860 2bbb7eff-a529-9590-31e7-b0007b416f81
* Update bench to be able to preprocess skpsGravatar commit-bot@chromium.org2014-04-11
| | | | | | | | | | | | This allows benchmarking of optimization improvements and plumbs in the purging API. The purging is necessary so we don't magically get faster because the saveLayers are always pre-generated. R=jvanverth@google.com, reed@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/233663002 git-svn-id: http://skia.googlecode.com/svn/trunk@14154 2bbb7eff-a529-9590-31e7-b0007b416f81
* SkDiscardableMemoryPool to abstract classGravatar commit-bot@chromium.org2014-04-04
| | | | | | | | | | | | Motivation - we want to keep our public headers small. R=scroggo@google.com, reed@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/223403012 git-svn-id: http://skia.googlecode.com/svn/trunk@14063 2bbb7eff-a529-9590-31e7-b0007b416f81
* Update bench pictures to time image decode & upload costsGravatar robertphillips@google.com2013-12-18
| | | | | | | | https://codereview.chromium.org/117583002/ git-svn-id: http://skia.googlecode.com/svn/trunk@12742 2bbb7eff-a529-9590-31e7-b0007b416f81
* Big Cleanup: SkBitmapFactory, SkLazyPixelRef, SkImageCacheGravatar halcanary@google.com2013-12-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed SkBitmapFactory since no clients were using it. New cache selection mechanism can simply pass a SkDiscardableMemory::Factory into the SkDiscardablePixelRef if non-default SkDiscardableMemory should be used. Removed BitmapFactoryTest. SkDiscardableMemory::Factory interface. Android will need this functionality in the future inside their BitmapFactory. Removed SkLazyPixelRef, since it's functionality is now subsumed into SkDiscardablePixelRef. Removed LazyPixelRef test. Modified SkDiscardablePixelRef to optionally allow it to use a SkDiscardableMemory::Factory. This tiny change makes it a replacement for SkLazyPixelRef. This functioanlity is also necessary for moving Android over to SkDiscardablePixelRef from SkImageRef in a later CL. Added a test for this. SkDecodingImageGenerator::Install can optionally pass a factory in to SkDiscardablePixelRef. Removed SkImageCache, SkLruImageCache, and SkPurgeableImageCache. This functionality can be handled much more cleanly by SkDiscardableMemory. New SkDiscardableMemoryPool class to replace SkLruImageCache. In a later CL, we will replace SkImageRef_GlobalPool (used by android) as well. This is a concrete implementation of SkDiscardableMemory::Factory. Added a test for this. modified gm/factory.cpp to remove dependnce on SkBitmapFactory + SkLruImageCache. Now uses SkDecodingImageGenerator + SkDiscardablePixelRef + SkDiscardableMemoryPool. SkImageDecoder::Target replaces SkBitmapFactory::Target. The DecodeMemoryToTarget function may disappear in the future. Moved SkLazyCachingPixelRef::DecodeProc replaces SkBitmapFactory::DecodeProc. This is a short term change, since another CL changes SkLazyCachingPixelRef to use SkImageGenerator instead of DecodeProc. Modified DrawBitmapRectTest to use SkDiscardablePixelRef instead of SkLazyPixelRef. tools/LazyDecodeBitmap.cpp now uses SkDecodingImageGenerator + SkDiscardablePixelRef instead of a SkBitmapFactory. bench_pictures uses the Global SkDiscardableMemoryPool instead of a global gLruImageCache. R=reed@google.com, scroggo@google.com Review URL: https://codereview.chromium.org/103033002 git-svn-id: http://skia.googlecode.com/svn/trunk@12515 2bbb7eff-a529-9590-31e7-b0007b416f81
* Restore a default timer to bench_pictures.Gravatar scroggo@google.com2013-08-02
| | | | | | | | | | | | https://codereview.chromium.org/19862002 removed the default timer to display from PictureBenchmark. Restore a default by putting it in the flag description. R=mtklein@google.com Review URL: https://codereview.chromium.org/21567005 git-svn-id: http://skia.googlecode.com/svn/trunk@10516 2bbb7eff-a529-9590-31e7-b0007b416f81
* Committed: http://code.google.com/p/skia/source/detail?r=10372Gravatar commit-bot@chromium.org2013-07-31
| | | | | | | | | | R=borenet@google.com, bungeman@google.com, robertphillips@google.com, scroggo@google.com, sglez@google.com Author: bsalomon@google.com Review URL: https://chromiumcodereview.appspot.com/19862002 git-svn-id: http://skia.googlecode.com/svn/trunk@10473 2bbb7eff-a529-9590-31e7-b0007b416f81
* This reverts commit 4052fd051db67bd1099fde2c4fe400cfbe1f2426.Gravatar bsalomon@google.com2013-07-25
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@10374 2bbb7eff-a529-9590-31e7-b0007b416f81
* R=borenet@google.com, bungeman@google.com, robertphillips@google.comGravatar commit-bot@chromium.org2013-07-25
| | | | | | | | Author: bsalomon@google.com Review URL: https://chromiumcodereview.appspot.com/19862002 git-svn-id: http://skia.googlecode.com/svn/trunk@10372 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
* 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
* SkFlags now follows proper dashing convention.Gravatar scroggo@google.com2013-04-09
| | | | | | | | | | | | | | | | | | | | | | | | | Two dashes are used for flags with multiple characters, and one dash is used for flags with single characters. In GM, changed '-wp' to '-p' (the command to choose a directory for writing SKPs) to fit with the convention. In render_pictures and bench_pictures, changed the flag for read and write path to have full names (which are consistent) and use the old single character names as their shortcuts. SkCommandLineFlags: Updated the documentation, and only allow -h or --help for help (again, to match the convention). Also enforce the single character limit for the short name, and require the full name to be at least two characters. Provide full names for skhello. BUG=https://code.google.com/p/skia/issues/detail?id=1174 Review URL: https://codereview.chromium.org/12521019 git-svn-id: http://skia.googlecode.com/svn/trunk@8582 2bbb7eff-a529-9590-31e7-b0007b416f81
* Change the name of SkFlags to SkCommandLineFlags.Gravatar scroggo@google.com2013-03-21
| | | | | | | | | | | | | | | | | This name is more specific to what it actually does. Also move the code into tools/flags, to (slightly) better organize the massive tools folder. Update the programs that use it to use the new names. No functionality changes. BUG=https://code.google.com/p/skia/issues/detail?id=1173 Review URL: https://codereview.chromium.org/12440067 git-svn-id: http://skia.googlecode.com/svn/trunk@8304 2bbb7eff-a529-9590-31e7-b0007b416f81
* Improvements/additions to SkImageCache/SkLazyPixelRef.Gravatar scroggo@google.com2013-03-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SkPurgeableImageCache: New image cache that uses virtual memory to store the pixels. Combines features of SkAshmemImageCache (which has been removed) with SkPurgeableMemoryBlock, which has android and Mac versions. SkImageCache: Modified the API. pinCache now returns a status out parameter which states whether the pinned memory retained the old data. This allows allocAndPinCache to only be used for allocations. Add a new debug only interface to purge unpinned data. Updates to documentation, clarifying behavior. Changed CachedStatus to MemoryStatus SkLruImageCache: Implement the new function purgeAllUnpinnedCaches and change implementation of pinCache for the new behavior. SkLazyPixelRef: Rewrite onLockPixels to account for the new behavior of pinCache. BitmapFactoryTest: Test the new SkPurgeableImageCache. Write tests which directly test the SkImageCaches. Create a larger bitmap, since some of the SkImageCaches are designed to handle large bitmaps. bench_ and render_pictures: Consolidate lazy_decode_bitmap into one function. Allow using a flag to specify using the purgeable image cache. Clean up some #includes. Review URL: https://codereview.chromium.org/12433020 git-svn-id: http://skia.googlecode.com/svn/trunk@8207 2bbb7eff-a529-9590-31e7-b0007b416f81
* Provide an option in bench_pictures to count pixel ram.Gravatar scroggo@google.com2013-03-04
| | | | | | | | | | | | | | In SkLruImageCache, provide an option to keep all pixels, and document the new behavior. In gm/factory.cpp, set the budget for the Lru image cache to 1, to retain (basically) the old behavior. BUG=https://code.google.com/p/skia/issues/detail?id=1010 Review URL: https://codereview.chromium.org/12378075 git-svn-id: http://skia.googlecode.com/svn/trunk@7972 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add a way to monitor cache hits and misses for deferred decoding.Gravatar scroggo@google.com2013-03-04
| | | | | | | | | Adds a new flag to bench_pictures in order to do this. Also fix a warning. Review URL: https://codereview.chromium.org/12393046 git-svn-id: http://skia.googlecode.com/svn/trunk@7965 2bbb7eff-a529-9590-31e7-b0007b416f81
* Created my own flag parser, based off of gflags.Gravatar scroggo@google.com2013-03-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Share common code between bench_ and render_ to set up the PictureRenderer. Fix an include error in SkPictureRenderer.h. Simplified parameter passing in render_pictures_main. Switch to using an SkAutoTUnref for the PictureRenderer. I also changed the input format somewhat, so the buildbots need to be updated as well: https://codereview.appspot.com/7441044/ Fixed a bug in PictureBenchmark where calling setTimeIndividualTiles(false) sets the member variable to true. Removed setDeviceType from PictureBenchmark, since only the PictureRenderer needs to know which device type to use. Some changes to the input format: '--logPerIter' no longer takes a 1 or 0. Instead, '--logPerIter' turns it on and '--nologPerIter' turns it off (with off as the default). (Note that this is for bench_pictures; bench still uses the old format) Change '--device' to '--config' and 'bitmap' to '8888' to be the same as gm. Requires '--r' before inputs (to match gm), though there can be multiple inputs following it. Changed --enable-deferred-image-decoding (which no one uses but me yet anyway) to --deferImageDecoding, since the former is incompatible with the flag parser. Changes to behavior: Show a short error message on failure (rather than the explanation of all flags). BUG=https://code.google.com/p/skia/issues/detail?id=1094 Review URL: https://codereview.appspot.com/7230053 git-svn-id: http://skia.googlecode.com/svn/trunk@7961 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
* Add support for using ANGLE in bench_pictures.Gravatar scroggo@google.com2013-02-08
| | | | | | | | | | | | | BUG=https://code.google.com/p/skia/issues/detail?id=1012 Other cleanups: Remove setDeviceType from PictureBenchmark, since it is unnecessary. Dereference PictureRenderer::fGrContext when done with it. Make PictureRenderer::fGrContext and PictureRenderer::fGrContextFactory private, since they are not used by subclasses. Review URL: https://codereview.appspot.com/7314063 git-svn-id: http://skia.googlecode.com/svn/trunk@7677 2bbb7eff-a529-9590-31e7-b0007b416f81
* Patch for r7304. Add string in bench_pictures_main's gFilterTypes for oval ↵Gravatar jvanverth@google.com2013-01-22
| | | | | | filter type. git-svn-id: http://skia.googlecode.com/svn/trunk@7307 2bbb7eff-a529-9590-31e7-b0007b416f81
* Re-enable inst counting in debug builds.Gravatar bsalomon@google.com2013-01-15
| | | | | | | R=robertphillips@google.com Review URL: https://codereview.appspot.com/7098066 git-svn-id: http://skia.googlecode.com/svn/trunk@7206 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix warningsGravatar reed@google.com2013-01-07
| | | | | | Review URL: https://codereview.appspot.com/7060053 git-svn-id: http://skia.googlecode.com/svn/trunk@7070 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove experimental setAsABlur, as it forces the instance to be mutable, and wasGravatar reed@google.com2012-12-18
| | | | | | | not adopted by chrome Review URL: https://codereview.appspot.com/6939071 git-svn-id: http://skia.googlecode.com/svn/trunk@6879 2bbb7eff-a529-9590-31e7-b0007b416f81
* Allow setting a scaleFactor in bench_pictures (and render_pictures).Gravatar scroggo@google.com2012-12-17
| | | | | | | | | | | | | | In TiledPictureRenderer and CopyTilesRenderer, do a postTranslate so the translate is not affected by the scale factor. Likewise, use clipRegion for tiled renderer so it will be unaffected by the scale factor. Respect the viewport for record, playbackCreation, and pipe renderers. Review URL: https://codereview.appspot.com/6947072 git-svn-id: http://skia.googlecode.com/svn/trunk@6853 2bbb7eff-a529-9590-31e7-b0007b416f81
* Provide an option to bench drawing individual tiles in bench_pictures.Gravatar scroggo@google.com2012-12-13
| | | | | | | | | | | | | | | | | | | | | | Provides output like the following: running bench [1236 12045] androidpolice.skp tile_256x256: tile [0,0] out of [5,48]: msecs = 1.00 tile_256x256: tile [1,0] out of [5,48]: msecs = 1.50 tile_256x256: tile [2,0] out of [5,48]: msecs = 1.00 tile_256x256: tile [3,0] out of [5,48]: msecs = 1.50 tile_256x256: tile [4,0] out of [5,48]: msecs = 2.50 tile_256x256: tile [0,1] out of [5,48]: msecs = 2.00 tile_256x256: tile [1,1] out of [5,48]: msecs = 3.50 tile_256x256: tile [2,1] out of [5,48]: msecs = 3.50 tile_256x256: tile [3,1] out of [5,48]: msecs = 6.00 tile_256x256: tile [4,1] out of [5,48]: msecs = 2.50 tile_256x256: tile [0,2] out of [5,48]: msecs = 2.00 BUG=https://code.google.com/p/skia/issues/detail?id=1016 Review URL: https://codereview.appspot.com/6937047 git-svn-id: http://skia.googlecode.com/svn/trunk@6805 2bbb7eff-a529-9590-31e7-b0007b416f81