Commit Graph

1327 Commits

Author SHA1 Message Date
mtklein@google.com
069aea7f2c one more thing to try before rebaselining android
BUG=
R=djsollen@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10420 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-29 19:30:00 +00:00
reed@google.com
08df48d241 expose getFamilyName to public SkTypeface
git-svn-id: http://skia.googlecode.com/svn/trunk@10418 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-29 18:54:08 +00:00
skia.committer@gmail.com
956b310f13 Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@10385 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-26 07:00:58 +00:00
senorblanco@chromium.org
4e16bb2a32 Implement crop rect for lighting image filters. Changes for the CPU path were fairly straightforward: use the bounds rectangle when traversing the pixels, not the source rectangle.
For the GPU path, this required modifying the signature of SkImageFilter::asNewEffect() to receive the bounds offset, so that the lighting filters could offset the light position by the offset. It also required modifying the base-class implementation of SkImageFilter::filterImageGPU() (which implements single-pass filters) to intersect against the bounds rect, to pass its offset to asNewEffect(), and to modify the caller's offset (so it's drawn in the correct place).

Note: this will require rebaselining the lighting GM. Six new test cases were added, to accommodate a cropped version of each lighting filter.

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

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10379 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-26 00:10:07 +00:00
commit-bot@chromium.org
4d24b747e2 Make SkImage_Gpu share it's pixelref with the surface to prevent premature return to scratch pool.
BUG=crbug.com/263329
TEST=Surface unit test, function Test_crbug263329
R=bsalomon@google.com, reed@google.com

Author: junov@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10378 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-25 23:29:40 +00:00
bsalomon@google.com
68f2a0df14 This reverts commit 4052fd051db67bd1099fde2c4fe400cfbe1f2426.
git-svn-id: http://skia.googlecode.com/svn/trunk@10374 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-25 21:30:52 +00:00
commit-bot@chromium.org
47fad70da3 R=borenet@google.com, bungeman@google.com, robertphillips@google.com
Author: bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10372 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-25 20:01:20 +00:00
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
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
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
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
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
commit-bot@chromium.org
dfec28d4a9 Add SkImage->draw() call with src and dst rects.
Committed: http://code.google.com/p/skia/source/detail?r=10237

R=junov@chromium.org, senorblanco@chromium.org, reed@google.com

Author: arbesfeld@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10274 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-23 15:52:16 +00:00
senorblanco@chromium.org
ccf225cebb 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

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10251 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-22 20:03:22 +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
fmalita@google.com
1d241f13d5 Revert "Add SkImage->draw() call with src and dst rects."
This reverts commit 9c730e27e0bb550dc228ad496cadeed8787b2244.

git-svn-id: http://skia.googlecode.com/svn/trunk@10238 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-22 17:01:37 +00:00
commit-bot@chromium.org
1d91600a02 Add SkImage->draw() call with src and dst rects.
R=junov@chromium.org, senorblanco@chromium.org, reed@google.com

Author: arbesfeld@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10237 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-22 16:16:37 +00:00
skia.committer@gmail.com
1f3c73825b Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@10223 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-20 07:00:58 +00:00
bungeman@google.com
f64c6842c1 Add a 'unique' method to SkRefCnt, document the usage, and add support.
std::shared_ptr has a method called 'unique' which captures the concept that
a reference count of 1 is special, and can be used to optimize copy on write.
It also has some undocumented need for memory barriers in certain situations
and those needs are documented here.

The motivation for looking into this is crbug.com/258499 . The use of the
reference count in this manner is a benign race with both ref() and unref().
By introducing sk_atomic_unprotected_read, it is possible for Chromium to
annotate this read to tell ThreadSanitizer that this is known.

R=bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10221 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-19 23:18:52 +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
777ded06fd Fix some noisy warnings on Windows x64.
On Windows x64, sizeof(long) < sizeof(size_t).

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10216 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-19 22:30:11 +00:00
humper@google.com
138ebc3e40 The image resampling code has been transplanted from Chrome; it's incredibly fast.
We've tested this CL plumbed into Chrome and done benchmarking with excellent results.

This CL can land independent of any Chrome changes; it's completely internal to skia.

BUG=
R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10206 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-19 20:20:04 +00:00
commit-bot@chromium.org
9fdb70576b SkAlpha constant defs
R=edisonn@google.com, vandebo@chromium.org, reed@google.com

Author: richardlin@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10195 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-19 17:43:27 +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
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
djsollen@google.com
25a11e48e5 Add bench to test float to fixed conversion
R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10155 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-18 19:11:30 +00:00
reed@google.com
c968315136 add FilterLevel API to SkPaint, replacing various Flag bits
BUG=
R=bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10138 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-18 13:47:01 +00:00
commit-bot@chromium.org
5dd567c2a5 Add getRectCount to SkRegtion
It is useful to know how many rects comprise a region,
since in some situations we can optimize code based on
the complexity of the region. For instance, if we use
SkRegion for tracking invalidation we might opt to use
the region bounds as invalidation instead of iterating
over each rect.

R=reed@google.com, tomhudson@chromium.org, caryclark@google.com, robertphillips@google.com

Author: vmpstr@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10129 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-17 21:39:28 +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
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
egdaniel@google.com
5383a75253 Add implicit hairline conic rendering to GPU
R=bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10055 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-12 20:15:34 +00:00
robertphillips@google.com
4d37673739 Fix leak in SkAutoSTArray
https://codereview.chromium.org/18915010/



git-svn-id: http://skia.googlecode.com/svn/trunk@10053 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-12 18:44:23 +00:00
bungeman@google.com
f5cc5b140c R=mtklein@google.com
Review URL: https://codereview.chromium.org/18503009

git-svn-id: http://skia.googlecode.com/svn/trunk@10050 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-12 18:22:49 +00:00
commit-bot@chromium.org
ef284a84f5 The two leaks are:
missing unrefs in megalooper GM
  missing reset capability in oval renderer

This CL also expands the instance counting system to some recently adding classes (e.g., SkFontStyleSet)

R=bsalomon@google.com, jvanverth@google.com

Author: robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10030 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-11 22:29:29 +00:00
skia.committer@gmail.com
de2e4e8a64 Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@9992 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-11 07:01:01 +00:00
commit-bot@chromium.org
7b320703d4 Implement offset for GPU filter path. Although we can't yet use this in Blink for FEOffset, due to SVG semantics, we can use it to support crop rect (upcoming patch).
This patch adds the parameter to the filterImageGPU() signature, plumbs through the code on the GPU side, and implements support for it in SkXfermodeImageFilter for both raster and GPU.

Of the remaining filters with GPU implementations, Blur, Morphology, Bicubic and Displacement work fine; they're commutative wrt offset and can simply pass it up the chain. Blend is not, but will be removed shortly anyway (has been replaced with SkXfermodeImageFilter in Blink).

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

Author: senorblanco@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9977 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-10 21:22:18 +00:00
reed@google.com
84e22d847f allow createScalerContext to return null, and then have the GDI backend trigger that if we fail to create the necessary GDI resources
BUG=
R=bungeman@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9957 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-10 15:38:20 +00:00
skia.committer@gmail.com
9e1ec1a529 Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@9948 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-10 07:00:58 +00:00
humper@google.com
b088947f27 New bitmap filter checkin; this time with less build breakage
BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9944 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-09 21:37:14 +00:00
humper@google.com
1a8940e558 Revert "More general image filter interface; tested implementation of standalone"
This reverts commit 4df3e8b079e019af5f60c13e7e6ec6589663962a.

git-svn-id: http://skia.googlecode.com/svn/trunk@9937 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-09 18:02:06 +00:00
humper@google.com
25fc6b9bfb More general image filter interface; tested implementation of standalone
image scaler (not yet plumbed).  High quality downsampler.  Fast SSE
resampler.

BUG=
R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9936 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-09 17:48:15 +00:00
scroggo@google.com
468142b2f5 Allow ico decoder to decode PNG sub-images.
Since Windows Vista, PNG can be embedded in an ICO file. Update
our decoder to support this.

BUG=https://code.google.com/p/skia/issues/detail?id=1398
R=djsollen@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9932 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-09 15:48:24 +00:00
scroggo@google.com
bc69ce982f Remove bitmap reuse from SkImageDecoder.
Now that Android is using an SkBitmap::Allocator to reuse bitmap
memory, remove the unnecessary code to handle bitmap reuse inside
the decoders themselves.

Leaves in the code for bitmap reuse in decodeSubset, which still
may reuse bitmaps, and cropBitmap, which is called by decodeSubset.

R=djsollen@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9931 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-09 15:45:14 +00:00