Commit Graph

7503 Commits

Author SHA1 Message Date
djsollen@google.com
cf5348f5aa prepare skia for shared library build on android
R=borenet@google.com, djsollen@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9378 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-31 20:02:56 +00:00
reed@google.com
e2aad27c5f sort the glyphID arrays
add head/tail code

git-svn-id: http://skia.googlecode.com/svn/trunk@9376 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-31 19:46:02 +00:00
edisonn@google.com
a20e42c08b Remove SK_API, from SkTSet. the template is not public.
Review URL: https://codereview.chromium.org/15792016

git-svn-id: http://skia.googlecode.com/svn/trunk@9374 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-31 18:04:20 +00:00
senorblanco@chromium.org
86fc266eda Implement SkXfermode image filter. This required changing the signature of SkXfermode::asNewEffectOrCoeffs(), to add an optional background texture.
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
2013-05-31 17:49:12 +00:00
rmistry@google.com
70fdc12837 All SKP files in Google Storage have been updated. (AddDashboardAnnotation)
git-svn-id: http://skia.googlecode.com/svn/trunk@9371 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-31 17:41:03 +00:00
reed@google.com
277c3f8765 bump picture version since SkPath has changed (conics)
enable conics in SkPath

git-svn-id: http://skia.googlecode.com/svn/trunk@9370 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-31 15:17:50 +00:00
scroggo@google.com
2d76d933ff Read and write pixel offset when serializing bitmaps.
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=1301
R=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
2013-05-31 14:39:54 +00:00
scroggo@google.com
d5936923ad Fix iOS build.
Review URL: https://codereview.chromium.org/15647010

git-svn-id: http://skia.googlecode.com/svn/trunk@9367 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-31 14:27:55 +00:00
scroggo@google.com
85322368ce Fix build.
Remove CreateDefaultDecoder call, since the function was removed.

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9365 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-31 14:06:16 +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
f865be3786 Add atlasing option to GameBench bench
https://codereview.chromium.org/15660012/



git-svn-id: http://skia.googlecode.com/svn/trunk@9363 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-31 13:27:02 +00:00
humper@google.com
6dce11368a fix warnings on MacOS 10.6
git-svn-id: http://skia.googlecode.com/svn/trunk@9362 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-31 12:58:29 +00:00
humper@google.com
04db31641b More general GM for testing bitmap filtering, including checkerboards, images, and text.
Review URL: https://codereview.chromium.org/15755019

git-svn-id: http://skia.googlecode.com/svn/trunk@9361 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-31 12:50:39 +00:00
humper@google.com
1922c2e62e specialize bicubic filtering for scale-only
BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9360 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-31 12:49:18 +00:00
bsalomon@google.com
9e6793541f Mark picture record benches as non-rendering.
Review URL: https://codereview.chromium.org/16244004

git-svn-id: http://skia.googlecode.com/svn/trunk@9355 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-30 19:52:38 +00:00
reed@google.com
e3823fd901 add script to scrape glyph usage in drawText calls
git-svn-id: http://skia.googlecode.com/svn/trunk@9353 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-30 18:55:14 +00:00
epoger@google.com
9166bf57d8 rebaseline.py: use argparse command-line flags for more flexibility
--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
2013-05-30 15:46:19 +00:00
reed@google.com
fa2f2a48f6 Revert "add asserts to point<-->verb helpers"
This reverts commit b4775ac7b55802e87231768f002e4b42f233b0aa.

git-svn-id: http://skia.googlecode.com/svn/trunk@9347 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-30 15:29:48 +00:00
reed@google.com
7950a9eba7 add asserts to point<-->verb helpers
patch from issue 16153005

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9344 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-30 14:57:55 +00:00
skia.committer@gmail.com
a5d3e77420 Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@9343 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-30 07:01:29 +00:00
senorblanco@chromium.org
1afa3fff29 Speculative fix for Tegra-based Androids: don't try to unpremultiply dstColor in-place; put it in a temporary.
TBR=bsalomon

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9336 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-29 23:41:28 +00:00
bsalomon@google.com
137f1347ab Replace GrDrawState::AutoDeviceCoordDraw with GrDrawState::AutoViewMatrixRestore::setIdentity(). s
R=robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9331 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-29 21:27:53 +00:00
senorblanco@chromium.org
9a6eb0e1e8 Provide a GPU implementation of SkArithmeticMode, using a custom GrEffect exposed via asNewEffectOrCoeff().
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

Originally committed: https://code.google.com/p/skia/source/detail?r=9324
Reverted: https://code.google.com/p/skia/source/detail?r=9325

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9330 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-29 20:55:09 +00:00
scroggo@google.com
1198e740d5 Use macros for new and delete in SkTemplates.h
Remove use of new placement array.

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

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9329 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-29 20:10:25 +00:00
reed@google.com
84cfce14fe use SkStream factory for files, and check for null (file-not-found) speedup sampleapp's animation
BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9327 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-29 19:22:20 +00:00
junov@chromium.org
ed8d6bb2be Moving updateClipConservativelyUsingBounds into SkCanvas
This method is being moved from SkPictureRecord to become a protected member of SkCanvas so that other classes derived from SkCanvas can use it.
This Patch also applies the fix provided by updateClipConservativelyUsingBounds to SkPictureUtils::GatherPixelRefs

BUG=https://code.google.com/p/chromium/issues/detail?id=244893

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9326 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-29 19:09:48 +00:00
senorblanco@chromium.org
06e7424c70 Revert "Provide a GPU implementation of SkArithmeticMode, using a custom GrEffect exposed via asNewEffectOrCoeff()."
This reverts commit b8ffe17b5c684f9cfff02285f27e6aa1f75c9b53.

TBR=robertphillips

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9325 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-29 19:05:54 +00:00
senorblanco@chromium.org
6b6c1dc34c Provide a GPU implementation of SkArithmeticMode, using a custom GrEffect exposed via asNewEffectOrCoeff().
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
2013-05-29 18:50:46 +00:00
reed@google.com
3467ee06d3 add != operator for SkTDArray
BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9323 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-29 18:05:52 +00:00
scroggo@google.com
7ed0447762 Use updated signature for decode in empty decoder.
This allows chromium to build SkImageDecoder_empty.cpp
(https://codereview.chromium.org/15960015/) until Skia
has https://codereview.chromium.org/15806010/ (which
is a superset of this change).

R=robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9321 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-29 17:36:43 +00:00
epoger@google.com
ec3397bb6c Refactor rebaseline.py into functions ; no behavioral changes.
R=senorblanco@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9318 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-29 17:09:43 +00:00
reed@google.com
b74706f033 use integer math instead of float per-pixel. about a 2x speedup. not tested well, so this is just experimental.
BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9317 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-29 16:31:41 +00:00
reed@google.com
a2be2cc798 cast enum to float to fix (really bad) warning
git-svn-id: http://skia.googlecode.com/svn/trunk@9316 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-29 16:19:48 +00:00
reed@google.com
ef77ec2104 extend SkBenchmark to allow a bench to return a durationScale, which allows it to perform fewer actual interations, but report a scale factor to account for that. Thus a very slow bench can be compared head-to-head with a faster one, w/o actually forcing the tool to run for the full duration of the slower test.
Extend BitmapBench to time bicubic filtering, and use this durationScale for it.

Extend SkBenchmark to have setBitmapFlags(or, clear), allowing it to request a set of paint flags to be cleared, and set to be set.

BUG=
R=robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9315 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-29 15:39:54 +00:00
bungeman@google.com
dc8e6e8503 Fix cmykjpeg test to check if file was found.
git-svn-id: http://skia.googlecode.com/svn/trunk@9314 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-29 14:53:48 +00:00
bungeman@google.com
6cab1a4b6a Change SkStream.
https://codereview.chromium.org/15298009/


git-svn-id: http://skia.googlecode.com/svn/trunk@9312 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-29 13:43:31 +00:00
commit-bot@chromium.org
6320e8f393 Remove dependency of gsutil to download ndk
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
2013-05-29 13:26:32 +00:00
robertphillips@google.com
0a4805e33f First pass at Comment API
https://codereview.chromium.org/13957009/



git-svn-id: http://skia.googlecode.com/svn/trunk@9310 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-29 13:24:23 +00:00
bsalomon@google.com
960d114777 Get correct GLVersion for Mesa to avoid GrContext creation failure
Path originally written by yunchao.he@intel.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9309 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-29 13:11:54 +00:00
skia.committer@gmail.com
9e59a0e3bd Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@9307 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-29 07:01:12 +00:00
reed@google.com
2ece287073 use DEF_BENCH
BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9305 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-28 20:48:14 +00:00
senorblanco@chromium.org
35c733cc9c Fix alpha computation in SkArithmeticMode.
Note: this will require new baselines for the arithmode GM.

R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9302 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-28 19:43:05 +00:00
junov@chromium.org
435401d386 Build fix
TBR=reed

git-svn-id: http://skia.googlecode.com/svn/trunk@9299 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-28 18:17:23 +00:00
junov@chromium.org
66070a527c Changing SkDeferredCanvas to use factories for creation
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
2013-05-28 17:39:08 +00:00
commit-bot@chromium.org
bb6a3178c3 Make GrContext track the current matrix, render target, and clip directly rather than using GrDrawState.
R=robertphillips@google.com, jvanverth@google.com

Author: bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9297 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-28 17:25:49 +00:00
scroggo@google.com
ccd7afb6fb Reland 'Add path utils, plus a test for it.'
Build SkPathJoin and SkBasename on windows also.

Previous CL did not build on Windows because the two functions were
accidentally placed inside an ifdef that did not include windows.
Move the functions to the top of the file, and add a comment by the
endif for clarity.

Previously reviewed at https://codereview.chromium.org/15747004/

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9295 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-28 16:45:07 +00:00
reed@google.com
7b06ba45b3 don't unref() null (from typeface::create) you gunky
git-svn-id: http://skia.googlecode.com/svn/trunk@9294 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-28 16:39:52 +00:00
reed@google.com
98447b0c74 use inttoscalar to fix warning
BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9293 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-28 15:42:21 +00:00
reed@google.com
2f51ae0e6c use explicit conversion for int->scalar
BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9292 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-28 15:35:47 +00:00
reed@google.com
f2de1e286b add new gm for bicubic filtering
BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9291 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-28 15:29:25 +00:00