Commit Graph

970 Commits

Author SHA1 Message Date
robertphillips@google.com
9bf380ce7f drawBitmap* cleanup
https://codereview.chromium.org/19977003/



git-svn-id: http://skia.googlecode.com/svn/trunk@10342 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-25 12:10:42 +00:00
skia.committer@gmail.com
5c561cb8d8 Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@10340 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-25 07:01:00 +00:00
senorblanco@chromium.org
194d775edc This patch implements a crop rect for SkImageFilter. It has been implemented for SkColorFilterImageFilter and SkBlurImageFilter as examples.
In order to preserve the immutability of SkImageFilters, the crop rect is passed as a constructor parameter. If NULL (the default), the bounds of the input image are used, as before.

This also tightens up the boundary handling for SkImageBlurFilter on the GPU backend. Where we were previously using clamping semantics, we now respect decal semantics (so we don't oversaturate the edges). This brings the GPU and raster backends into closer alignment, but will require some new baselines for the GPU tests.

At a minimum, the following tests will need new baselines: imageblur, imagefiltersbase, imagefilterscropped, spritebitmap.

R=reed@google.com

Committed: https://code.google.com/p/skia/source/detail?r=10251

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10338 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-24 22:19:24 +00:00
commit-bot@chromium.org
ff36a1d07f Start from scratch on a faster SkFlatDictionary.
This is like codereview.chromium.org/19276003, except it fits in better with the existing code, doesn't leak memory, and because it's back using SkChunkFlatController it's a little faster too, now a win across the board:

Slowdown	bench
-1.59%	desk_youtubetvbrowse.skp
-2.56%	desk_googlehome.skp
-6.40%	tabl_androidpolice.skp
-6.45%	desk_youtubetvvideo.skp
-6.91%	tabl_googlecalendar.skp
...
-29.70%	desk_yahoogames.skp
-32.17%	desk_googlespreadsheet.skp
-32.23%	mobi_wikipedia.skp
-37.16%	desk_chalkboard.skp
-41.57%	desk_pokemonwiki.skp
Overall slowdown: -22.74%

running bench [640 480] picture_record_recurring_paint_dictionary  NONRENDERING: cmsecs =   9.92
running bench [640 480] picture_record_unique_paint_dictionary  NONRENDERING: cmsecs =  22.16
running bench [640 480]  picture_record_dictionaries  NONRENDERING: cmsecs =   9.18

BUG=

Committed: http://code.google.com/p/skia/source/detail?r=10328

R=tomhudson@google.com, reed@google.com, scroggo@google.com

Author: mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10336 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-24 20:37:30 +00:00
mtklein@google.com
5174286bc5 Revert "Start from scratch on a faster SkFlatDictionary."
This reverts commit fec9bfa02d5d2b27bfa2dad3e37e5825a720784d.

git-svn-id: http://skia.googlecode.com/svn/trunk@10331 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-24 19:11:15 +00:00
commit-bot@chromium.org
cae5d8d570 Start from scratch on a faster SkFlatDictionary.
This is like codereview.chromium.org/19276003, except it fits in better with the existing code, doesn't leak memory, and because it's back using SkChunkFlatController it's a little faster too, now a win across the board:

Slowdown	bench
-1.59%	desk_youtubetvbrowse.skp
-2.56%	desk_googlehome.skp
-6.40%	tabl_androidpolice.skp
-6.45%	desk_youtubetvvideo.skp
-6.91%	tabl_googlecalendar.skp
...
-29.70%	desk_yahoogames.skp
-32.17%	desk_googlespreadsheet.skp
-32.23%	mobi_wikipedia.skp
-37.16%	desk_chalkboard.skp
-41.57%	desk_pokemonwiki.skp
Overall slowdown: -22.74%

running bench [640 480] picture_record_recurring_paint_dictionary  NONRENDERING: cmsecs =   9.92
running bench [640 480] picture_record_unique_paint_dictionary  NONRENDERING: cmsecs =  22.16
running bench [640 480]  picture_record_dictionaries  NONRENDERING: cmsecs =   9.18

BUG=
R=tomhudson@google.com, reed@google.com, scroggo@google.com

Author: mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10328 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-24 18:45:27 +00:00
jvanverth@google.com
588f3d3896 Change double constants to floats.
git-svn-id: http://skia.googlecode.com/svn/trunk@10327 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-24 18:44:10 +00:00
commit-bot@chromium.org
08284e4d24 Add basic SVD support to SkMatrix. Allows you to pull out the x- and y-scale factors, sandwiched by two rotations.
R=reed@google.com

Author: jvanverth@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10322 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-24 18:08:08 +00:00
sglez@google.com
586db93c44 refactor duplication (shouldSkip and skip_name) into a utility function
R=caryclark@google.com, reed@google.com

Committed: https://code.google.com/p/skia/source/detail?r=10280

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10317 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-24 17:24:23 +00:00
reed@google.com
2c38fed29d use sk_bzero to init level, since I got the number of 0s wrong using { }
git-svn-id: http://skia.googlecode.com/svn/trunk@10308 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-24 14:55:00 +00:00
robertphillips@google.com
58c856a54a Reverting r10251 (Implement crop rect for SkImageFilter) due to Chromium-side unit test failures
git-svn-id: http://skia.googlecode.com/svn/trunk@10304 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-24 13:18:06 +00:00
skia.committer@gmail.com
7f1af501f2 Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@10299 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-24 07:01:12 +00:00
commit-bot@chromium.org
a7aa810894 Deterministic SkTSet and PDF Output
Addresses this issue: https://code.google.com/p/skia/issues/detail?id=1277

R=edisonn@google.com, vandebo@chromium.org

Author: richardlin@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10298 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-24 01:51:08 +00:00
commit-bot@chromium.org
70d75ca764 Add SkChecksum::Murmur3.
BUG=
R=reed@google.com

Author: mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10292 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-23 20:25:34 +00:00
reed@google.com
0e66162161 fix signed/unsigned warning
git-svn-id: http://skia.googlecode.com/svn/trunk@10287 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-23 19:27:48 +00:00
reed@google.com
602a1d7025 add scaledimagecache
BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10286 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-23 19:13:54 +00:00
epoger@google.com
ed5eb4ef2a Revert r10280, which caused https://code.google.com/p/skia/issues/detail?id=1441
Review URL: https://codereview.chromium.org/19537005

git-svn-id: http://skia.googlecode.com/svn/trunk@10284 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-23 17:56:20 +00:00
sglez@google.com
434251f872 refactor duplication (shouldSkip and skip_name) into a utility function
R=caryclark@google.com, reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10280 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-23 17:26:34 +00:00
caryclark@google.com
4fdbb22964 turn off debugging printfs
fix pathops issues 1417, 1418

be more rigorous about pulling intersections of lines to end points
rewrite cubic/line and quad/line intersections to share style

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10270 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-23 15:27:41 +00:00
commit-bot@chromium.org
3e2ea2565d I don't want these changes as part of the "allow bleeding" CL.
R=bsalomon@google.com

Author: robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10256 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-23 11:28:45 +00:00
skia.committer@gmail.com
6ae6383f56 Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@10254 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-23 07:01:05 +00:00
reed@google.com
9cfc83cc8a stop using bitmap-filter flags outside of paint itself, as a step towards really changing them into an enum
BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10240 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-22 17:18:18 +00:00
bungeman@google.com
c29f3d8c6d Add a detachAsStream to SkDynamicMemoryWStream.
R=reed@google.com

Committed: https://code.google.com/p/skia/source/detail?r=10171

Committed: https://code.google.com/p/skia/source/detail?r=10178

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10218 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-19 22:32:11 +00:00
bungeman@google.com
88682b77d1 Add a detachAsStream to SkDynamicMemoryWStream.
R=reed@google.com

Committed: https://code.google.com/p/skia/source/detail?r=10171

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10178 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-19 13:55:41 +00:00
skia.committer@gmail.com
a79919883e Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@10175 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-19 07:00:57 +00:00
robertphillips@google.com
6eee5c3ec4 Revert r10171 due to test failure in StreamTest
git-svn-id: http://skia.googlecode.com/svn/trunk@10172 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-18 23:59:16 +00:00
bungeman@google.com
eacb54e174 Add a detachAsStream to SkDynamicMemoryWStream.
R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10171 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-18 22:27:21 +00:00
reed@google.com
9a47ed785f use { 0, 0, 0, 0 } to fix warning
git-svn-id: http://skia.googlecode.com/svn/trunk@10167 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-18 20:48:06 +00:00
reed@google.com
7437bfb9fa init prevLevel to avoid warning
git-svn-id: http://skia.googlecode.com/svn/trunk@10166 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-18 20:20:10 +00:00
scroggo@google.com
826d63af97 Add test to ensure buildTileIndex stores SkStream.
PNG fails this test without https://codereview.chromium.org/19185006/

R=djsollen@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10163 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-18 20:06:28 +00:00
reed@google.com
eed6f1b76b pull mipmap class into its own (private) header
BUG=
R=scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10161 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-18 19:53:31 +00:00
scroggo@google.com
f698c8262d Allow decoding JPEG into A8.
If the original image is grayscale, allow decoding into A8.

Change the size of PrefConfigTable to allow for 8bit gray, a new source config.

Add a new sampler to SkScaledBitmapSampler to 'convert' to A8.

FIXME: Should there be a dithered option for gray scale?

R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10157 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-18 19:34:49 +00:00
commit-bot@chromium.org
fd03d4a829 Replace all instances of GrRect with SkRect.
And remove the typedef in GrRect.h. The same with GrIRect.

R=robertphillips@google.com

Author: tfarina@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10130 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-17 21:39:42 +00:00
skia.committer@gmail.com
eebe6f4a59 Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@10122 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-17 07:01:13 +00:00
commit-bot@chromium.org
50df631486 NIT MASTER 9000
fixed nits

BUG=
R=robertphillips@google.com

Author: dierk@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10112 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-16 18:34:14 +00:00
commit-bot@chromium.org
b92f9fb0f5 More PathUtilsTest.cpp nits
Reordered the includes, changed define to a constant global var.





more PathUtils Nits

BUG=
R=robertphillips@google.com, tfarina@chromium.org

Author: dierk@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10110 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-16 17:39:08 +00:00
commit-bot@chromium.org
40f960edc0 Fixed PathUtils nits.
Fixed PathUtils nits

BUG=
R=robertphillips@google.com

Author: dierk@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10108 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-16 16:36:47 +00:00
caryclark@google.com
8d0a524a48 harden and speed up path op unit tests
PathOps tests internal routines direcctly. Check to make sure that
test points, lines, quads, curves, triangles, and bounds read from
arrays are valid (i.e., don't contain NaN) before calling the
test function.

Repurpose the test flags.
- make 'v' verbose test region output against path output
- make 'z' single threaded (before it made it multithreaded)

The latter change speeds up tests run by the buildbot by 2x to 3x.

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10107 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-16 16:11:16 +00:00
skia.committer@gmail.com
977409aceb Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@10096 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-16 07:00:56 +00:00
caryclark@google.com
5ec2b1ee8a call newOneOff instead of oneOff
calling the latter instead of the former walked off the end of the
array causing mysterious bugs

TODO: safeguard against NaNs in the input

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10093 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-15 20:50:24 +00:00
bungeman@google.com
7bdd614a19 Implement onCountGlyphs and onGetUPEM on Windows.
R=vandebo@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10089 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-15 19:42:57 +00:00
robertphillips@google.com
b4a2855b66 Fix build error
git-svn-id: http://skia.googlecode.com/svn/trunk@10086 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-15 17:33:57 +00:00
robertphillips@google.com
226d508539 PathUtilsTest valgrind patch
https://codereview.chromium.org/18401005/



git-svn-id: http://skia.googlecode.com/svn/trunk@10085 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-15 17:16:48 +00:00
robertphillips@google.com
8dcea7dcf9 Fix compiler warning/error in r10079
git-svn-id: http://skia.googlecode.com/svn/trunk@10081 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-15 15:38:55 +00:00
caryclark@google.com
3dd2784cb7 add florin tests
hopefully fix build

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10079 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-15 15:00:58 +00:00
caryclark@google.com
791d0de747 fix linux point compare
fix linux pt compare

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10076 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-15 14:21:17 +00:00
commit-bot@chromium.org
2d3b492013 Remove possiblity of NULL effect in GrEffectStage
R=jvanverth@google.com

Author: bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10075 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-15 13:54:06 +00:00
caryclark@google.com
fa2aeee27a path ops near exact
Modify line intersections to first
- match exact ends
- compute intersections
- match near ends
where the exact ends are preferred, then near matches, then
computed matches. This pulls matches towards existing end points
when possible, and keeps intersection distances consistent with
different line/line line/quad and line/cubic computations.

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10073 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-15 13:29:13 +00:00
commit-bot@chromium.org
c2050e3a3e ARM Skia NEON patches - 01 - Simple fixes
This series contains a few fairly non-controversial fixes.





Misc: remove dead references to neon 4444 functions

Misc: avoid the double _neon_neon suffix in the clamp matrix functions.
MAKENAME already adds the _neon suffix

Misc: a few stupid / obvious fixes

BUG=
R=djsollen@google.com

Author: kevin.petit.arm@gmail.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10072 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-15 13:10:31 +00:00
humper@google.com
9c96d4b5ff fix trivial matrix computation
Revert "Reverted 10056-10059"

This reverts commit bab4ebcaa7270c3b866a8e10917c39b055ebd51a.

Fix broken GM test, reintroduce image scaling.

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10066 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-14 01:44:59 +00:00