Commit Graph

42 Commits

Author SHA1 Message Date
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
robertphillips
db539905bb Rename SkPicturePlayback to SkPictureData
This is in preparation for splitting the playback portion of the new SkPictureData class into a new SkPicturePlayback class.

R=reed@google.com, mtklein@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/362773002
2014-07-01 08:47:04 -07:00
tfarina
055cf91416 Delete unused path_utils.* component.
filter tool includes it but isn't using, and nobody else seems to
be using it either. So just remove it now.

BUG=None
TEST=make filter
R=mtklein@google.com

Author: tfarina@chromium.org

Review URL: https://codereview.chromium.org/324273002
2014-06-14 04:50:04 -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
robertphillips@google.com
770963f23f Staging for cleanup of SkPicture-related headers
https://codereview.chromium.org/243173002



git-svn-id: http://skia.googlecode.com/svn/trunk@14258 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-18 18:04:41 +00:00
commit-bot@chromium.org
5fb2ce38b3 Staged removal of SkPicture-derived classes
This CL removes the SkPicture-derived classes (with a flag to keeps clients working). In the process it also lightens the recording factory function so it is no longer ref counted).

The only interesting bits are in SkPicture* and Sk*Picture.*

R=reed@google.com

Author: robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14251 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-17 23:35:06 +00:00
robertphillips@google.com
84b18c7e3e split SkPictureRecorder out of SkPicture
https://codereview.chromium.org/214953003/



git-svn-id: http://skia.googlecode.com/svn/trunk@14171 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-13 19:09:42 +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
commit-bot@chromium.org
7a11591e5e Rename SkDrawCommand subclasses
SkDrawCommand subclass names are too generic and likely to clash in the default namespace.
This makes the header unusable in Chrome - for example, on Mac builders:

../../third_party/skia/src/utils/debugger/SkDrawCommand.h:251:7: error: redefinition of 'Comment'
class Comment : public SkDrawCommand {
	      ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/AIFF.h:192:8: note: previous definition is here
struct Comment {


This CL renames SkDrawCommand subclasses using the following pattern: "${cmd}" -> "Sk${cmd}Command".

R=robertphillips@google.com, bungeman@google.com, djsollen@google.com

Author: fmalita@chromium.org

Review URL: https://chromiumcodereview.appspot.com/17101005

git-svn-id: http://skia.googlecode.com/svn/trunk@9667 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-06-18 20:20:55 +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
robertphillips@google.com
4d98b740cd Fix memory leak in filter tool
https://codereview.chromium.org/15029008/
(SkipBuildbotRuns)



git-svn-id: http://skia.googlecode.com/svn/trunk@9094 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-10 14:51:54 +00:00
skia.committer@gmail.com
3284017a60 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@8568 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-09 07:01:27 +00:00
robertphillips@google.com
2e87ba0c7c Add before and after command count to filter tool
https://codereview.chromium.org/13405003/



git-svn-id: http://skia.googlecode.com/svn/trunk@8562 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-08 15:45:30 +00:00
robertphillips@google.com
c52570475f Expand filter 0 to handle transparent drawBitmapRect paints
https://codereview.chromium.org/13394014/



git-svn-id: http://skia.googlecode.com/svn/trunk@8486 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-02 15:30:03 +00:00
skia.committer@gmail.com
05a2ee052c Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@8477 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-02 07:01:34 +00:00
commit-bot@chromium.org
3bdf16496f Taken together with the filter tool's new looping capabilities, these two optimizations can replace check_7 and apply_7.
Author: robertphillips@google.com

Reviewed By: bsalomon@google.com

Review URL: https://chromiumcodereview.appspot.com/13261019

git-svn-id: http://skia.googlecode.com/svn/trunk@8471 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-01 21:00:27 +00:00
robertphillips@google.com
d9c1853fb8 Add looping over optimizations to filter tool
https://codereview.chromium.org/13261018/



git-svn-id: http://skia.googlecode.com/svn/trunk@8465 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-01 19:10:21 +00:00
robertphillips@google.com
50c84da68b Add getDrawCommandAt and setDrawCommandAt to SkDebugCanvas
https://codereview.chromium.org/13393005/



git-svn-id: http://skia.googlecode.com/svn/trunk@8462 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-01 18:18:49 +00:00
skia.committer@gmail.com
6acd09e2b0 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@8439 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-29 07:01:22 +00:00
robertphillips@google.com
c3410b8cbb New filter targeted at desk_googlespreadsheet overdraw issues
https://codereview.chromium.org/12918029/



git-svn-id: http://skia.googlecode.com/svn/trunk@8424 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-28 12:25:25 +00:00
robertphillips@google.com
9105ad0f85 Add translate & scale optimizations
https://codereview.appspot.com/7571045/



git-svn-id: http://skia.googlecode.com/svn/trunk@8182 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-17 18:46:16 +00:00
robertphillips@google.com
91217d0b0c Making SkDrawCommand more robust
https://codereview.appspot.com/7486052/



git-svn-id: http://skia.googlecode.com/svn/trunk@8181 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-17 18:33:46 +00:00
robertphillips@google.com
febc0ec41b Add misc. optimizations to filter tool
https://codereview.appspot.com/7705043/



git-svn-id: http://skia.googlecode.com/svn/trunk@8087 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-11 22:53:11 +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
3d18d063f0 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@7730 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-14 07:01:34 +00:00
robertphillips@google.com
1780a3cc84 Fix filter optimizations to take the paint's alpha into account
https://codereview.appspot.com/7312083/



git-svn-id: http://skia.googlecode.com/svn/trunk@7711 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-13 13:27:44 +00:00
skia.committer@gmail.com
ae683921ff Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@7608 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-06 07:01:54 +00:00
robertphillips@google.com
7374355408 Improved compartmentalization of filter tool's optimizations & add new optimization
https://codereview.appspot.com/7294049/



git-svn-id: http://skia.googlecode.com/svn/trunk@7601 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-05 20:51:49 +00:00
skia.committer@gmail.com
747f1ecce6 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@7499 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-31 20:28:24 +00:00
robertphillips@google.com
3b0a9fe567 Update filter tool to allow more flexible filtering
https://codereview.appspot.com/7227055/



git-svn-id: http://skia.googlecode.com/svn/trunk@7492 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-31 15:56:22 +00:00
humper@google.com
05af1afd42 eliminate all warnings in non-thirdparty code on mac
Most of these issues were due to functions whose definitions appear in header files; I changed those functions to be 'static inline' instead of just 'static' or 'inline', which kills the warning for such functions.

Other functions that were static or anonymous-namespaced but were unused in cpp files were probably called at some point but are no longer; someone who knows more than I do should probably scrub all the functions I either deleted or #if 0'ed out and make sure that the right thing is happening here.

Lots of unused variables removed, and one nasty const issue handled.

There remains a single warning in thirdparty/externals/cityhash/src/city.cc on line 146 related to a signed/unsigned mismatch.  I don't know if we have control over this library so I didn't fix this one, but perhaps someone could do something about that one.

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@7051 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-07 16:47:43 +00:00
skia.committer@gmail.com
c1f224ac07 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@6721 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-08 02:01:38 +00:00
robertphillips@google.com
d3d377f1d6 Update filter tool to write out paths to .cpp file
https://codereview.appspot.com/6843125/



git-svn-id: http://skia.googlecode.com/svn/trunk@6714 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-07 20:56:13 +00:00
djsollen@google.com
a09e8838f2 Update filter tool to allow input directory.
Review URL: https://codereview.appspot.com/6847046

git-svn-id: http://skia.googlecode.com/svn/trunk@6399 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-13 18:50:33 +00:00
skia.committer@gmail.com
4349c31077 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@6381 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-12 19:41:02 +00:00
robertphillips@google.com
4e4d75b06b Update filter tool to handle PNG encoded SkBitmaps
https://codereview.appspot.com/6813094/



git-svn-id: http://skia.googlecode.com/svn/trunk@6379 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-12 18:03:19 +00:00
robertphillips@google.com
831c726f83 Correctly set width & height in filtered SkPictures
https://codereview.appspot.com/6772047/



git-svn-id: http://skia.googlecode.com/svn/trunk@6103 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-25 14:45:08 +00:00
robertphillips@google.com
63f1127a70 Make filter tool actually filter the read in SkPicture
https://codereview.appspot.com/6765046/



git-svn-id: http://skia.googlecode.com/svn/trunk@6080 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-24 19:30:41 +00:00
robertphillips@google.com
801cee1d4c Added ability to extract SkBitmaps to filter tool
https://codereview.appspot.com/6748043/



git-svn-id: http://skia.googlecode.com/svn/trunk@6021 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-19 19:06:11 +00:00
caryclark@google.com
9598f4256d fix filter for ios
Review URL: https://codereview.appspot.com/6635047

git-svn-id: http://skia.googlecode.com/svn/trunk@5859 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-09 12:32:37 +00:00
tfarina@chromium.org
a5b7cc00b9 Remove unnecessary function declaration.
R=robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@5851 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-08 14:41:10 +00:00
robertphillips@google.com
c7e4a5a02a Created filter command line tool
https://codereview.appspot.com/6595066/



git-svn-id: http://skia.googlecode.com/svn/trunk@5803 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-04 13:00:33 +00:00