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
and deserialization for encoding and decoding bitmaps.
Remove kForceFlattenBitmapPixels_Flag, which is no longer used.
When an SkOrderedReadBuffer needs to read a bitmap, if it does not
have an image decoder, use a dummy bitmap.
In GM, add a tolerance option for color differences, used when
testing picture serialization, so it can assume two images are the
same even though PNG encoding/decoding may have resulted in small
differences.
Create dummy implementations for SkImageDecoder and SkImageEncoder
functions in SkImageDecoder_empty so that a project that does not
want to include the images project it can still build.
Allow ports to build without images project.
In Mac's image encoder, copy 4444 to 8888 before encoding.
Add SkWriter32::reservePad, to provide a pointer to write non 4 byte
aligned data, padded with zeroes.
In bench_ and render_ pictures, pass decode function to SkPicture
creation from a stream.
BUG=https://code.google.com/p/skia/issues/detail?id=842
Review URL: https://codereview.appspot.com/6551071
git-svn-id: http://skia.googlecode.com/svn/trunk@5818 2bbb7eff-a529-9590-31e7-b0007b416f81
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
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
bench_pictures with "--device gpu" is failing because we're trying to allocate
too much GPU memory. Move the recently-added scaling code into picture_utils
and share it between render_pictures and bench_pictures.
Review URL: https://codereview.appspot.com/6495125
git-svn-id: http://skia.googlecode.com/svn/trunk@5543 2bbb7eff-a529-9590-31e7-b0007b416f81
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
Further, the picture is also stored in the PictureRenderer.
The main gain of all of this is that we will not have to change how the device in more than one place when we end up adding different devices.
Review URL: https://codereview.appspot.com/6458074
git-svn-id: http://skia.googlecode.com/svn/trunk@4990 2bbb7eff-a529-9590-31e7-b0007b416f81
Changed the render_pictures, bench_pictures and test_pictures.py so that multiple inputs can be given. Furthermore, specific files can also be specified.
Unit tests have also been added for picture_utils.cpp.
Review URL: https://codereview.appspot.com/6345054
git-svn-id: http://skia.googlecode.com/svn/trunk@4486 2bbb7eff-a529-9590-31e7-b0007b416f81