For the raster path, we do a straightforward 2-pass method: draw background, then composite the foreground over it.
For the GPU path, if the xfermode can be expressed as an effect, we build an effect with the background texture incorporated, then do a single-pass draw fetching both foreground and background textures, and compositing to the result. If the xfermode is expressed as src/dst coefficients, we do a 2-pass draw as in the raster path and use fixed-function blending.
R=bsalomon@google.com, reed@google.com
Review URL: https://codereview.chromium.org/16125008
git-svn-id: http://skia.googlecode.com/svn/trunk@9373 2bbb7eff-a529-9590-31e7-b0007b416f81
Remove ifdef's preventing a change to read and write offsets.
This fixes a bug where the SKP will draw the wrong portion
of bitmaps.
In addition, read the offset from the stream whether the
bitmap decoder succeeds or not, so that a failure to decode
still advances the stream to the correct spot.
Set the offset to 0 before calling SkPicture::EncodeBitmap,
so that if the function does not set it, we will not
modify the offset.
REQUIRES A CHANGE TO THE PICTURE VERSION. Does not change
PICTURE_VERSION itself, since other CLs are also requiring
a change.
BUG=https://code.google.com/p/skia/issues/detail?id=1301R=djsollen@google.com
Review URL: https://codereview.chromium.org/15713015
git-svn-id: http://skia.googlecode.com/svn/trunk@9368 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
--tests is the only mandatory argument.
If you used to run this:
rebaseline.py aaclip bigmatrix
Run this instead:
rebaseline.py --tests aaclip bigmatrix
That's the only change you NEED to make.
And then, if you WANT to specify --configs, --subdirs, etc. you CAN.
R=senorblanco@chromium.org
Review URL: https://codereview.chromium.org/15675010
git-svn-id: http://skia.googlecode.com/svn/trunk@9348 2bbb7eff-a529-9590-31e7-b0007b416f81
Doing it this way required modifying the arithmode GM to use saveLayer()/restore() rather than creating an offscreen SkBitmap, since otherwise the compositing is always done in raster mode. Fixing that in turn exposed that SkArithmeticMode did not work in Picture mode, since it wasn't flattenable. Made it so.
Note: this will require rebaselining the arithmode GM (again).
R=bsalomon@google.com, reed@google.com
Review URL: https://codereview.chromium.org/16064002
git-svn-id: http://skia.googlecode.com/svn/trunk@9324 2bbb7eff-a529-9590-31e7-b0007b416f81
Currently we use gsutil to download ndk. However, it requires extra
steps to install, and is not convenient to configure (several steps to
enable Google storage), especially for developers behind proxy (need to
set config of boto). Chromium provides some python scripts to help
download nacl toolchains that can meet this need well. So this patch
basically borrows two python scripts from there, and makes some
according changes to remove the usage of gsutil. With new script, we may
also implement some advanced features, such as hash check, so that the
download would be more intelligent.
BUG=
R=djsollen@google.com, borenet@google.com, reed@google.com
Author: yang.gu@intel.com
Review URL: https://chromiumcodereview.appspot.com/15951008
git-svn-id: http://skia.googlecode.com/svn/trunk@9311 2bbb7eff-a529-9590-31e7-b0007b416f81
The objective of this change is to remove all calls to
SkCanvas::setDevice. The factory API is hidden behind
a build flag in order to ease the roll into chromium.
A side-effect of the factory pattern is that it will
no longer be possible to allocate a SkDeferredCanvas on
the stack. This changes nothing for chrome, but it
impacts skia test programs.
Review URL: https://codereview.chromium.org/16040002
git-svn-id: http://skia.googlecode.com/svn/trunk@9298 2bbb7eff-a529-9590-31e7-b0007b416f81