platform/upstream/libSkiaSharp.git
9 years agoTweak SkiaLab docs
borenet [Tue, 23 Jun 2015 13:05:01 +0000 (06:05 -0700)]
Tweak SkiaLab docs

BUG=skia:3850
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=1203443003

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

9 years agoadd simple test for offsetimagefilter
reed [Tue, 23 Jun 2015 13:01:10 +0000 (06:01 -0700)]
add simple test for offsetimagefilter

BUG=skia:
TBR=

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

9 years agoadd break statement -- lost during rewrite earlier
reed [Tue, 23 Jun 2015 00:03:10 +0000 (17:03 -0700)]
add break statement -- lost during rewrite earlier

BUG=skia:
TBR=

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

9 years agochange old picture serialization to really handle images
reed [Mon, 22 Jun 2015 19:48:26 +0000 (12:48 -0700)]
change old picture serialization to really handle images

BUG=skia:3965

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

9 years agofix for calling bindFragDataLocation on OpenGL 2.1
joshualitt [Mon, 22 Jun 2015 19:31:31 +0000 (12:31 -0700)]
fix for calling bindFragDataLocation on OpenGL 2.1

BUG=skia:3966

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

9 years agoClean up usage of SkSurfaceProps
robertphillips [Mon, 22 Jun 2015 19:06:08 +0000 (12:06 -0700)]
Clean up usage of SkSurfaceProps

This CL continues cleaning up Skia's usage of SkSurfaceProps. It:

  Removes the duplicate SkSurfaceProps object from SkImageFilter::Proxy.

  Removes a dispreferred ctor from SkCanvas

  Removes the initForRootLayer entry point from SkDevice (since the root device and the canvas should always have the same pixel geometry now).

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

9 years agoUse vmulq_n_u32(..., 0x01010101) to distribute alphas.
mtklein [Mon, 22 Jun 2015 18:00:47 +0000 (11:00 -0700)]
Use vmulq_n_u32(..., 0x01010101) to distribute alphas.

This seems to make alphas() faster and Load[24]Alphas() no slower.
The change is particularly noticeable on xfermodes that call alphas()
twice (on src and dst), with a 10-12% speedup.

Xfermode_Difference_aa   29ms -> 28.4ms 0.98x
   Xfermode_DstATop_aa 27.2ms -> 26.7ms 0.98x
       Xfermode_Xor_aa 27.2ms -> 26.5ms 0.98x
      Xfermode_DstOver 23.6ms -> 22.9ms 0.97x
   Xfermode_DstOver_aa 27.8ms -> 26.8ms 0.96x
       Xfermode_DstOut 22.6ms -> 21.7ms 0.96x
  Xfermode_Multiply_aa   30ms -> 28.5ms 0.95x
    Xfermode_DstOut_aa 26.1ms -> 24.8ms 0.95x
     Xfermode_DstIn_aa 25.4ms -> 24.1ms 0.95x
      Xfermode_DstATop 28.7ms ->   26ms 0.9x
     Xfermode_Multiply 35.5ms -> 31.3ms 0.88x
   Xfermode_Difference 31.8ms -> 27.7ms 0.87x
          Xfermode_Xor 30.1ms -> 26.1ms 0.87x
BUG=skia:

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

9 years agofix spurious init on VisualBench startup
joshualitt [Mon, 22 Jun 2015 17:44:46 +0000 (10:44 -0700)]
fix spurious init on VisualBench startup

BUG=skia:

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

9 years agoImplemented onGetScanlines and onSkipScanlines for interlaced pngs
emmaleer [Mon, 22 Jun 2015 17:40:21 +0000 (10:40 -0700)]
Implemented onGetScanlines and onSkipScanlines for interlaced pngs

Modified DM tests to be faster when decoding interlaced pngs

BUG=skia:

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

9 years agoUpdate some Sk4px APIs.
mtklein [Mon, 22 Jun 2015 17:39:38 +0000 (10:39 -0700)]
Update some Sk4px APIs.

Mostly this is about ergonomics, making it easier to do good operations and hard / impossible to do bad ones.

- SkAlpha / SkPMColor constructors become static factories.
- Remove div255TruncNarrow(), rename div255RoundNarrow() to div255().  In practice we always want to round, and the narrowing to 8-bit is contextually obvious.
- Rename fastMulDiv255Round() approxMulDiv255() to stress it's approximate-ness over its speed.  Drop Round for the same reason as above... we should always round.
- Add operator overloads so we don't have to keep throwing in seemingly-random Sk4px() or Sk4px::Wide() casts.
- use operator*() for 8-bit x 8-bit -> 16-bit math.  It's always what we want, and there's generally no 8x8->8 alternative.
- MapFoo can take a const Func&.  Don't think it makes a big difference, but nice to do.

BUG=skia:

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

9 years agoBegin kLegacyFontHost_InitType cleanup
robertphillips [Mon, 22 Jun 2015 16:46:59 +0000 (09:46 -0700)]
Begin kLegacyFontHost_InitType cleanup

This CL starts the process of pushing kLegacyFontHost_InitType-type SkSurfaceProps up the call stack and out of Skia. It:

 Gets rid of the default SkBaseDevice ctor. This means everyone has to always hand an explicit SkSurfaceProps to it.

 It makes public the SkBitmapDevice creation methods that require SkSurfaceProps.

 Removes (in Skia's code base) all SkBitmapDevice ctor calls w/o SkSurfaceProps.

 Makes the "recording" canvases (e.g., pdf, svg, xps) explicitly not use kLegacyFontHost_InitType.

 Replicates the creating canvas/device's flags on saveLayer devices

BUG=skia:3934

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

9 years agoclean offsetimagefilter gm
reed [Mon, 22 Jun 2015 16:10:14 +0000 (09:10 -0700)]
clean offsetimagefilter gm

BUG=skia:
TBR=robertphilips

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

9 years agoChange large glyph check back to > threshold.
jvanverth [Mon, 22 Jun 2015 15:08:09 +0000 (08:08 -0700)]
Change large glyph check back to > threshold.

Using >= misses some Chromium test cases that are still
being rendered as paths.

BUG=chromium:467569

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

9 years agoRemove distance field flag from SkPaint
jvanverth [Mon, 22 Jun 2015 13:46:56 +0000 (06:46 -0700)]
Remove distance field flag from SkPaint

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

9 years agoFixup android launch script to launch VisualBench as well as SampleApp
joshualitt [Mon, 22 Jun 2015 12:39:32 +0000 (05:39 -0700)]
Fixup android launch script to launch VisualBench as well as SampleApp

BUG=skia:

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

9 years agoMake GrGLProgramDataManager not refcounted
kkinnunen [Mon, 22 Jun 2015 05:55:12 +0000 (22:55 -0700)]
Make GrGLProgramDataManager not refcounted

Make GrGLProgramDataManager not refcounted, refcounting is not used for
the instances.

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

9 years agoUpdate SKP version
skia.buildbots [Sun, 21 Jun 2015 07:17:25 +0000 (00:17 -0700)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

TBR=
NO_MERGE_BUILDS

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

9 years agoremove SK_SUPPORT_LEGACY_OPTIONLESS_GET_PIXELS (now in SkUserConfig.h)
reed [Sat, 20 Jun 2015 15:45:59 +0000 (08:45 -0700)]
remove SK_SUPPORT_LEGACY_OPTIONLESS_GET_PIXELS (now in SkUserConfig.h)

BUG=skia:
TBR=
NOTRY=True

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

9 years agoRename all things "leaky" in SkDevice
robertphillips [Fri, 19 Jun 2015 21:14:54 +0000 (14:14 -0700)]
Rename all things "leaky" in SkDevice

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

9 years agoFix for assert in VisualBench
joshualitt [Fri, 19 Jun 2015 19:46:33 +0000 (12:46 -0700)]
Fix for assert in VisualBench

BUG=skia:

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

9 years agoremove SkDeviceProperties
robertphillips [Fri, 19 Jun 2015 18:49:52 +0000 (11:49 -0700)]
remove SkDeviceProperties

There is a lot more clean up to do here but this is probably a big enough bite.

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

9 years agoSwitch to glyphs as paths at a higher point size on Android
jvanverth [Fri, 19 Jun 2015 18:06:28 +0000 (11:06 -0700)]
Switch to glyphs as paths at a higher point size on Android

The regression occurred when we dropped the maximum DF size from 192
to 162, which meant that any glyph > 324 ended up being rendered as paths
rather than the previous > 384. This pushes the threshold for
rendering paths up to 384. Quality looks fine on high-res devices
which is why this is restricted to Android-only (low-res Android devices
should only rarely have text that large).

BUG=chromium:467569

Committed: https://skia.googlesource.com/skia/+/932d413e69845989fadaecf5bcb8686ec8c05032

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

9 years agoMove rect_memcopy from helper to global static.
egdaniel [Fri, 19 Jun 2015 17:52:25 +0000 (10:52 -0700)]
Move rect_memcopy from helper to global static.

BUG=skia:

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

9 years agoDo not fail on images that are too small to subset decode.
msarett [Fri, 19 Jun 2015 14:44:05 +0000 (07:44 -0700)]
Do not fail on images that are too small to subset decode.

Specifically (0x0) images being produced by webp scaled
decodes are causing problems.

BUG=skia:

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

9 years agoPrevent webp from producing 0 dimensional images
msarett [Fri, 19 Jun 2015 14:34:30 +0000 (07:34 -0700)]
Prevent webp from producing 0 dimensional images

BUG=skia:

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

9 years agoRevert of Disable failing GPU tests on Nexus 6. (patchset #1 id:1 of https://coderevi...
joshualitt [Fri, 19 Jun 2015 14:28:15 +0000 (07:28 -0700)]
Revert of Disable failing GPU tests on Nexus 6. (patchset #1 id:1 of https://codereview.chromium.org/1185753002/)

Reason for revert:
this should hopefully be fixed now.

Original issue's description:
> Disable failing GPU tests on Nexus 6.
>
> BUG=skia:3942
>
> Committed: https://skia.googlesource.com/skia/+/8ed08e54f4868d3ef88225bf873ce678e7716bd9

TBR=bsalomon@google.com,djsollen@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:3942

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

9 years agoFix precision error in https://codereview.chromium.org/1188433011/
robertphillips [Fri, 19 Jun 2015 13:40:02 +0000 (06:40 -0700)]
Fix precision error in https://codereview.chromium.org/1188433011/

TBR=reed@google.com

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

9 years agoAdded check for ill-conditioned invert
robertphillips [Fri, 19 Jun 2015 12:14:26 +0000 (05:14 -0700)]
Added check for ill-conditioned invert

sk_inv_determinant has a guard that the determinant can't get too big so this CL only checks if the determinant gets too small.

BUG=492263

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

9 years agoExpose SkFaceRec less.
bungeman [Fri, 19 Jun 2015 12:09:39 +0000 (05:09 -0700)]
Expose SkFaceRec less.

The SkFaceRec class is some data which needs to remain alive for the
life of an FT_Face. ref_ft_face returns SkFaceRec, but confusingly
unref_ft_face takes an FT_Face. Since no one was using the SkFaceRec
for anything other than accessing the FT_Face, have ref_ft_face
return FT_Face instead and remove the unused SkFaceRec pointer from
the scaler context.

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

9 years agoRemove gamma field from SkDeviceProperties
robertphillips [Fri, 19 Jun 2015 11:46:45 +0000 (04:46 -0700)]
Remove gamma field from SkDeviceProperties

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

9 years agoremove deprecated NewRasterPMColor
reed [Fri, 19 Jun 2015 10:42:56 +0000 (03:42 -0700)]
remove deprecated NewRasterPMColor

BUG=skia:
TBR=

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

9 years agoRevert of Switch to glyphs as paths at a higher point size on Android (patchset ...
fmalita [Thu, 18 Jun 2015 21:34:53 +0000 (14:34 -0700)]
Revert of Switch to glyphs as paths at a higher point size on Android (patchset #1 id:1 of https://codereview.chromium.org/1183053005/)

Reason for revert:
GM:mixedtextblobs looks significantly worse on Android.

Before: https://gold.skia.org/img/images/19d171dd72ba68df9501736dbbc2aa44.png

After: https://gold.skia.org/img/images/d4c38072d2836356c00fdc1a7b537350.png

Original issue's description:
> Switch to glyphs as paths at a higher point size on Android
>
> The regression occurred when we dropped the maximum DF size from 192
> to 162, which meant that any glyph > 324 ended up being rendered as paths
> rather than the previous > 384. This pushes the threshold for
> rendering paths up to 384. Quality looks fine on high-res devices
> which is why this is restricted to Android-only (low-res Android devices
> should only rarely have text that large).
>
> BUG=chromium:467569
>
> Committed: https://skia.googlesource.com/skia/+/932d413e69845989fadaecf5bcb8686ec8c05032

TBR=joshualitt@google.com,jvanverth@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:467569

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

9 years agoWork around for nexus 6 TexSubImage issue
joshualitt [Thu, 18 Jun 2015 21:18:02 +0000 (14:18 -0700)]
Work around for nexus 6 TexSubImage issue

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/c69fe20ef35df0776b179cbd5ce4d1bdc0ba4090

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

9 years agoprivatize
reed [Thu, 18 Jun 2015 21:05:07 +0000 (14:05 -0700)]
privatize

BUG=skia:
TBR=bsalomon@google.com

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

9 years agodisable floating point textures if GLSL version is < 330
joshualitt [Thu, 18 Jun 2015 20:47:10 +0000 (13:47 -0700)]
disable floating point textures if GLSL version is < 330

BUG=skia:

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

9 years agoSwitch to glyphs as paths at a higher point size on Android
jvanverth [Thu, 18 Jun 2015 20:46:45 +0000 (13:46 -0700)]
Switch to glyphs as paths at a higher point size on Android

The regression occurred when we dropped the maximum DF size from 192
to 162, which meant that any glyph > 324 ended up being rendered as paths
rather than the previous > 384. This pushes the threshold for
rendering paths up to 384. Quality looks fine on high-res devices
which is why this is restricted to Android-only (low-res Android devices
should only rarely have text that large).

BUG=chromium:467569

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

9 years agoremove dead guarded code for legacy SkData proc
reed [Thu, 18 Jun 2015 20:42:03 +0000 (13:42 -0700)]
remove dead guarded code for legacy SkData proc

BUG=skia:

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

9 years agoadd callbacks to Images that wrap client-provided content
reed [Thu, 18 Jun 2015 20:41:40 +0000 (13:41 -0700)]
add callbacks to Images that wrap client-provided content

BUG=skia:

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

9 years agoInitialize the sample config for wrapped RTs to kUnified.
senorblanco [Thu, 18 Jun 2015 20:26:52 +0000 (13:26 -0700)]
Initialize the sample config for wrapped RTs to kUnified.

BUG=skia:3958

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

9 years agoModify android_install_app to install VisualBench
joshualitt [Thu, 18 Jun 2015 20:08:26 +0000 (13:08 -0700)]
Modify android_install_app to install VisualBench

BUG=skia:

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

9 years agoAdd SkWebpCodec, for decoding .webp images.
scroggo [Thu, 18 Jun 2015 19:53:43 +0000 (12:53 -0700)]
Add SkWebpCodec, for decoding .webp images.

Based on SkImageDecoder_libwebp.

TODO:
Support YUV? (Longer term - may influence our API for SkImageGenerator)

BUG=skia:3257

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

9 years agoremove SkData proc guard
reed [Thu, 18 Jun 2015 19:11:36 +0000 (12:11 -0700)]
remove SkData proc guard

BUG=skia:
NOTRY=True

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

9 years agoDon't call bindTexture from GrGLProgram
cdalton [Thu, 18 Jun 2015 18:54:30 +0000 (11:54 -0700)]
Don't call bindTexture from GrGLProgram

Updates GrGLProgram to tell the gpu object which textures it wants
bound, instead of calling bindTexture directly. This begins to break
its dependence on the specific GrGLGpu object.

BUG=skia:

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

9 years agoAllows windowed apps to be built on the Mac just by writing a SkOSWindow subclass...
bsalomon [Thu, 18 Jun 2015 18:49:42 +0000 (11:49 -0700)]
Allows windowed apps to be built on the Mac just by writing a SkOSWindow subclass without needing nib/plist files.

Makes visualbench work on the Mac.

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

9 years agoRevert of Work around for nexus 6 TexSubImage issue (patchset #4 id:60001 of https...
joshualitt [Thu, 18 Jun 2015 18:49:18 +0000 (11:49 -0700)]
Revert of Work around for nexus 6 TexSubImage issue (patchset #4 id:60001 of https://codereview.chromium.org/1173203005/)

Reason for revert:
breaks gms

Original issue's description:
> Work around for nexus 6 TexSubImage issue
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/c69fe20ef35df0776b179cbd5ce4d1bdc0ba4090

TBR=bsalomon@google.com,joshualitt@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

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

9 years agoWork around for nexus 6 TexSubImage issue
joshualitt [Thu, 18 Jun 2015 18:07:09 +0000 (11:07 -0700)]
Work around for nexus 6 TexSubImage issue

BUG=skia:

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

9 years agoRemove FT_HAS_COLOR definition.
bungeman [Thu, 18 Jun 2015 17:48:08 +0000 (10:48 -0700)]
Remove FT_HAS_COLOR definition.

The intent was to define FT_HAS_COLOR when building with a pre
2.5.1 version of FreeType for forward compatibility. However,
the definition here is wrong and also never used.

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

9 years agoPlumb through out_row byte length so we can assert we stay underneath it.
mtklein [Thu, 18 Jun 2015 17:30:32 +0000 (10:30 -0700)]
Plumb through out_row byte length so we can assert we stay underneath it.

Sadly, not asserting for me yet.  Can't hurt.

BUG=chromium:491660

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

9 years agoTry again to rename one SkJpegUtility.h to remove ambiguity.
mtklein [Thu, 18 Jun 2015 16:58:57 +0000 (09:58 -0700)]
Try again to rename one SkJpegUtility.h to remove ambiguity.

This time rename the new codec one, which is not referenced externally.

BUG=skia:

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

9 years agoAdd support for creating texture backed images where Skia will delete the texture.
bsalomon [Thu, 18 Jun 2015 16:12:16 +0000 (09:12 -0700)]
Add support for creating texture backed images where Skia will delete the texture.

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

9 years agoRemove separate SP enabled SKP run since it is now on by default
rmistry [Thu, 18 Jun 2015 14:52:13 +0000 (07:52 -0700)]
Remove separate SP enabled SKP run since it is now on by default

Yesterday's RecreateSKPs_Canary run looks good:
http://build.chromium.org/p/client.skia.fyi/builders/Housekeeper-Nightly-RecreateSKPs_Canary/builds/143

The generated SKPs look very reasonably sized:
gs://chromium-skia-gm/playback_386/skps

BUG=skia:
NOTRY=true

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

9 years agoRemove unused SkTypeface_android.h.
bungeman [Thu, 18 Jun 2015 14:46:58 +0000 (07:46 -0700)]
Remove unused SkTypeface_android.h.

This file had one declaration in it which actually affected the
SkFontMgr and had nothing to do with typefaces specifically. As a
result, the declaration was moved to SkFontMgr_android.h. Now that
the users have been updated, remove this now unused file.

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

9 years agoUpdate android perf script
msarett [Thu, 18 Jun 2015 13:29:48 +0000 (06:29 -0700)]
Update android perf script

BUG=skia:

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

9 years agoAdd test for SkRegion::writeToMemory.
scroggo [Thu, 18 Jun 2015 13:16:36 +0000 (06:16 -0700)]
Add test for SkRegion::writeToMemory.

When calling SkRegion::writeToMemory(NULL), it should return the same
number of bytes that it writes when calling
SkRegion::writeToMemory(buffer). Add a test to confirm this.

BUG=b/21271229

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

9 years agoAdd useDFT field to SkDeviceProperties
robertphillips [Thu, 18 Jun 2015 12:27:18 +0000 (05:27 -0700)]
Add useDFT field to SkDeviceProperties

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

9 years agoAdd sk_parallel_for()
mtklein [Wed, 17 Jun 2015 22:26:15 +0000 (15:26 -0700)]
Add sk_parallel_for()

This should be a drop-in replacement for most for-loops to make them run in parallel:
   for (int i = 0; i < N; i++) { code... }
   ~~~>
   sk_parallel_for(N, [&](int i) { code... });

This is just syntax sugar over SkTaskGroup to make this use case really easy to write.
There's no more overhead that we weren't already forced to add using an interface like batch(),
and no extra heap allocations.

I've replaced 3 uses of SkTaskGroup with sk_parallel_for:
  1) My unit tests for SkOnce.
  2) Cary's path fuzzer.
  3) SkMultiPictureDraw.
Performance should be the same.  Please compare left and right for readability. :)

BUG=skia:

No public API changes.
TBR=reed@google.com

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

9 years agoRevert of Bump up point where we switch to distance fields for large glyphs (patchset...
jvanverth [Wed, 17 Jun 2015 20:06:48 +0000 (13:06 -0700)]
Revert of Bump up point where we switch to distance fields for large glyphs (patchset #1 id:1 of https://codereview.chromium.org/1184153004/)

Reason for revert:
Seeing some Nexus 4 perf regressions in individual tests in Chromium that may be due to this change. This doesn't appear to be the correct fix for the bug in any case.

Original issue's description:
> Bump up point where we switch to distance fields for large glyphs
>
> This is hopefully a temporary fix. It's unclear why distance fields
> are so much slower on the N4 (and N7).
>
> BUG=chromium:467569
>
> Committed: https://skia.googlesource.com/skia/+/0fce1fb02d93e66d42528f322f8aa4ca64ff0fb2

TBR=joshualitt@google.com,bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:467569

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

9 years agoMove Android SkFontMgr::Factory to its own file.
bungeman [Wed, 17 Jun 2015 19:07:10 +0000 (12:07 -0700)]
Move Android SkFontMgr::Factory to its own file.

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

9 years agoSkSemaphore: use SYNC_POLICY_LIFO on Mach.
mtklein [Wed, 17 Jun 2015 18:49:04 +0000 (11:49 -0700)]
SkSemaphore: use SYNC_POLICY_LIFO on Mach.

Turns out _LIFO does work as we expected, keeping N < M threads active when we
have M live threads but only N units of work to do at a time.  Also as we
expected _FIFO does round-robin through the threads.

Performance doesn't seem to be affected, but let's do it anyway.
If nothing else this makes profiles a little easier to read.

I don't see POSIX or Windows equivalents.

BUG=skia:

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

9 years agoadd guard for SkData proc change
reed [Wed, 17 Jun 2015 18:48:57 +0000 (11:48 -0700)]
add guard for SkData proc change

BUG=skia:
NOTRY=True
TBR=

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

9 years agoAdd and use SkSemaphore
mtklein [Wed, 17 Jun 2015 17:50:25 +0000 (10:50 -0700)]
Add and use SkSemaphore

This allows a faster implementation of our SkTaskGroup thread pool.
It also means we don't need SkCondVar (which, remember, isn't supported on XP.)

Doing some testing with SampleApp, this really cuts down on the overhead from SkTaskGroup, e.g. 30% to 10%.

BUG=skia:

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

9 years agoImproved subset benchmarks
msarett [Wed, 17 Jun 2015 17:28:22 +0000 (10:28 -0700)]
Improved subset benchmarks

I think these changes to the subset benchmarks cover what we discussed yesterday.

I removed the divisor benchmarks (2x2, 3x3) and changed the single subset benchmarks.

Also, we will no longer benchmark subset decodes on small images.

BUG=skia:

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

9 years agosimplify release-proc for SkData, removing unneeded size param
reed [Wed, 17 Jun 2015 16:58:24 +0000 (09:58 -0700)]
simplify release-proc for SkData, removing unneeded size param

request https://codereview.chromium.org/1184953005 to land first

BUG=skia:

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

9 years agoAdd signcla verifier to skia.
sheyang [Wed, 17 Jun 2015 16:15:51 +0000 (09:15 -0700)]
Add signcla verifier to skia.

This verifier is just informative now.

BUG=457428

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

9 years agoinitialize firstDir
caryclark [Wed, 17 Jun 2015 15:46:12 +0000 (08:46 -0700)]
initialize firstDir

Good catch by Florin; the variable was indeed uninitialized in
the complex followed by concave case.

R=fmalita@google.com
BUG=skia:3953

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

9 years agoMove FontConfig factory into separate file.
bungeman [Wed, 17 Jun 2015 14:55:59 +0000 (07:55 -0700)]
Move FontConfig factory into separate file.

This moves the SkFontMgr::Factory implementation which creates a
FontMgr around FontConfig into its own file, and allows the user
to create one manually.

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

9 years agoModernize atomics in SkTaskGroup's threadpool.
mtklein [Wed, 17 Jun 2015 14:53:22 +0000 (07:53 -0700)]
Modernize atomics in SkTaskGroup's threadpool.

    - Use SkAtomic<int32_t> for pending work count so we're statically
      forced to operate on it with atomic methods.
    - Replacing old methods like sk_atomic_inc/dec gives us finer control
      over which barriers we need for each operation.

No public API changes.
TBR=reed@google.com

BUG=skia:

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

9 years agoMake GrTextContext be owned by the GrDrawContext
robertphillips [Wed, 17 Jun 2015 12:43:33 +0000 (05:43 -0700)]
Make GrTextContext be owned by the GrDrawContext

This CL makes the GrTextContext be owned (and hidden) by the GrDrawContext. This funnels all the drawText* calls through the GrDrawContext and hides the (dispreferred) GrPipelineBuilder drawText variant.

Some consequences of this are:

GrDrawContext now has to get the text drawing settings (i.e., SkDeviceProperties & useDFT). This means that we need a separate GrDrawContext for each combination of pixel geometry and DFT-use.

All the GrTextContext-derived classes now get a back pointer to the originating GrDrawContext so their method calls no longer take one.

Committed: https://skia.googlesource.com/skia/+/5b16e740fe6ab6d679083d06f07651602265081b

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

9 years agoAvoid unnecessary comparison if both Typeface are NULL
jin.a.yang [Wed, 17 Jun 2015 11:47:18 +0000 (04:47 -0700)]
Avoid unnecessary comparison if both Typeface are NULL

BUG=skia:

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

9 years agoRevert of Make GrTextContext be owned by the GrDrawContext (patchset #7 id:120001...
bsalomon [Tue, 16 Jun 2015 22:03:11 +0000 (15:03 -0700)]
Revert of Make GrTextContext be owned by the GrDrawContext (patchset #7 id:120001 of https://codereview.chromium.org/1175553002/)

Reason for revert:
Breaking Test-Win8-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug ?

https://build.chromium.org/p/client.skia/builders/Test-Win8-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug/builds/436/steps/dm/logs/stdio

Original issue's description:
> Make GrTextContext be owned by the GrDrawContext
>
> This CL makes the GrTextContext be owned (and hidden) by the GrDrawContext. This funnels all the drawText* calls through the GrDrawContext and hides the (dispreferred) GrPipelineBuilder drawText variant.
>
> Some consequences of this are:
>
> GrDrawContext now has to get the text drawing settings (i.e., SkDeviceProperties & useDFT). This means that we need a separate GrDrawContext for each combination of pixel geometry and DFT-use.
>
> All the GrTextContext-derived classes now get a back pointer to the originating GrDrawContext so their method calls no longer take one.
>
> Committed: https://skia.googlesource.com/skia/+/5b16e740fe6ab6d679083d06f07651602265081b

TBR=joshualitt@chromium.org,joshualitt@google.com,jvanverth@google.com,reed@google.com,robertphillips@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

9 years agoRemove SkOSWindow_Mac.cpp
bsalomon [Tue, 16 Jun 2015 21:21:01 +0000 (14:21 -0700)]
Remove SkOSWindow_Mac.cpp

TBR=reed@google.com

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

9 years agoLoad visualbench pictures one at a time.
bsalomon [Tue, 16 Jun 2015 20:52:18 +0000 (13:52 -0700)]
Load visualbench pictures one at a time.

Add flag to run in windowed mode.

NOPRESUBMIT=true

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

9 years agoAdd a note to SkGlobalInitialization_chromium.cpp.
mtklein [Tue, 16 Jun 2015 20:23:03 +0000 (13:23 -0700)]
Add a note to SkGlobalInitialization_chromium.cpp.

BUG=chromium:486947

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

9 years agoMove closeWindow()/setFullscreen()/setVSynv() from SkWindow to SkOSWindow
bsalomon [Tue, 16 Jun 2015 19:47:25 +0000 (12:47 -0700)]
Move closeWindow()/setFullscreen()/setVSynv() from SkWindow to SkOSWindow

Rename setFullscreen to makeFullscreen, drop the param, return a bool.

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

9 years agoMake GrTextContext be owned by the GrDrawContext
robertphillips [Tue, 16 Jun 2015 19:23:47 +0000 (12:23 -0700)]
Make GrTextContext be owned by the GrDrawContext

This CL makes the GrTextContext be owned (and hidden) by the GrDrawContext. This funnels all the drawText* calls through the GrDrawContext and hides the (dispreferred) GrPipelineBuilder drawText variant.

Some consequences of this are:

GrDrawContext now has to get the text drawing settings (i.e., SkDeviceProperties & useDFT). This means that we need a separate GrDrawContext for each combination of pixel geometry and DFT-use.

All the GrTextContext-derived classes now get a back pointer to the originating GrDrawContext so their method calls no longer take one.

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

9 years agoAllow skia_win.cpp to be compiled in CONSOLE or GUI mode.
bsalomon [Tue, 16 Jun 2015 19:21:00 +0000 (12:21 -0700)]
Allow skia_win.cpp to be compiled in CONSOLE or GUI mode.

Make visualbench and SampleApp build in CONSOLE mode so that we can see stdout.

I verified that by undoing the gyp modifications both tools will build as GUI.

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

9 years agofix null-pointer deref in SkComposeShader::toString()
halcanary [Tue, 16 Jun 2015 18:53:26 +0000 (11:53 -0700)]
fix null-pointer deref in SkComposeShader::toString()

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

9 years agonanobench: split CPU and GPU .SKP tile sizes.
mtklein [Tue, 16 Jun 2015 17:41:27 +0000 (10:41 -0700)]
nanobench: split CPU and GPU .SKP tile sizes.

Let's make CPU-bound .SKP benching mimic Chrome's tiles.
Unfortunately, the CPU code also performs a lot better with those big wide tiles...

BUG=skia:

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

9 years agoFix dst bound reported by SkTileImageFilter
robertphillips [Tue, 16 Jun 2015 16:44:56 +0000 (09:44 -0700)]
Fix dst bound reported by SkTileImageFilter

In the example from the bug we had the filter DAG:

color filter (table)
    0: xfermode filter (arith)
        0: tile filter [0,80,34,114] -> [0,80,800,480]
             0: color filter (table)
                 0: bitmap src 34x34 -> [0,80,34,114]
        1: color filter (table)
             0: picture filter [0, 80, 800, 480]

computeFastBounds was coming out of the DAG with a bound of [0,80,34,114] which didn't represent the pixels that would be drawn.

This CL updates SkTileImageFilter to correctly set the bound for the pixels it will hit.

BUG=493783

Committed: https://skia.googlesource.com/skia/+/05be93bbdf09576f7903130e3b106b0a8c7c4b4e

Committed: https://skia.googlesource.com/skia/+/0be685755f942baea26c66a87226b569fc17e960

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

9 years agoskia: Add runtime option to disable picture IO security precautions
hendrikw [Tue, 16 Jun 2015 16:28:37 +0000 (09:28 -0700)]
skia: Add runtime option to disable picture IO security precautions

Replaced the compile time file IO security setting with a runtime setting.

Unfortunately the setting is global.

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

9 years agoBump up point where we switch to distance fields for large glyphs
jvanverth [Tue, 16 Jun 2015 15:46:24 +0000 (08:46 -0700)]
Bump up point where we switch to distance fields for large glyphs

This is hopefully a temporary fix. It's unclear why distance fields
are so much slower on the N4 (and N7).

BUG=chromium:467569

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

9 years agoDon't clear in SkSurface::NewWrappedRenderTarget
bsalomon [Tue, 16 Jun 2015 15:07:16 +0000 (08:07 -0700)]
Don't clear in SkSurface::NewWrappedRenderTarget

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

9 years agoThere are still things to sort out but this seems to run correctly.
bsalomon [Tue, 16 Jun 2015 14:04:43 +0000 (07:04 -0700)]
There are still things to sort out but this seems to run correctly.

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

9 years agoRefactor SkFontHost_linux into SkFontMgr_custom.
bungeman [Mon, 15 Jun 2015 22:17:21 +0000 (15:17 -0700)]
Refactor SkFontHost_linux into SkFontMgr_custom.

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

9 years agoRemove the SkCanvas comment API
fmalita [Mon, 15 Jun 2015 20:15:31 +0000 (13:15 -0700)]
Remove the SkCanvas comment API

No longer used in Chromium/Blink.

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

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

9 years agowin32: post invalidation rectangle to OS directly in SkOSWindow::onHandleInval()
bsalomon [Mon, 15 Jun 2015 19:49:55 +0000 (12:49 -0700)]
win32: post invalidation rectangle to OS directly in SkOSWindow::onHandleInval()

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

9 years agoDisable direction pre-caching to suss out TSAN failures.
mtklein [Mon, 15 Jun 2015 19:27:20 +0000 (12:27 -0700)]
Disable direction pre-caching to suss out TSAN failures.

Our bots don't seem to mind / see the race... let's see if Chrome's do.

BUG=chromium:496982

TBR=reed@google.com

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

9 years agoConvert PictureRenderer to SkPaintFilterCanvas
fmalita [Mon, 15 Jun 2015 18:48:16 +0000 (11:48 -0700)]
Convert PictureRenderer to SkPaintFilterCanvas

This removes the last client of SkDrawFilter.

BUG=skia:3587
R=mtklein@google.com,robertphillips@google.com

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

9 years agoThorough tests for saturatedAdd and mulDiv255Round.
mtklein [Mon, 15 Jun 2015 17:58:42 +0000 (10:58 -0700)]
Thorough tests for saturatedAdd and mulDiv255Round.

BUG=skia:3951

Committed: https://skia.googlesource.com/skia/+/ce9d11189a5924b47c3629063b72bae9d466c2c7

CQ_EXTRA_TRYBOTS=client.skia.android:Test-Android-GCC-Nexus5-CPU-NEON-Arm7-Release-Trybot

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

9 years agoBlacklist ARM from advanced blend
cdalton [Mon, 15 Jun 2015 17:52:11 +0000 (10:52 -0700)]
Blacklist ARM from advanced blend

BUG=skia:

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

9 years agoRevert of Thorough tests for saturatedAdd and mulDiv255Round. (patchset #1 id:1 of...
mtklein [Mon, 15 Jun 2015 17:03:41 +0000 (10:03 -0700)]
Revert of Thorough tests for saturatedAdd and mulDiv255Round. (patchset #1 id:1 of https://codereview.chromium.org/1184113003/)

Reason for revert:
https://code.google.com/p/skia/issues/detail?id=3951

Original issue's description:
> Thorough tests for saturatedAdd and mulDiv255Round.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/ce9d11189a5924b47c3629063b72bae9d466c2c7

TBR=fmalita@chromium.org,mtklein@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

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

9 years agoInvalidate GrTexture mipmap on content change notification
junov [Mon, 15 Jun 2015 16:48:15 +0000 (09:48 -0700)]
Invalidate GrTexture mipmap on content change notification

This fix is necessary to correctly propagate invalidations that
are external to skia. For example, when drawing video or WebGL
into a 2D canvas in Chrome, with mipmaps enabled.

BUG=crbug.com/498356
TEST=GrTextureMipMapInvalidationTest

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

9 years agoRevert "Remove ambiguity of SkJpegUtility name."
scroggo [Mon, 15 Jun 2015 16:10:03 +0000 (09:10 -0700)]
Revert "Remove ambiguity of SkJpegUtility name."

TBR=mtklein

This reverts commit 93858b49a9f3bd3037d61822c095ef59199870af.

This revert should fix the Android framework build.

NOTREECHECKS=True
NOTRY=True

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

9 years agoThorough tests for saturatedAdd and mulDiv255Round.
mtklein [Mon, 15 Jun 2015 15:58:22 +0000 (08:58 -0700)]
Thorough tests for saturatedAdd and mulDiv255Round.

BUG=skia:

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

9 years agoWhen --mpd is true, run _mpd variants first, then non-mpd.
mtklein [Mon, 15 Jun 2015 15:56:38 +0000 (08:56 -0700)]
When --mpd is true, run _mpd variants first, then non-mpd.

This makes it easier to benchmark _mpd variants in a profiler.

E.g.,

<profiler> out/Release/nanobench --images --config 8888 --loops -1 --match sp_desk_nytimes

BUG=skia:

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

9 years agodon't rely on fonts having a stream
caryclark [Mon, 15 Jun 2015 15:05:06 +0000 (08:05 -0700)]
don't rely on fonts having a stream

Portable fonts don't have streams, so expect the stream open
to fail.

R=bungeman@google.com
TBR=cdalton@nvidia.com

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

9 years agoAdd markdown for GPU wrangler.
bsalomon [Mon, 15 Jun 2015 14:16:57 +0000 (07:16 -0700)]
Add markdown for GPU wrangler.
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=1177313006

TBR=rmistry@google.com

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

9 years agoUse SkPaintFilterCanvas for SampleApp paint filtering
fmalita [Mon, 15 Jun 2015 14:07:32 +0000 (07:07 -0700)]
Use SkPaintFilterCanvas for SampleApp paint filtering

(one less SkDrawFilter user)

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

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

9 years agoRemove SkDrawPictureCallback
fmalita [Mon, 15 Jun 2015 13:56:22 +0000 (06:56 -0700)]
Remove SkDrawPictureCallback

No longer used in Chromium.

R=reed@google.com

[mtklein mischief]
No one objects to removing dead API...
TBR=reed@google.com

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

9 years agoRevert of Revert of make gm background colors 565 compatible (patchset #1 id:1 of...
caryclark [Mon, 15 Jun 2015 13:51:08 +0000 (06:51 -0700)]
Revert of Revert of make gm background colors 565 compatible (patchset #1 id:1 of https://codereview.chromium.org/1184123002/)

Reason for revert:
underlying problem with portable refs deleted more than once fixed

Original issue's description:
> Revert of make gm background colors 565 compatible (patchset #2 id:20001 of https://codereview.chromium.org/1176243006/)
>
> Reason for revert:
> breaks many bots with refcnt error
>
> Original issue's description:
> > make gm background colors 565 compatible
> >
> > Change a batch of GM tests to convert their background color
> > so that it is representable in 8888 and 565.
> >
> > Enable portable text in those same tests to minimize platform
> > differences.
> >
> > In a couple of bitmap tests, use portable typefaces instead of
> > choosing 'Times' which may or may not be available on the platform.
> >
> > R=borenet@google.com
> >
> > Committed: https://skia.googlesource.com/skia/+/be7f768a357aefb39c42d24b81b24d647bb6ab70
>
> TBR=borenet@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Committed: https://skia.googlesource.com/skia/+/0bdb08b1ba8fbd18c4838f86a23f1ef4b3a3bfdf

TBR=borenet@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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