platform/upstream/libSkiaSharp.git
10 years agoNew GPU baselines for colormatrix GM.
senorblanco@chromium.org [Thu, 13 Mar 2014 15:33:02 +0000 (15:33 +0000)]
New GPU baselines for colormatrix GM.

TBR=halcanary@google.com
BUG=skia:

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13784 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agorebaseline_server: generate JSON that can be viewed without a live server
commit-bot@chromium.org [Thu, 13 Mar 2014 14:56:29 +0000 (14:56 +0000)]
rebaseline_server: generate JSON that can be viewed without a live server

BUG=skia:1919
NOTREECHECKS=True
NOTRY=True
R=rmistry@google.com

Author: epoger@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13783 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoSanitizing source files in Housekeeper-Nightly
skia.committer@gmail.com [Thu, 13 Mar 2014 03:02:23 +0000 (03:02 +0000)]
Sanitizing source files in Housekeeper-Nightly

git-svn-id: http://skia.googlecode.com/svn/trunk@13782 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoAdd required parens for r13779.
bungeman@google.com [Wed, 12 Mar 2014 21:56:23 +0000 (21:56 +0000)]
Add required parens for r13779.

git-svn-id: http://skia.googlecode.com/svn/trunk@13781 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoremove SK_SUPPORT_LEGACY_COPYTO_CONFIG
commit-bot@chromium.org [Wed, 12 Mar 2014 21:47:51 +0000 (21:47 +0000)]
remove SK_SUPPORT_LEGACY_COPYTO_CONFIG

TBR=robertphillips@google.com

Author: reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13780 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoFix (1 << 31) to (1u << 31) in SkOTTable_OS_2.
bungeman@google.com [Wed, 12 Mar 2014 21:41:06 +0000 (21:41 +0000)]
Fix (1 << 31) to (1u << 31) in SkOTTable_OS_2.

When ints are 32 bits, (1 << 31) is undefined.

R=reed@google.com

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

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13779 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoFix GPU colormatrix color filter with saturated alpha.
senorblanco@chromium.org [Wed, 12 Mar 2014 21:37:42 +0000 (21:37 +0000)]
Fix GPU colormatrix color filter with saturated alpha.

Clamp RGBA values before unpremultiplying, to match the raster path. This causes a problem when the resulting
alpha is >1.0, resulting in overly saturated RGB.

Covered by the setYUV2RGB() test case in the colormatrix GM.

R=bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13778 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoadd gm to show bug in stroked-text in drawPosText
commit-bot@chromium.org [Wed, 12 Mar 2014 20:31:24 +0000 (20:31 +0000)]
add gm to show bug in stroked-text in drawPosText

BUG=skia:
R=fmalita@google.com, bungeman@google.com, fmalita@chromium.org

Author: reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13777 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoDe-virtualize SkCanvas save/restore.
commit-bot@chromium.org [Wed, 12 Mar 2014 20:21:48 +0000 (20:21 +0000)]
De-virtualize SkCanvas save/restore.

This moves the state management logic into non-virtual SkCanvas methods,
and turns the virtuals into protected notifiers.

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

Author: fmalita@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13776 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agorender_pictures unittests: run over a dir with multiple SKPs, like production
commit-bot@chromium.org [Wed, 12 Mar 2014 20:09:46 +0000 (20:09 +0000)]
render_pictures unittests: run over a dir with multiple SKPs, like production

BUG=skia:1942
R=borenet@google.com

Author: epoger@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13775 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agosupport direct writing to top layer, and hide getTopLayer()
reed@google.com [Wed, 12 Mar 2014 18:28:35 +0000 (18:28 +0000)]
support direct writing to top layer, and hide getTopLayer()

this should remove many of the chrome callers that today call
accessBitmap on the toplayer, so they can read/write those pixels.

The ultimate fix will be to support custom allocation of raster layers
(via GDI/cairo/mac) so we can remove PlatformDevice subclassing in
skia/ext

BUG=skia:
R=bsalomon@google.com, scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13774 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoRemove unused zero_fill() in GrAtlas.cpp
fmalita@google.com [Wed, 12 Mar 2014 17:31:20 +0000 (17:31 +0000)]
Remove unused zero_fill() in GrAtlas.cpp

Triggers warnings with some local clang builds.

R=jvanverth@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13773 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoFix unit tests
bsalomon@google.com [Wed, 12 Mar 2014 17:29:46 +0000 (17:29 +0000)]
Fix unit tests

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13772 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoFix for test failure
robertphillips@google.com [Wed, 12 Mar 2014 17:16:59 +0000 (17:16 +0000)]
Fix for test failure

git-svn-id: http://skia.googlecode.com/svn/trunk@13771 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoAdd compile flag to force usage of distance fields for all SkPaints.
commit-bot@chromium.org [Wed, 12 Mar 2014 17:05:46 +0000 (17:05 +0000)]
Add compile flag to force usage of distance fields for all SkPaints.

BUG=skia:2173
R=reed@google.com, robertphillips@google.com

Author: jvanverth@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13770 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoAdd capture snapshot as data to SkWriter32, use it to optimise record->playback.
commit-bot@chromium.org [Wed, 12 Mar 2014 17:04:28 +0000 (17:04 +0000)]
Add capture snapshot as data to SkWriter32, use it to optimise record->playback.
This is a new way of implementing https://codereview.chromium.org/155863005/
It uses copy on write semantics to return a buffer without copying it, so that record -> playback does not need to copy the buffer.

BUG=skia:2125
R=tomhudson@google.com, mtklein@google.com, reed@google.com, iancottrell@chromium.org

Author: iancottrell@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13769 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoClean up SkImageFilter.
commit-bot@chromium.org [Wed, 12 Mar 2014 16:36:08 +0000 (16:36 +0000)]
Clean up SkImageFilter.

Rename more occurences of 'target' to 'kernelOffset'.
This is a follow-up patch to
https://codereview.chromium.org/182983003/

BUG=skia:2187
R=senorblanco@chromium.org

Author: dominikg@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13768 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoStores per-iteration bench values in BenchDataPoint.
commit-bot@chromium.org [Wed, 12 Mar 2014 16:23:33 +0000 (16:23 +0000)]
Stores per-iteration bench values in BenchDataPoint.

BUG=skia:2225
NOTRY=true
R=borenet@google.com

Author: bensong@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13767 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoAdd elliptical-corner rrect clip effect. Currently only handles the case where all...
commit-bot@chromium.org [Wed, 12 Mar 2014 15:32:50 +0000 (15:32 +0000)]
Add elliptical-corner rrect clip effect. Currently only handles the case where all corners have the same pair of radii.

BUG=skia:2181
R=jvanverth@google.com

Author: bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13766 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoRevert of Revert of Revert "De-virtualize SkCanvas save/restore." (https://codereview...
commit-bot@chromium.org [Wed, 12 Mar 2014 15:08:22 +0000 (15:08 +0000)]
Revert of Revert of Revert "De-virtualize SkCanvas save/restore." (https://codereview.chromium.org/196323003/)

Reason for revert:
Pulling out to rename the virtuals.

Original issue's description:
> Revert of Revert "De-virtualize SkCanvas save/restore." (https://codereview.chromium.org/194923008/)
>
> Reason for revert:
> Re-landing after roll fix.
>
> Original issue's description:
> > Revert "De-virtualize SkCanvas save/restore."
> >
> > (To allow a roll fix into the tree).
> >
> > This reverts commit edf702204be42c945254191f9f9cd6585b3d189b.
> >
> > R=halcanary@google.com
> >
> > Committed: https://code.google.com/p/skia/source/detail?r=13748
>
> TBR=halcanary@google.com,fmalita@chromium.org
> NOTREECHECKS=true
> NOTRY=true
>
> Committed: http://code.google.com/p/skia/source/detail?r=13754

R=halcanary@google.com, fmalita@chromium.org
TBR=fmalita@chromium.org, halcanary@google.com
NOTREECHECKS=true
NOTRY=true

Author: fmalita@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13765 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoFixing SkPicture serialization
commit-bot@chromium.org [Wed, 12 Mar 2014 14:46:41 +0000 (14:46 +0000)]
Fixing SkPicture serialization

Fixed a few issues while attempting to use the new
serialization path for SkPicture inside a fuzzer:
- SkReadBuffer and SkValidatingReadBuffer both had a fReader
member instead of sharing the same member, which leads to
problems if a base class function is used
- In SkPicture, a header is now written as a single chunk of
data, so it also has to be read as a single chunk of data
- In the SkPicturePlayback destructor, a bad deserialization
would lead to a crash if we don't safely unref fOpData
- Also in SkPicturePlayback, if we only use a ReadBuffer for
the whole deserialization, additional tags must be added to
parseBufferTag()
- SkValidatingReadBuffer::readBitmap() was broken, but this
path wasn't usen't since the only use case for
SkValidatingReadBuffer is currently image filters and
bitmaps are unflattened as part of the deserialization of
SkBitmapSource
- SkPictureImageFilter was not deserializable. Added it to
SkGlobalInitialization*
- Added a test that exercises the SkPicture serialization /
deserialization code

BUG=skia:
R=senorblanco@google.com, senorblanco@chromium.org, reed@google.com, robertphillips@google.com

Author: sugoi@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13764 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoAdd NVPR configs to DM
commit-bot@chromium.org [Wed, 12 Mar 2014 14:46:31 +0000 (14:46 +0000)]
Add NVPR configs to DM

Add NVPR configs to DM. The bench and gm parts support NVPR already.

R=bsalomon@google.com

Author: kkinnunen@nvidia.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13763 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoNew baselines for imagefiltersclipped, offsetimagefilter GMs.
senorblanco@chromium.org [Wed, 12 Mar 2014 14:01:48 +0000 (14:01 +0000)]
New baselines for imagefiltersclipped, offsetimagefilter GMs.

These were modified by
https://code.google.com/p/skia/source/detail?r=13744

TBR=halcanary@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13762 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoRebaseline performance triggers for Mac10.6 & N7
robertphillips@google.com [Wed, 12 Mar 2014 13:35:23 +0000 (13:35 +0000)]
Rebaseline performance triggers for Mac10.6 & N7

https://codereview.chromium.org/196573006/

git-svn-id: http://skia.googlecode.com/svn/trunk@13761 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years ago[WIP] Add Context to SkDrawLooper.
commit-bot@chromium.org [Wed, 12 Mar 2014 09:42:01 +0000 (09:42 +0000)]
[WIP] Add Context to SkDrawLooper.

SkDrawLooper carries some state during draws. This CL extracts this state into
a separate class Context, which is then passed by the users of SkDrawLooper
into the appropriate methods.
This is a step towards making SkDrawLooper immutable.

BUG=skia:2141
R=scroggo@google.com, reed@google.com, sugoi@google.com

Author: dominikg@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13760 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoRevert the rest of r13757.
bungeman@google.com [Wed, 12 Mar 2014 04:00:25 +0000 (04:00 +0000)]
Revert the rest of r13757.

git-svn-id: http://skia.googlecode.com/svn/trunk@13759 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoRevert 13757.
bungeman@google.com [Wed, 12 Mar 2014 03:46:48 +0000 (03:46 +0000)]
Revert 13757.

git-svn-id: http://skia.googlecode.com/svn/trunk@13758 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoFix (1 << 31) to (1u << 31) in SkOTTable_OS_2.
bungeman@google.com [Wed, 12 Mar 2014 03:13:48 +0000 (03:13 +0000)]
Fix (1 << 31) to (1u << 31) in SkOTTable_OS_2.

When ints are 32 bits, (1 << 31) is undefined.

R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13757 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agomake onReadPixels protected and have default impl (so we can remove chrome override)
commit-bot@chromium.org [Wed, 12 Mar 2014 03:04:08 +0000 (03:04 +0000)]
make onReadPixels protected and have default impl (so we can remove chrome override)

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

Author: reed@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13756 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoSanitizing source files in Housekeeper-Nightly
skia.committer@gmail.com [Wed, 12 Mar 2014 03:02:18 +0000 (03:02 +0000)]
Sanitizing source files in Housekeeper-Nightly

git-svn-id: http://skia.googlecode.com/svn/trunk@13755 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoRevert of Revert "De-virtualize SkCanvas save/restore." (https://codereview.chromium...
commit-bot@chromium.org [Tue, 11 Mar 2014 23:47:35 +0000 (23:47 +0000)]
Revert of Revert "De-virtualize SkCanvas save/restore." (https://codereview.chromium.org/194923008/)

Reason for revert:
Re-landing after roll fix.

Original issue's description:
> Revert "De-virtualize SkCanvas save/restore."
>
> (To allow a roll fix into the tree).
>
> This reverts commit edf702204be42c945254191f9f9cd6585b3d189b.
>
> R=halcanary@google.com
>
> Committed: https://code.google.com/p/skia/source/detail?r=13748

R=halcanary@google.com, fmalita@chromium.org
TBR=fmalita@chromium.org, halcanary@google.com
NOTREECHECKS=true
NOTRY=true

Author: fmalita@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13754 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoremove SK_SUPPORT_LEGACY_COPYTO_CONFIG
commit-bot@chromium.org [Tue, 11 Mar 2014 22:58:24 +0000 (22:58 +0000)]
remove SK_SUPPORT_LEGACY_COPYTO_CONFIG

R=halcanary@google.com
TBR=halcanary@google.com
NOTRY=True
NOTREECHECK=True

Author: reed@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13753 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoAlter bench_pictures to "respect" the logPerIter flag.
commit-bot@chromium.org [Tue, 11 Mar 2014 22:58:00 +0000 (22:58 +0000)]
Alter bench_pictures to "respect" the logPerIter flag.

When --logPerIters is set and --repeat is great then 2 then bench_pictures will run each test "repeat" times (to generate the correct number of timings) by rendering 5 times.

This CL also adds a swapBuffers in addition to the pre-existing flush calls.

R=bsalomon@google.com

Author: robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13752 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoFirst pass at a web app that lets you run Skia code and see the results.
commit-bot@chromium.org [Tue, 11 Mar 2014 22:57:50 +0000 (22:57 +0000)]
First pass at a web app that lets you run Skia code and see the results.

BUG=skia:
R=reed@google.com

Author: jcgregorio@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13751 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoOnly set USE_ANDROID_NDK_CPU_FEATURES if it's not already been explicitly set
commit-bot@chromium.org [Tue, 11 Mar 2014 22:57:21 +0000 (22:57 +0000)]
Only set USE_ANDROID_NDK_CPU_FEATURES if it's not already been explicitly set

R=djsollen@google.com, reed@google.com
BUG=skia:

Author: george@mozilla.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13750 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agofix build error in chromium
commit-bot@chromium.org [Tue, 11 Mar 2014 21:50:00 +0000 (21:50 +0000)]
fix build error in chromium

NOTREECHECKS=true
NOTRY=true
R=fmalita@google.com, jvanverth@google.com, fmalita@chromium.org
TBR=fmalita@google.com

Author: halcanary@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13749 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoRevert "De-virtualize SkCanvas save/restore."
fmalita@google.com [Tue, 11 Mar 2014 21:46:56 +0000 (21:46 +0000)]
Revert "De-virtualize SkCanvas save/restore."

(To allow a roll fix into the tree).

This reverts commit edf702204be42c945254191f9f9cd6585b3d189b.

R=halcanary@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13748 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoDe-virtualize SkCanvas save/restore.
fmalita@google.com [Tue, 11 Mar 2014 21:04:41 +0000 (21:04 +0000)]
De-virtualize SkCanvas save/restore.

This moves the state management logic into non-virtual SkCanvas methods,
and turns the virtuals into protected notifiers.

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

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13747 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoDrop executable flag from headers so that they can be packaged
robertphillips@google.com [Tue, 11 Mar 2014 19:55:51 +0000 (19:55 +0000)]
Drop executable flag from headers so that they can be packaged

https://codereview.chromium.org/194883004/

git-svn-id: http://skia.googlecode.com/svn/trunk@13746 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoFix linking errors on android builds due to cdd0f92b1ac
commit-bot@chromium.org [Tue, 11 Mar 2014 19:12:44 +0000 (19:12 +0000)]
Fix linking errors on android builds due to cdd0f92b1ac

NOTREECHECKS=true
NOTRY=true
R=iancottrell@google.com, tomhudson@google.com
TBR=tomhudson@google.com

Author: halcanary@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13745 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoFix SkOffsetImageFilter to use a temporary for bounds computations.
senorblanco@chromium.org [Tue, 11 Mar 2014 18:29:42 +0000 (18:29 +0000)]
Fix SkOffsetImageFilter to use a temporary for bounds computations.

SkOffsetImageFilter::onFilterBounds() was writing to *dst, and later
referring to src. These may be the same memory location, so the results
were incorrect.

Covered by the 5th test case in offsetimagefilter.

BUG=skia:

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13744 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoNew version of the bbh shootout.
commit-bot@chromium.org [Tue, 11 Mar 2014 17:27:07 +0000 (17:27 +0000)]
New version of the bbh shootout.
There were a bunch of problems with the existing code, all of which I would of ignored, except it could only benchmark none and rtree.
The new version measures the same numbers, in almost exactly the same way, it's the structure over the top of the actual test runner that I changed.
Now it only loads the pictures once, it is configurable in which bbh's it runs and how may loops on them it does, it uses standard command line processing, and it does not do so much redundant work so it runs quicker. It is also much easier to understand and change IMHO.

Doing this so I can reasonably compare the new QuadTree implementation.
BUG=skia:2242

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

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

Author: iancottrell@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13743 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoFix radical assumption that 0.5 in double is exactly convertible to float.
bsalomon@google.com [Tue, 11 Mar 2014 17:09:17 +0000 (17:09 +0000)]
Fix radical assumption that 0.5 in double is exactly convertible to float.

BUG=skia:2181

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13742 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoEnable use of distance fields via SkPaint flag.
commit-bot@chromium.org [Tue, 11 Mar 2014 17:07:15 +0000 (17:07 +0000)]
Enable use of distance fields via SkPaint flag.

Now that distance field generation is fast enough to make it practical, this makes distances field fonts easily available to anyone who wants to try them out (i.e Chromium).

BUG=skia:2173
R=reed@google.com, bsalomon@google.com

Author: jvanverth@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13741 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoAdd new module for distance field generation.
commit-bot@chromium.org [Tue, 11 Mar 2014 15:57:40 +0000 (15:57 +0000)]
Add new module for distance field generation.

This improves the speed over the previous method by 10x+, and makes using distance fields practical.

BUG=skia:2173

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

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

Author: jvanverth@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13740 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoHandle rrects with one circular corner and three square corners in GrRRectEffect.
commit-bot@chromium.org [Tue, 11 Mar 2014 15:54:51 +0000 (15:54 +0000)]
Handle rrects with one circular corner and three square corners in GrRRectEffect.

BUG=skia:2181
R=jvanverth@google.com

Author: bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13739 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agobench rebaseline after Brian's improvement e5a041c
commit-bot@chromium.org [Tue, 11 Mar 2014 14:28:10 +0000 (14:28 +0000)]
bench rebaseline after Brian's improvement e5a041c

BUG=skia:2274
NOTRY=true
R=bsalomon@google.com
TBR=bsalomon@google.com

Author: bensong@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13738 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoRevert of New version of the bbh shootout (https://codereview.chromium.org/186973005/)
commit-bot@chromium.org [Tue, 11 Mar 2014 14:23:50 +0000 (14:23 +0000)]
Revert of New version of the bbh shootout (https://codereview.chromium.org/186973005/)

Reason for revert:
breaking build on at least 12 configurations.

Original issue's description:
> New version of the bbh shootout.
> There were a bunch of problems with the existing code, all of which I would of ignored, except it could only benchmark none and rtree.
> The new version measures the same numbers, in almost exactly the same way, it's the structure over the top of the actual test runner that I changed.
> Now it only loads the pictures once, it is configurable in which bbh's it runs and how may loops on them it does, it uses standard command line processing, and it does not do so much redundant work so it runs quicker. It is also much easier to understand and change IMHO.
>
> Doing this so I can reasonably compare the new QuadTree implementation.
> BUG=skia:2242
>
> Committed: http://code.google.com/p/skia/source/detail?r=13736

R=tomhudson@google.com, mtklein@google.com, reed@google.com, iancottrell@google.com
TBR=iancottrell@google.com, mtklein@google.com, reed@google.com, tomhudson@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2242

Author: halcanary@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13737 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoNew version of the bbh shootout.
commit-bot@chromium.org [Tue, 11 Mar 2014 13:51:28 +0000 (13:51 +0000)]
New version of the bbh shootout.
There were a bunch of problems with the existing code, all of which I would of ignored, except it could only benchmark none and rtree.
The new version measures the same numbers, in almost exactly the same way, it's the structure over the top of the actual test runner that I changed.
Now it only loads the pictures once, it is configurable in which bbh's it runs and how may loops on them it does, it uses standard command line processing, and it does not do so much redundant work so it runs quicker. It is also much easier to understand and change IMHO.

Doing this so I can reasonably compare the new QuadTree implementation.
BUG=skia:2242
R=tomhudson@google.com, mtklein@google.com, reed@google.com

Author: iancottrell@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13736 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoplumbing for GPU fast blur
commit-bot@chromium.org [Mon, 10 Mar 2014 22:53:20 +0000 (22:53 +0000)]
plumbing for GPU fast blur

BUG=skia:2281
R=bsalomon@google.com

Author: humper@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13735 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoRebase bezier_effect GMs and lingering changed GMs from laggy bots
bsalomon@google.com [Mon, 10 Mar 2014 21:42:48 +0000 (21:42 +0000)]
Rebase bezier_effect GMs and lingering changed GMs from laggy bots

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13734 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoplumb API for analytic rrect blur
commit-bot@chromium.org [Mon, 10 Mar 2014 21:42:06 +0000 (21:42 +0000)]
plumb API for analytic rrect blur

BUG=skia:2281
R=bsalomon@google.com, reed@google.com

Author: humper@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13733 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoRevert of Add new module for distance field generation. (https://codereview.chromium...
commit-bot@chromium.org [Mon, 10 Mar 2014 20:37:54 +0000 (20:37 +0000)]
Revert of Add new module for distance field generation. (https://codereview.chromium.org/178543007/)

Reason for revert:
multiple compile errors

Original issue's description:
> Add new module for distance field generation.
>
> This improves the speed over the previous method by 10x+, and makes using distance fields practical.
>
> BUG=skia:2173
>
> Committed: http://code.google.com/p/skia/source/detail?r=13729

R=bsalomon@google.com, robertphillips@google.com, jvanverth@google.com
TBR=bsalomon@google.com, jvanverth@google.com, robertphillips@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2173

Author: halcanary@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13732 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoFix no GPU build after r13728
bsalomon@google.com [Mon, 10 Mar 2014 19:51:46 +0000 (19:51 +0000)]
Fix no GPU build after r13728

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13731 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoflag to make kClipToLayer_SaveFlag the default behavior
reed@google.com [Mon, 10 Mar 2014 19:47:58 +0000 (19:47 +0000)]
flag to make kClipToLayer_SaveFlag the default behavior

#define SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG to get the old behavior

The goal is to remove the feature of saveLayer that allows the canvas to draw outside of the top-most layer.

R=robertphillips@google.com, scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13730 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoAdd new module for distance field generation.
commit-bot@chromium.org [Mon, 10 Mar 2014 19:38:51 +0000 (19:38 +0000)]
Add new module for distance field generation.

This improves the speed over the previous method by 10x+, and makes using distance fields practical.

BUG=skia:2173
R=bsalomon@google.com, robertphillips@google.com

Author: jvanverth@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13729 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoreorg iteration code in rrects GM, tightly pack rrects drawn in _effect version.
commit-bot@chromium.org [Mon, 10 Mar 2014 19:33:16 +0000 (19:33 +0000)]
reorg iteration code in rrects GM, tightly pack rrects drawn in _effect version.

R=robertphillips@google.com

Author: bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13728 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agorebaseline_server: disable image magnifier, for huge UI speedup
commit-bot@chromium.org [Mon, 10 Mar 2014 19:12:53 +0000 (19:12 +0000)]
rebaseline_server: disable image magnifier, for huge UI speedup

BUG=skia:2248
NOTREECHECKS=True
NOTRY=True
R=rmistry@google.com
TBR=rmistry

Author: epoger@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13727 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agorebaseline_server: add actual_repo and actual_revision command line options
commit-bot@chromium.org [Mon, 10 Mar 2014 18:09:25 +0000 (18:09 +0000)]
rebaseline_server: add actual_repo and actual_revision command line options

So, if you want to see divergences from expectations as of https://code.google.com/p/skia-autogen/source/detail?r=29365 , specify --actuals-revision 29365

This is also handy for testing rebaseline_server performance improvements against a static set of results.

BUG=skia:2248
NOTREECHECKS=True
NOTRY=True
R=borenet@google.com, bsalomon@google.com

Author: epoger@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13726 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agorebaseline_server: fix reload delay when there is client/server clock skew
commit-bot@chromium.org [Mon, 10 Mar 2014 18:05:15 +0000 (18:05 +0000)]
rebaseline_server: fix reload delay when there is client/server clock skew

Currently, if there is >10 second clock skew between client and server, the
client will attempt to reload constantly while the server is still loading
results.

NOTREECHECKS=True
NOTRY=True
R=borenet@google.com

Author: epoger@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13725 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoPulling these out of other reviews so avoid code review clutter.
commit-bot@chromium.org [Mon, 10 Mar 2014 16:41:00 +0000 (16:41 +0000)]
Pulling these out of other reviews so avoid code review clutter.

R=jvanverth@google.com

Author: robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13724 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoUse bitfield rather than distinct enum types for circular corners in RRectEffect.
commit-bot@chromium.org [Mon, 10 Mar 2014 16:08:22 +0000 (16:08 +0000)]
Use bitfield rather than distinct enum types for circular corners in RRectEffect.

BUG=skia:2181
R=robertphillips@google.com

Author: bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13723 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoremove legacy ifdef wrapping fast blur
commit-bot@chromium.org [Mon, 10 Mar 2014 16:05:57 +0000 (16:05 +0000)]
remove legacy ifdef wrapping fast blur

BUG=skia:
R=robertphillips@google.com

Author: humper@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13722 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoAvoid black flashes when resizing debugger window using MSAA
commit-bot@chromium.org [Mon, 10 Mar 2014 16:04:47 +0000 (16:04 +0000)]
Avoid black flashes when resizing debugger window using MSAA

Avoid black flashes when resizing debugger window using MSAA. Clear the
stencil buffer always after resize. Also reset the GrContext state
when Qt calls resizeGL -- we do not know what GL state Qt changes.

Remove setting of white background to SkGLWidget, it is not
effective. QGLWidget does not respect the stylesheet.

Also move the initial stencil clearing before GrContext is created
in order to preserve GrContext state consistent with actual GL
state.

R=robertphillips@google.com

Author: kkinnunen@nvidia.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13721 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agorebaseline_server: display how long it took to render the list
commit-bot@chromium.org [Mon, 10 Mar 2014 15:36:06 +0000 (15:36 +0000)]
rebaseline_server: display how long it took to render the list

BUG=skia:2248
NOTREECHECKS=True
NOTRY=True
R=borenet@google.com

Author: epoger@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13720 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoRevert "remove flag for legacy copyTo -- call sites have been updated"
reed@google.com [Mon, 10 Mar 2014 12:17:06 +0000 (12:17 +0000)]
Revert "remove flag for legacy copyTo -- call sites have been updated"

This reverts commit 85586a92f50942ede4422aca7308b9d8a88469db.

git-svn-id: http://skia.googlecode.com/svn/trunk@13719 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoFactory methods for heap-allocated SkImageFilter objects.
commit-bot@chromium.org [Mon, 10 Mar 2014 10:51:58 +0000 (10:51 +0000)]
Factory methods for heap-allocated SkImageFilter objects.

This is part of an effort to ensure that all SkPaint effects can only be
allocated on the heap.

This patch makes the constructors of SkImageFilter and its subclasses non-public
and instead provides factory methods for creating these objects on the heap. We
temporarily keep constructor of publicly visible classes public behind a flag.

BUG=skia:2187
R=scroggo@google.com, mtklein@chromium.org, reed@google.com, senorblanco@google.com, senorblanco@chromium.org, bsalomon@google.com, sugoi@chromium.org, zork@chromium.org

Author: dominikg@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13718 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoAdd API for GrContext to recommend rendertarget sample count
commit-bot@chromium.org [Mon, 10 Mar 2014 07:40:03 +0000 (07:40 +0000)]
Add API for GrContext to recommend rendertarget sample count

Add GrContext::getRecommendedSampleCount method that can be
used to determine which GPU backend and what exact sample count
is recommendeded for a particular render target at particular
dpi.

Make this initially recommend 4xMSAA for contexts which have
NVPR enabled if dpi is 250 or more, 16 if dpi is less than 250
and no MSAA for others.

BUG=chromium:347962
R=bsalomon@google.com

Author: kkinnunen@nvidia.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13717 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoSanitizing source files in Housekeeper-Nightly
skia.committer@gmail.com [Sun, 9 Mar 2014 03:02:09 +0000 (03:02 +0000)]
Sanitizing source files in Housekeeper-Nightly

git-svn-id: http://skia.googlecode.com/svn/trunk@13716 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agohide getTotalClip, so we can eventually remove it
commit-bot@chromium.org [Sat, 8 Mar 2014 03:57:19 +0000 (03:57 +0000)]
hide getTotalClip, so we can eventually remove it
hide getClipType, so we can eventually remove it

patch from issue 189443007

TBR=robertphilips@google.com

Author: reed@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13715 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoSanitizing source files in Housekeeper-Nightly
skia.committer@gmail.com [Sat, 8 Mar 2014 03:02:06 +0000 (03:02 +0000)]
Sanitizing source files in Housekeeper-Nightly

git-svn-id: http://skia.googlecode.com/svn/trunk@13714 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoRebaselines for https://codereview.chromium.org/188693008/
bsalomon@google.com [Fri, 7 Mar 2014 22:34:32 +0000 (22:34 +0000)]
Rebaselines for https://codereview.chromium.org/188693008/

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13713 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoupdate ignored-tests.txt to accound for acceptable changes due to r13710
bsalomon@google.com [Fri, 7 Mar 2014 20:33:07 +0000 (20:33 +0000)]
update ignored-tests.txt to accound for acceptable changes due to r13710

TBR=robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13712 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoremove dead code
reed@google.com [Fri, 7 Mar 2014 19:44:59 +0000 (19:44 +0000)]
remove dead code

git-svn-id: http://skia.googlecode.com/svn/trunk@13711 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoImplement the clip as 4 or fewer GrEffects when possible.
commit-bot@chromium.org [Fri, 7 Mar 2014 19:43:43 +0000 (19:43 +0000)]
Implement the clip as 4 or fewer GrEffects when possible.

BUG=skia:2181
R=robertphillips@google.com

Author: bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13710 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoOnce Chromium starts holding on to paths and we can actually reuse cached path data...
commit-bot@chromium.org [Fri, 7 Mar 2014 18:42:15 +0000 (18:42 +0000)]
Once Chromium starts holding on to paths and we can actually reuse cached path data (e.g., masks & geometry) we will need a way to preserve that reuse in the skps. This CL begins adding that capability. More analysis & profiling needs to be done before it is always enabled.

When enabled it does make the disabled path de-duping test in the Canvas unit test pass.

BUG=skia:507
R=bsalomon@google.com, mtklein@google.com

Author: robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13709 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoAdd nvprmsaa4 and nvprmsaa16 configs to bench_pictures
commit-bot@chromium.org [Fri, 7 Mar 2014 18:41:14 +0000 (18:41 +0000)]
Add nvprmsaa4 and nvprmsaa16 configs to bench_pictures

Add nvprmsaa4 and nvprmsaa16 configs to bench_pictures.

R=bsalomon@google.com

Author: kkinnunen@nvidia.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13708 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoIgnore failure of mixed_xfermodes_gpu on N4
commit-bot@chromium.org [Fri, 7 Mar 2014 17:34:21 +0000 (17:34 +0000)]
Ignore failure of mixed_xfermodes_gpu on N4

BUG=skia:1596
NOTRY=true
R=epoger@google.com, bsalomon@google.com

Author: borenet@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13707 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoremove flag for legacy copyTo -- call sites have been updated
reed@google.com [Fri, 7 Mar 2014 16:20:47 +0000 (16:20 +0000)]
remove flag for legacy copyTo -- call sites have been updated

TBR=robertphilips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13706 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoupdate Doxygen config file to include gpu directory in api generation
commit-bot@chromium.org [Fri, 7 Mar 2014 16:20:36 +0000 (16:20 +0000)]
update Doxygen config file to include gpu directory in api generation

BUG=skia:2263
R=epoger@google.com

Author: hcm@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13705 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoThis is just the first version and shows how I intend to orchestrate this. Future...
commit-bot@chromium.org [Fri, 7 Mar 2014 15:53:01 +0000 (15:53 +0000)]
This is just the first version and shows how I intend to orchestrate this. Future enhancements will:

track the portion of the bitmap required
track any resizing that might be required
actually preload something

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

Author: robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13704 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoremove code disabled from writePixels change
commit-bot@chromium.org [Fri, 7 Mar 2014 14:52:22 +0000 (14:52 +0000)]
remove code disabled from writePixels change

These tests were asserting that particular, non-documented, optimizations were taking place
in the deferreddevice. Theese particualr short-cuts are no longer possible given the change
to canvas' writepixels to always require a raw-pointer.

R=junov@google.com
TBR=junov@google.com

Author: reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13703 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agogetFactory() must return a factory.
commit-bot@chromium.org [Fri, 7 Mar 2014 14:52:09 +0000 (14:52 +0000)]
getFactory() must return a factory.

BUG=348821
R=reed@google.com, mtklein@google.com

Author: mtklein@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13702 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoFix underlying issue causing crbug.com/348821.
commit-bot@chromium.org [Fri, 7 Mar 2014 14:43:00 +0000 (14:43 +0000)]
Fix underlying issue causing crbug.com/348821.

SkDashPathEffect refuses to flatten itself if it thinks it's a no-op.  This
messes with the assumption that flattening a non-NULL effect and then
unflattening from those bytes produces a non-NULL effect.  I'd rather make that
assumption always be true than save a few bytes for rare nonsense path effects.

BUG=348821
R=reed@google.com, mtklein@google.com

Author: mtklein@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13701 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agofix the build error of SkiaExample -- use setColorType, not setConfig
commit-bot@chromium.org [Fri, 7 Mar 2014 13:24:52 +0000 (13:24 +0000)]
fix the build error of SkiaExample -- use setColorType, not setConfig

BUG=skia:
R=reed@google.com, scroggo@google.com

Author: yunchao.he@intel.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13700 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoSSE2 implementation of S32A_D565_Opaque_Dither
commit-bot@chromium.org [Fri, 7 Mar 2014 13:24:42 +0000 (13:24 +0000)]
SSE2 implementation of S32A_D565_Opaque_Dither

Run benchmarks with command line option "--forceDither true --forceBlend
1", almost all the benchmarks exercised S32A_D565_Opaque_Dither can get
about 20%-70% performance improvement.
Here are the data on i7-3770:
                                                  before    after
verts                                            4314.81  3627.64  15.93%
constXTile_MM_filter_trans                       1434.22   432.82  69.82%
constXTile_CC_filter_trans_scale                 1440.17   437.00  69.66%
constXTile_RR_filter_trans                       1436.96   431.93  69.94%
constXTile_MM_trans_scale                        1436.33   435.77  69.66%
constXTile_CC_trans                              1433.12   431.36  69.90%
constXTile_RR_trans_scale                        1436.13   436.06  69.64%
constXTile_MM_filter                             1411.55   408.06  71.09%
constXTile_CC_filter_scale                       1416.68   414.18  70.76%
constXTile_RR_filter                             1429.46   409.81  71.33%
constXTile_MM_scale                              1415.00   412.56  70.84%
constXTile_CC                                    1410.32   408.36  71.04%
constXTile_RR_scale                              1413.26   413.16  70.77%
repeatTile_4444_A                                1922.01   879.03  54.27%
repeatTile_4444_A                                1430.68   818.34  42.80%
repeatTile_4444_X                                1817.43   816.63  55.07%
maskshader                                       5911.09  5895.46   0.26%
gradient_create_alpha                               4.41     4.41  -0.15%
gradient_conical_clamp_3color                   35298.71 27574.34  21.88%
gradient_conical_clamp_hicolor                  35262.15 27538.99  21.90%
gradient_conical_clamp                          35276.21 27599.80  21.76%
gradient_radial2_mirror                         20846.74 12969.39  37.79%
gradient_radial2_clamp_hicolor                  21848.12 13967.57  36.07%
gradient_radial2_clamp                          21829.95 13978.57  35.97%
bitmap_4444_A_scale_rotate_bicubic                105.31    87.13  17.26%
bitmap_4444_A_scale_bicubic                        73.69    47.76  35.20%
bitmap_4444_update_scale_rotate_bilerp            125.65    87.86  30.08%
bitmap_4444_update_volatile_scale_rotate_bilerp   125.50    87.65  30.16%
bitmap_4444_scale_rotate_bilerp                   124.46    87.91  29.37%
bitmap_4444_A_scale_rotate_bilerp                 105.09    87.27  16.96%
bitmap_4444_update_scale_bilerp                   106.78    63.28  40.74%
bitmap_4444_update_volatile_scale_bilerp          106.66    63.66  40.32%
bitmap_4444_scale_bilerp                          106.70    63.19  40.78%
bitmap_4444_A_scale_bilerp                         83.05    62.25  25.04%
bitmap_a8                                          98.11    52.76  46.22%
bitmap_a8_A                                        98.24    52.85  46.20%

BUG=
R=mtklein@google.com

Author: qiankun.miao@intel.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13699 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoSSE2 implementation of S32_D565_Opaque_Dither
commit-bot@chromium.org [Fri, 7 Mar 2014 03:25:32 +0000 (03:25 +0000)]
SSE2 implementation of S32_D565_Opaque_Dither

Run benchmarks with command line option "--forceDither true". The result
shows that all benchmarks exercised S32_D565_Opaque_Dither benefit from
this SSE2 optimization. Here are the data on i7-3770:
                                                  before    after
constXTile_MM_filter                              900.93   217.75  75.83%
constXTile_CC_filter_scale                        907.59   225.65  75.14%
constXTile_RR_filter                              903.33   219.41  75.71%
constXTile_MM_scale                               902.45   221.46  75.46%
constXTile_CC                                     898.55   218.37  75.70%
constXTile_RR_scale                               902.69   222.35  75.37%
repeatTile_4444_X                                 938.53   240.49  74.38%
gradient_radial2_mirror                         16999.49 11540.39  32.11%
gradient_radial2_clamp_hicolor                  17943.38 12501.71  30.33%
gradient_radial2_clamp                          17816.36 12492.04  29.88%
bitmaprect_FF_filter_trans                         47.81    10.98  77.03%
bitmaprect_FF_nofilter_trans                       47.79    10.91  77.18%
bitmaprect_FF_filter_identity                      47.74    10.89  77.18%
bitmaprect_FF_nofilter_identity                    47.83    10.89  77.24%
bitmap_4444_update_scale_rotate_bilerp            100.45    76.84  23.50%
bitmap_4444_update_volatile_scale_rotate_bilerp   100.80    76.70  23.91%
bitmap_4444_scale_rotate_bilerp                   100.43    77.18  23.15%
bitmap_4444_update_scale_bilerp                    79.00    49.03  37.93%
bitmap_4444_update_volatile_scale_bilerp           78.90    48.87  38.06%
bitmap_4444_scale_bilerp                           78.92    48.81  38.16%
bitmap_4444_update                                 42.19    11.53  72.68%
bitmap_4444_update_volatile                        42.28    11.49  72.82%
bitmap_a8                                          60.37    29.75  50.72%
bitmap_4444                                        42.19    11.52  72.69%

BUG=
R=mtklein@google.com

Author: qiankun.miao@intel.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13698 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoAdd SkCanvas::writePixels that takes info+pixels directly
commit-bot@chromium.org [Fri, 7 Mar 2014 03:25:16 +0000 (03:25 +0000)]
Add SkCanvas::writePixels that takes info+pixels directly

add corresponding methods to device (w/ diff name to avoid colliding with exising virtuals)

BUG=skia:
R=bsalomon@google.com, robertphillips@google.com, junov@google.com, junov@chromium.org

Author: reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13697 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoAdd a class to allocate small objects w/o extra calls to new.
commit-bot@chromium.org [Fri, 7 Mar 2014 03:24:41 +0000 (03:24 +0000)]
Add a class to allocate small objects w/o extra calls to new.

Add SkSmallAllocator, a template for allocating small (as defined by the
instantiation) objects without extra calls to new. Add a helper macro to
make using it simple.

Remove SkTemplatesPriv.h, whose behavior is replaced by SkSmallAllocator.
The old SK_PLACEMENT_NEW had the following drawbacks:
- Easily confused with SkNEW_PLACEMENT.
- Requires passing around lots of void*s along with the storageSize.
- Requires using a separate class for deleting it.
- We had multiple ways Auto objects for deleting in different places.
- It always did a straight heap allocation on Windows, meaning Windows
  did not get any advantages from the confusing code.
The new SkSmallAllocator simplifies things:
- It is clear about what it does.
- It takes care of the deletion in one place that is automatically
  handled.

Further, the new class can be used to create more than one object. This
is in preparation for BUG=skia:1976, for which we would like to create
a new object without extra heap allocations. The plan is to create both
the blitter and the new object on the stack using the SkSmallAllocator.

Add a new test for SkSmallAllocator.

SkShader.h:
Move the private version of CreateBitmapShader to SkBitmapProcShader
(which already has the implementation) and remove the friend class
(which was only used to call this private function). This allows
SkSmallAllocator to reside in the private src/ directory.

SkBitmapProcShader:
Move CreateBitmapShader and the macro for the storage size here. With
the macro in a (private) header, the (private) headers with function
declarations (which now depend on the storage size used) can see the
macro.
Use SkSmallAllocator in CreateBitmapShader.
Change the macro to kBlitterStorageByteCount, since SkSmallAllocator
takes a byte count as its template parameter.

SkBlitter:
Use the SkSmallAllocator.
Remove Sk3DShader::fKillProc and SkAutoCallProc. Both of their
behaviors have been moved into SkSmallAllocator (SkAutoCallProc was
unnecessary anyway, because the only time we ever used it we also
called detach(), so its auto behavior never happened).
Create the Sk3DShader on the stack, if there's room.
Remove the helper version of Choose, which was unused.

SmallAllocatorTest:
Test for the new class.

The rest:
Use SkSmallAllocator.

BUG=skia:1976
R=reed@google.com, mtklein@google.com

Author: scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13696 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoYet another whitespace change to see if the bots are fixed
commit-bot@chromium.org [Thu, 6 Mar 2014 23:38:52 +0000 (23:38 +0000)]
Yet another whitespace change to see if the bots are fixed

NOTRY=true
NOTREECHECKS=true
R=epoger@google.com, rmistry@google.com
TBR=epoger, rmistry
BUG=skia:2264

Author: borenet@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13695 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoWhitespace change to verify that the bots are fixed
commit-bot@chromium.org [Thu, 6 Mar 2014 23:08:33 +0000 (23:08 +0000)]
Whitespace change to verify that the bots are fixed

R=epoger@google.com, rmistry@google.com
TBR=epoger, rmistry
NOTREECHECKS=true
NOTRY=true
BUG=skia:2264

Author: borenet@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13694 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoWhitespace change to test whether builders are fixed
commit-bot@chromium.org [Thu, 6 Mar 2014 21:48:57 +0000 (21:48 +0000)]
Whitespace change to test whether builders are fixed

R=epoger@google.com, rmistry@google.com
TBR=epoger, rmistry
NOTRY=true
NOTREECHECKS=true
BUG=skia:2264

Author: borenet@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13693 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoAdd debug check of chunk size written to skp
commit-bot@chromium.org [Thu, 6 Mar 2014 20:53:44 +0000 (20:53 +0000)]
Add debug check of chunk size written to skp

R=mtklein@google.com

Author: robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13692 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoMark mixed_xfermodes_gpu on Win7 perspective bot as ignore-failure
commit-bot@chromium.org [Thu, 6 Mar 2014 20:34:02 +0000 (20:34 +0000)]
Mark mixed_xfermodes_gpu on Win7 perspective bot as ignore-failure

BUG=skia:2262
NOTRY=true
R=epoger@google.com, bsalomon@google.com

Author: borenet@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13691 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoRemove MCRec.fNext
commit-bot@chromium.org [Thu, 6 Mar 2014 19:56:58 +0000 (19:56 +0000)]
Remove MCRec.fNext

No longer used.

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

Author: fmalita@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13690 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoManually add baseline for typeface_565
commit-bot@chromium.org [Thu, 6 Mar 2014 19:29:24 +0000 (19:29 +0000)]
Manually add baseline for typeface_565

BUG=skia:2146
NOTRY=true
R=epoger@google.com

Author: borenet@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13689 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoActually, we wrote only size bytes.
commit-bot@chromium.org [Thu, 6 Mar 2014 19:23:51 +0000 (19:23 +0000)]
Actually, we wrote only size bytes.

BUG=skia:
R=halcanary@google.com, mtklein@google.com

Author: mtklein@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13688 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoAvoid recomputing two consecutive identical 1D filters.
commit-bot@chromium.org [Thu, 6 Mar 2014 19:10:44 +0000 (19:10 +0000)]
Avoid recomputing two consecutive identical 1D filters.

If the arguments to the X and Y filter computation are identical,
the results will be identical; copying is much faster than recomputing.

With a change like https://codereview.chromium.org/183763047/ applied
this speeds up BitmapScaleBench on Linux by around 10%.

BUG=skia:2236
R=humper@google.com, tomhudson@google.com

Author: tomhudson@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13687 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoMake arm64 test script more efficient with old versions of gsutil.
commit-bot@chromium.org [Thu, 6 Mar 2014 17:47:49 +0000 (17:47 +0000)]
Make arm64 test script more efficient with old versions of gsutil.

This continues the changes indtroduced in
<https://codereview.chromium.org/183883020>, and also simplifies the
script considerably.

R=borenet@google.com
TBR=borenet@google.com
NOTRY=true

Author: halcanary@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13686 2bbb7eff-a529-9590-31e7-b0007b416f81

10 years agoAdding this call simulates seeing a *different* bitmap every time we scale, which...
commit-bot@chromium.org [Thu, 6 Mar 2014 17:16:37 +0000 (17:16 +0000)]
Adding this call simulates seeing a *different* bitmap every time we scale, which changes the code path (places much heavier load on constructing a new filter). This better emulates the kind of environment most embedders see us in, where they try to cache a scaled bitmap rather than frequently rescaling it.

This change will cause significant regressions in microbenchmark scores.

BUG=skia:2236
R=humper@google.com, reed@google.com, scroggo@google.com, tomhudson@google.com

Author: tomhudson@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13685 2bbb7eff-a529-9590-31e7-b0007b416f81