Commit Graph

28 Commits

Author SHA1 Message Date
robertphillips
a8d7f0b13c Try out scalar picture sizes
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
2014-08-29 08:03:56 -07:00
mtklein
afb4379dbc Print max RSS in GM and nanobench too.
Everyone used MB, so update the API to just return that.

BUG=skia:
R=halcanary@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/483323002
2014-08-19 15:55:55 -07:00
halcanary
8b2cb3391d clean up render_pdfs:
Remove unused headers
     replace dynamic memory wstream with null wstream.
     Use SkAutoTDelete when appropriate.
     Replace PdfRenderer class with short function: pdf_to_stream.
     Collapse render_pdf, process_input, tool_main_core functions
     Split out process_input_files function.
     Don't crash when no arguments given.
     print out max rss on each skp.
     prettier output

R=mtklein@google.com

Author: halcanary@google.com

Review URL: https://codereview.chromium.org/463603002
2014-08-11 13:08:27 -07:00
halcanary
0d154eeaeb Process Statistics header, add max RSS to render_pdfs
Committed: https://skia.googlesource.com/skia/+/6274baae7fe82ce6481da367687aa6168356e1e1

R=mtklein@google.com

Author: halcanary@google.com

Review URL: https://codereview.chromium.org/448993003
2014-08-11 11:33:51 -07:00
bungeman
619e07656d Revert of Process Statistics header, add max RSS to render_pdfs (https://codereview.chromium.org/448993003/)
Reason for revert:
Reverting due to breaking iOS bots.

Original issue's description:
> Process Statistics header, add max RSS to render_pdfs
>
> Committed: https://skia.googlesource.com/skia/+/6274baae7fe82ce6481da367687aa6168356e1e1

R=mtklein@google.com, halcanary@google.com
TBR=halcanary@google.com, mtklein@google.com
NOTREECHECKS=true
NOTRY=true

Author: bungeman@google.com

Review URL: https://codereview.chromium.org/448243003
2014-08-07 13:27:18 -07:00
halcanary
6274baae7f Process Statistics header, add max RSS to render_pdfs
R=mtklein@google.com

Author: halcanary@google.com

Review URL: https://codereview.chromium.org/448993003
2014-08-07 13:13:54 -07:00
halcanary
0bef17a678 render_pdfs implements --match
BUG=skia:2743
NOTRY=true
R=djsollen@google.com, mtklein@google.com, borenet@google.com

Author: halcanary@google.com

Review URL: https://codereview.chromium.org/441423002
2014-08-07 07:24:48 -07:00
halcanary
f91b47ff9e Revert of Memory improvements to render_pdfs; better DM pool size defaults (https://codereview.chromium.org/433063002/)
Reason for revert:
breaking android tests

Original issue's description:
> Memory improvements to render_pdfs; better DM pool size defaults
>
> Make SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE equal to
> skia_resource_cache_mb_limit, if that value is >0 (true for some
> low-memory Android devices).
>
> render_pdfs test program uses lazy decoding (and the discardable
> memory pool).
>
> BUG=skia:2743
>
> Committed: https://skia.googlesource.com/skia/+/66058b614d9c8cb63c24b1c779dd1a9a80752217

R=djsollen@google.com, mtklein@google.com
TBR=djsollen@google.com, mtklein@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2743

Author: halcanary@google.com

Review URL: https://codereview.chromium.org/418173012
2014-08-01 11:54:48 -07:00
halcanary
66058b614d Memory improvements to render_pdfs; better DM pool size defaults
Make SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE equal to
skia_resource_cache_mb_limit, if that value is >0 (true for some
low-memory Android devices).

render_pdfs test program uses lazy decoding (and the discardable
memory pool).

BUG=skia:2743
R=djsollen@google.com, mtklein@google.com

Author: halcanary@google.com

Review URL: https://codereview.chromium.org/433063002
2014-08-01 09:25:11 -07:00
tfarina
a8e2e1504b Cleanup: Rename SkOSPath functions.
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
2014-07-28 19:26:58 -07:00
tfarina
da4ed3289e Cleanup: Delete sk_tools::make_filepath() in favor of SkOSPath::SkPathJoin().
BUG=None
TEST=make tools tests && out/Debug/tests
R=epoger@google.com

Author: tfarina@chromium.org

Review URL: https://codereview.chromium.org/327403002
2014-06-12 08:50:56 -07:00
tfarina
1c99ea8ed8 Cleanup: Delete sk_tools::get_basename() in favor of SkOSPath::SkBasename().
BUG=None
TEST=make tests && out/Debug/tests
R=epoger@google.com

Author: tfarina@chromium.org

Review URL: https://codereview.chromium.org/321693002
2014-06-11 08:58:50 -07:00
commit-bot@chromium.org
d5f032d46b Do not define SK_SUPPORT_DEEPCOPYTO_CONFIG in Skia.
Clean up our callers who depend on the deprecated function.

R=scroggo@google.com

Author: reed@google.com

Review URL: https://codereview.chromium.org/178003003

git-svn-id: http://skia.googlecode.com/svn/trunk@13566 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-02-24 18:51:43 +00:00
reed@google.com
672588b684 change offset to xy for pixelref subsetting
BUG=
R=scroggo@google.com

Review URL: https://codereview.chromium.org/105893012

git-svn-id: http://skia.googlecode.com/svn/trunk@12958 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-08 15:42:01 +00:00
commit-bot@chromium.org
5e00989a28 Add SkPDFDeviceFlatenner which extends SkPDFDevice to add support to flatten the path and the text when we have perspective.
prepare to deprecate SkPDFDevice constructor, and route gm and render_pdfs to use SkDocument::Create pdf interface instead. - controlled by a flag
add comments where we are supposed to flatten other features (paint, shaders, ... )

R=reed@google.com, bungeman@google.com, scroggo@google.com, vandebo@chromium.org, bsalomon@google.com

Author: edisonn@google.com

Review URL: https://codereview.chromium.org/24811002

git-svn-id: http://skia.googlecode.com/svn/trunk@11751 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-14 13:42:12 +00:00
commit-bot@chromium.org
608ea6508a Use SkPicture::ExtractBitmap callback in pdf too, there is no need for a specialized function pointer for pdf only only to pass a rectangle, when we can use subseted bitmaps.
R=scroggo@google.com, reed@google.com, vandebo@chromium.org, bsalomon@google.com

Author: edisonn@google.com

Review URL: https://codereview.chromium.org/25054002

git-svn-id: http://skia.googlecode.com/svn/trunk@11591 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-03 19:29:21 +00:00
scroggo@google.com
f1754ec691 Replace SkPicture(SkStream) constructors with a factory.
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
2013-06-28 21:32:00 +00:00
scroggo@google.com
7def5e1630 Separate core and images project.
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
2013-05-31 14:00:10 +00:00
skia.committer@gmail.com
83f0d302e8 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@8851 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-25 07:01:04 +00:00
edisonn@google.com
d9dfa18372 Encode images with DCTDecode (JPEG) in PDFs if it makes sense. Fallback to 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
2013-04-24 13:01:01 +00:00
edisonn@google.com
184487c808 Collect minidump and print callstack if an app chrashes.
Review URL: https://codereview.chromium.org/12387018

git-svn-id: http://skia.googlecode.com/svn/trunk@8044 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-08 18:00:16 +00:00
scroggo@google.com
f8d7d27313 Create SkLazyPixelRef which performs lazy decoding.
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
2013-02-22 21:38:35 +00:00
skia.committer@gmail.com
e16efc1882 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@7406 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-26 07:06:02 +00:00
edisonn@google.com
4fa566b34a Add option to render PDFs to memory only.
Review URL: https://codereview.appspot.com/7097045

git-svn-id: http://skia.googlecode.com/svn/trunk@7140 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-11 20:30:41 +00:00
humper@google.com
f286329ad1 fix warning in render pdf tool
BUG=

Review URL: https://codereview.appspot.com/7033056

git-svn-id: http://skia.googlecode.com/svn/trunk@7063 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-07 20:08:56 +00:00
skia.committer@gmail.com
760f2d95dd Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@6258 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-02 02:01:24 +00:00
edisonn@google.com
9cf5b28648 Support render_pdfs in iOS too (add tool_main()).
git-svn-id: http://skia.googlecode.com/svn/trunk@6254 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-01 20:07:33 +00:00
edisonn@google.com
c319abeeef Add utility to convert skp files to pdf files. Code compatible with render_pictures_main.cpp. I could have refactored the code to avoid code duplication, but it does not seem right, and it will overcomplicate the code.
Review URL: https://codereview.appspot.com/6615073

git-svn-id: http://skia.googlecode.com/svn/trunk@6253 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-01 19:52:38 +00:00