aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/PictureRenderer.cpp
Commit message (Collapse)AuthorAge
* Add canFilterMaskGPU & filterMaskGPU to SkMaskFilterGravatar robertphillips@google.com2013-07-03
| | | | | | | | https://codereview.chromium.org/18110012/ git-svn-id: http://skia.googlecode.com/svn/trunk@9888 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 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
* 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
* Remove reset of SkTileGrid in PictureRenderer::initGravatar robertphillips@google.com2013-03-08
| | | | | | | | https://codereview.appspot.com/7641044/ git-svn-id: http://skia.googlecode.com/svn/trunk@8042 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert 7932Gravatar robertphillips@google.com2013-03-01
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@7938 2bbb7eff-a529-9590-31e7-b0007b416f81
* Initialize grid info in TiledPictureRenderer::initGravatar robertphillips@google.com2013-03-01
| | | | | | | | https://codereview.appspot.com/7444053/ git-svn-id: http://skia.googlecode.com/svn/trunk@7932 2bbb7eff-a529-9590-31e7-b0007b416f81
* Split GrGLContextInfo into GrGLContext & GrGLContextInfoGravatar robertphillips@google.com2013-02-28
| | | | | | | | https://codereview.appspot.com/7436045/ git-svn-id: http://skia.googlecode.com/svn/trunk@7905 2bbb7eff-a529-9590-31e7-b0007b416f81
* Change SkTileGride geometry calculations to match the Chromium compositor.Gravatar junov@chromium.org2013-02-27
| | | | | | | | | | | | | | This patch changes the semantics of tileWidth/Height to include the border region, and uses an offset to take into account the fact that there is no outer border for outer tiles. This patch also fixes a previous bug where the right column and bottom row were considered to be included in bounds that are expressed as an SkIRect. Companion Chromium CL required for roll: https://codereview.chromium.org/12221077/ TEST=TileGrid unit test Review URL: https://codereview.appspot.com/7350050 git-svn-id: http://skia.googlecode.com/svn/trunk@7885 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
* Enhance GL error checking for non-Ganesh GL callsGravatar robertphillips@google.com2013-02-07
| | | | | | | | https://codereview.appspot.com/7312057/ git-svn-id: http://skia.googlecode.com/svn/trunk@7647 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixed warning/error in PictureRenderer.cppGravatar robertphillips@google.com2013-02-07
| | | | | | | | TBR by scroggo@google.com git-svn-id: http://skia.googlecode.com/svn/trunk@7634 2bbb7eff-a529-9590-31e7-b0007b416f81
* In picture rendering tools, draw the entire scaled image.Gravatar scroggo@google.com2013-02-06
| | | | | | | | | | | If --scale is used, limit the size of the image drawn to the scaled picture size, rather than the original picture size. BUG=https://code.google.com/p/skia/issues/detail?id=1095 Review URL: https://codereview.appspot.com/7307054 git-svn-id: http://skia.googlecode.com/svn/trunk@7633 2bbb7eff-a529-9590-31e7-b0007b416f81
* Change the method for timing individual tiles in bench_pictures.Gravatar scroggo@google.com2013-01-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When timing individual tiles in bench_pictures, keep a timer running across all repeats, and then take the average. The former method of timing each iteration separately runs into precision errors on some platforms. Running on my Mac Pro with OSX 10.8, the cmsecs for the new method and the old method are roughly the same when checking the CPU time. When checking the wall time, the old method often gives me 0ms, while the new method gives me a larger value. I don't think this can be entirely attributed to rounding though, since on occasion I see the old method showing a short time period (.05 - .15ms) while the new method shows .15ms higher (which is in range for the difference I'm seeing for other tiles where the old method reports 0ms). Some other changes: PictureRenderer::resetState now takes a boolean parameter. If called with false, it will only do a flush, while if called with true, it will also call finish. resetState is now called with true everywhere except in between iterations of drawing the same tile (when timing individual tiles). render_pictures_main no longer calls resetState directly, since it already calls end, which calls resetState. BUG=http://code.google.com/p/skia/issues/detail?id=1066 Review URL: https://codereview.appspot.com/7101060 git-svn-id: http://skia.googlecode.com/svn/trunk@7424 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixing expression logic from r7237/r7234Gravatar junov@chromium.org2013-01-16
| | | | | | TBR=borenet git-svn-id: http://skia.googlecode.com/svn/trunk@7238 2bbb7eff-a529-9590-31e7-b0007b416f81
* Compiler warning fixes for r7235Gravatar robertphillips@google.com2013-01-16
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@7237 2bbb7eff-a529-9590-31e7-b0007b416f81
* Turn on the kUsePathBoundsForClip_RecordingFlag in bench, gm and tools that ↵Gravatar junov@chromium.org2013-01-16
| | | | | | | | | | | | | | use class PictureRenderer Chrome uses this flag for recording to skpicture in order to improve performance. Therefore, skai benchmarks should run with this flag enabled, and we need gm and render_pictures test coverage to validate it. In gm, the vanilla SkPicture test step will still run without the flag to ensure that case still gets test coverage, while the SkPicture test steps that use rtree and tileGrid will now run with the flag enabled. Review URL: https://codereview.appspot.com/7111043 git-svn-id: http://skia.googlecode.com/svn/trunk@7234 2bbb7eff-a529-9590-31e7-b0007b416f81
* Cleaned up warnings in Windows build.Gravatar jvanverth@google.com2013-01-07
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@7057 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2012-12-19
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6891 2bbb7eff-a529-9590-31e7-b0007b416f81
* Flags for render_pictures: verify, clone and writeWholeImage:Gravatar edisonn@google.com2012-12-18
| | | | | | | | | | 1) flag to verify PNGs produced by render_picture that produce the same pixels as simple renderer. 2) flag to write one single image (in tile we write individual tiles) - this will help running skdiff also 3) flag to clone the picture before rendering git-svn-id: http://skia.googlecode.com/svn/trunk@6890 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
* Allow bench_pictures to have its viewport set on the command line.Gravatar scroggo@google.com2012-12-13
| | | | | | | | | | | | | | | Instead of drawing the entire (potentially very large) picture, only draw one viewport's worth. example: bench_pictures <skp directory> --viewport 640 480 BUG=https://code.google.com/p/skia/issues/detail?id=1007 Review URL: https://codereview.appspot.com/6943052 git-svn-id: http://skia.googlecode.com/svn/trunk@6799 2bbb7eff-a529-9590-31e7-b0007b416f81
* Modifying SkTileGrid to support arbitrary query rectangles.Gravatar junov@chromium.org2012-12-13
| | | | | | | | | | | Exposing SkTileGrid functionality in the public API through SkTileGridPicture. This patch also makes TileGrid and Rtree testable in gm, which revealed errors. TEST=gm with '--tileGrid' BUG=http://code.google.com/p/chromium/issues/detail?id=164636 Review URL: https://codereview.appspot.com/6933044 git-svn-id: http://skia.googlecode.com/svn/trunk@6783 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2012-12-11
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6746 2bbb7eff-a529-9590-31e7-b0007b416f81
* add '--mode clone' option to bench_picturesGravatar reed@google.com2012-12-10
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6735 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2012-11-30
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6632 2bbb7eff-a529-9590-31e7-b0007b416f81
* add SkPictureUtils::GatherPixelRefs()Gravatar reed@google.com2012-11-29
| | | | | | Review URL: https://codereview.appspot.com/6845106 git-svn-id: http://skia.googlecode.com/svn/trunk@6615 2bbb7eff-a529-9590-31e7-b0007b416f81
* change SkDrawFilter::filter to return a bool, where false means don't-drawGravatar reed@google.com2012-11-26
| | | | | | Review URL: https://codereview.appspot.com/6851111 git-svn-id: http://skia.googlecode.com/svn/trunk@6551 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add an option to render_pictures to rerecord the pictures with PNG encoded ↵Gravatar scroggo@google.com2012-11-07
| | | | | | | | bitmaps. Review URL: https://codereview.appspot.com/6821092 git-svn-id: http://skia.googlecode.com/svn/trunk@6332 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add low blur and AAClip options to picture bench.Gravatar caryclark@google.com2012-11-07
| | | | | | | | Copy the settings instead of pointing to the original set on the stack. Review URL: https://codereview.appspot.com/6818103 git-svn-id: http://skia.googlecode.com/svn/trunk@6330 2bbb7eff-a529-9590-31e7-b0007b416f81
* add draw filter option to picture_benchGravatar caryclark@google.com2012-11-06
| | | | | | | | | Option allows adding a draw filter option per type or for all types. All SkPaint flags may be filtered, plus disabling blur and setting the hint level. Review URL: https://codereview.appspot.com/6816092 git-svn-id: http://skia.googlecode.com/svn/trunk@6318 2bbb7eff-a529-9590-31e7-b0007b416f81
* Adding SkTileGrid: a new subclass of BBoxHierarchy, optimized for tiled ↵Gravatar junov@chromium.org2012-11-06
| | | | | | | | playback. Review URL: https://codereview.appspot.com/6820093 git-svn-id: http://skia.googlecode.com/svn/trunk@6314 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix the PictureRecord step of BenchPictures.Gravatar djsollen@google.com2012-11-06
| | | | | | Review URL: https://codereview.appspot.com/6820100 git-svn-id: http://skia.googlecode.com/svn/trunk@6311 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make bench_pictures output a meaningful config name.Gravatar scroggo@google.com2012-11-02
| | | | | | Review URL: https://codereview.appspot.com/6813074 git-svn-id: http://skia.googlecode.com/svn/trunk@6288 2bbb7eff-a529-9590-31e7-b0007b416f81
* In bench_pictures --multi, maintain thread local caches.Gravatar scroggo@google.com2012-11-02
| | | | | | | | | | | | | | | | | Builds on https://codereview.appspot.com/6718046/ by mtklein. Previously, each iteration of drawing a picture started new threads to draw the picture. Since each thread is using thread local storage for the font cache, this means that each iteration had to start with an empty font cache. The newly added MultiCorePictureRenderer, separated from TiledPictureRenderer, now starts the drawing threads at the beginning of the test using an SkThreadPool, and keeps them alive through all iterations, so the font cache can be reused. For now, I have removed the pipe version of the threaded renderer. Updated bench_pictures_main and render_pictures_main to use the new renderer, and to unref a renderer before early exit. Review URL: https://codereview.appspot.com/6777063 git-svn-id: http://skia.googlecode.com/svn/trunk@6285 2bbb7eff-a529-9590-31e7-b0007b416f81
* Adding rtree support to the bench_pictures utilityGravatar junov@chromium.org2012-11-02
| | | | | | Review URL: https://codereview.appspot.com/6775080 git-svn-id: http://skia.googlecode.com/svn/trunk@6267 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make output path to render_pictures optionalGravatar borenet@google.com2012-10-26
| | | | | | Review URL: https://codereview.appspot.com/6779049 git-svn-id: http://skia.googlecode.com/svn/trunk@6136 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix a warning.Gravatar scroggo@google.com2012-10-11
| | | | | | Review URL: https://codereview.appspot.com/6650048 git-svn-id: http://skia.googlecode.com/svn/trunk@5902 2bbb7eff-a529-9590-31e7-b0007b416f81
* Allow render_pictures to render using multiple threads.Gravatar scroggo@google.com2012-10-03
| | | | | | | | | | | | Make write() a static function so it can be used by the thread entry functions. Add a helper function to append a number to a string and call write to share code. Review URL: https://codereview.appspot.com/6589062 git-svn-id: http://skia.googlecode.com/svn/trunk@5789 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix some bugs in our picture tools.Gravatar scroggo@google.com2012-10-01
| | | | | | | | | | | | When doing tiled rendering in multiple threads, clone fPicture, rather than the blank fPictureClones. Also fix a precedence problem so we get the correct rectangle. In render_pictures_main, call PictureRenderer::setup(). Review URL: https://codereview.appspot.com/6585055 git-svn-id: http://skia.googlecode.com/svn/trunk@5758 2bbb7eff-a529-9590-31e7-b0007b416f81
* In render_pictures tiled rendering, draw a separate PNG for each tile.Gravatar scroggo@google.com2012-09-20
| | | | | | | | | | Since the passed in picture may represent an image which is too large to be represented on the GPU, never create such a large canvas. Instead, after drawing to each tile, create a file showing just that tile. Review URL: https://codereview.appspot.com/6532056 git-svn-id: http://skia.googlecode.com/svn/trunk@5603 2bbb7eff-a529-9590-31e7-b0007b416f81
* In bench_pictures, use a pool of tiles for multicore drawing.Gravatar scroggo@google.com2012-09-20
| | | | | | | | | | | | | | | | | | | Also includes some code cleanup and code sharing. Allow setting the number of threads on the command line. Rename ThreadSafePipeController::playback to ::draw, to be the same as SkPicture so DrawTileToCanvas can take a template parameter. Disallow multithreading with GPU turned on. Display help information with improper tiled arguments. BUG=https://code.google.com/p/skia/issues/detail?id=871 Review URL: https://codereview.appspot.com/6536050 git-svn-id: http://skia.googlecode.com/svn/trunk@5602 2bbb7eff-a529-9590-31e7-b0007b416f81
* Reuse one canvas for every tile in bench_pictures (in single threaded mode).Gravatar scroggo@google.com2012-09-18
| | | | | | | | | | | | Turn off multi threaded option for now. In bench_pictures, do not create a large canvas, since we never use it. Remove unused functions on TiledPictureRenderer. Review URL: https://codereview.appspot.com/6521043 git-svn-id: http://skia.googlecode.com/svn/trunk@5583 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix ordering of initializer list to fix compiler complaints.Gravatar rileya@google.com2012-09-10
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@5472 2bbb7eff-a529-9590-31e7-b0007b416f81
* Report data from bench_pictures in the same fashion as bench.Gravatar scroggo@google.com2012-09-07
| | | | | | | | | | | | | | | | | | | | Move SkBenchLogger into separate files and make bench_pictures use it. Remove sk_tools::print_msg, since SkBenchLogger is now used instead. Combine picture_benchmark with bench_pictures, since that is the only project that uses it. Refactor the aggregator for bench timer data into its own class and make bench_pictures use it. Consolidate the various virtual PictureBenchmark::run functions into one for reuse. BUG=https://code.google.com/p/skia/issues/detail?id=822 Review URL: https://codereview.appspot.com/6488086 git-svn-id: http://skia.googlecode.com/svn/trunk@5432 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixed Windows compiler complaints (esp. in debugger)Gravatar robertphillips@google.com2012-09-06
| | | | | | | | https://codereview.appspot.com/6497090/ git-svn-id: http://skia.googlecode.com/svn/trunk@5419 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix windows build of tools.Gravatar scroggo@google.com2012-08-31
| | | | | | Review URL: https://codereview.appspot.com/6494068 git-svn-id: http://skia.googlecode.com/svn/trunk@5374 2bbb7eff-a529-9590-31e7-b0007b416f81
* Rename my DeferredPipeController to not conflict with the other.Gravatar scroggo@google.com2012-08-31
| | | | | | | | Fixes build. Review URL: https://codereview.appspot.com/6506055 git-svn-id: http://skia.googlecode.com/svn/trunk@5372 2bbb7eff-a529-9590-31e7-b0007b416f81