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
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
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=1275R=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
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
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