Commit Graph

17759 Commits

Author SHA1 Message Date
reed
871872f3f2 change old picture serialization to really handle images
BUG=skia:3965

Review URL: https://codereview.chromium.org/1199473002
2015-06-22 12:48:26 -07:00
joshualitt
c1f56b5182 fix for calling bindFragDataLocation on OpenGL 2.1
BUG=skia:3966

Review URL: https://codereview.chromium.org/1201623003
2015-06-22 12:31:32 -07:00
robertphillips
efbffedd68 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
2015-06-22 12:06:08 -07:00
mtklein
343c7d15c8 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
2015-06-22 11:00:48 -07:00
joshualitt
fef3fad272 fix spurious init on VisualBench startup
BUG=skia:

Review URL: https://codereview.chromium.org/1202023002
2015-06-22 10:44:46 -07:00
emmaleer
0a4c3cbfd7 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
2015-06-22 10:40:21 -07:00
mtklein
059ac00446 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
2015-06-22 10:39:38 -07:00
robertphillips
9a53fd7c41 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
2015-06-22 09:46:59 -07:00
reed
462a33c7ac clean offsetimagefilter gm
BUG=skia:
TBR=robertphilips

Review URL: https://codereview.chromium.org/1203473002
2015-06-22 09:10:14 -07:00
jvanverth
34d7288b19 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
2015-06-22 08:08:09 -07:00
jvanverth
4854d13c27 Remove distance field flag from SkPaint
Review URL: https://codereview.chromium.org/1192413005
2015-06-22 06:46:56 -07:00
joshualitt
01f38915e1 Fixup android launch script to launch VisualBench as well as SampleApp
BUG=skia:

Review URL: https://codereview.chromium.org/1185473003
2015-06-22 05:39:32 -07:00
kkinnunen
78cff136a4 Make GrGLProgramDataManager not refcounted
Make GrGLProgramDataManager not refcounted, refcounting is not used for
the instances.

Review URL: https://codereview.chromium.org/1195573002
2015-06-21 22:55:12 -07:00
skia.buildbots
a45e6d2d79 Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=
NO_MERGE_BUILDS

Review URL: https://codereview.chromium.org/1194233002
2015-06-21 00:17:25 -07:00
reed
dab1f60d12 remove SK_SUPPORT_LEGACY_OPTIONLESS_GET_PIXELS (now in SkUserConfig.h)
BUG=skia:
TBR=
NOTRY=True

Review URL: https://codereview.chromium.org/1200623003
2015-06-20 08:45:59 -07:00
robertphillips
7b05ff11eb Rename all things "leaky" in SkDevice
Review URL: https://codereview.chromium.org/1198603002
2015-06-19 14:14:55 -07:00
joshualitt
b7134b64c6 Fix for assert in VisualBench
BUG=skia:

Review URL: https://codereview.chromium.org/1198433004
2015-06-19 12:46:33 -07:00
robertphillips
fcf7829b67 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
2015-06-19 11:49:52 -07:00
jvanverth
97c595f304 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
2015-06-19 11:06:28 -07:00
egdaniel
393551e338 Move rect_memcopy from helper to global static.
BUG=skia:

Review URL: https://codereview.chromium.org/1197713003
2015-06-19 10:52:25 -07:00
msarett
7054257de9 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
2015-06-19 07:44:05 -07:00
msarett
a0c414d7b4 Prevent webp from producing 0 dimensional images
BUG=skia:

Review URL: https://codereview.chromium.org/1196643002
2015-06-19 07:34:30 -07:00
joshualitt
b8e0b4a328 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
2015-06-19 07:28:15 -07:00
robertphillips
8b1fa6dd8d Fix precision error in https://codereview.chromium.org/1188433011/
TBR=reed@google.com

Review URL: https://codereview.chromium.org/1192853002
2015-06-19 06:40:02 -07:00
robertphillips
20eee3f047 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
2015-06-19 05:14:26 -07:00
bungeman
13a007d9df 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
2015-06-19 05:09:39 -07:00
robertphillips
9fc8275a9b Remove gamma field from SkDeviceProperties
Review URL: https://codereview.chromium.org/1189223002
2015-06-19 04:46:45 -07:00
reed
ce777c9ea3 remove deprecated NewRasterPMColor
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1192353002
2015-06-19 03:42:56 -07:00
fmalita
9aa9e716ec 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
2015-06-18 14:34:53 -07:00
joshualitt
83bc229703 Work around for nexus 6 TexSubImage issue
BUG=skia:

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

Review URL: https://codereview.chromium.org/1173203005
2015-06-18 14:18:03 -07:00
reed
35a5261085 privatize
BUG=skia:
TBR=bsalomon@google.com

Review URL: https://codereview.chromium.org/1189173005
2015-06-18 14:05:07 -07:00
joshualitt
5599996b72 disable floating point textures if GLSL version is < 330
BUG=skia:

Review URL: https://codereview.chromium.org/1178723007
2015-06-18 13:47:10 -07:00
jvanverth
932d413e69 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
2015-06-18 13:46:46 -07:00
reed
7ab04d949b remove dead guarded code for legacy SkData proc
BUG=skia:

Review URL: https://codereview.chromium.org/1173173007
2015-06-18 13:42:03 -07:00
reed
de49988bc2 add callbacks to Images that wrap client-provided content
BUG=skia:

Review URL: https://codereview.chromium.org/1169553003
2015-06-18 13:41:40 -07:00
senorblanco
d7395d82d5 Initialize the sample config for wrapped RTs to kUnified.
BUG=skia:3958

Review URL: https://codereview.chromium.org/1177163005
2015-06-18 13:26:52 -07:00
joshualitt
74953c388c Modify android_install_app to install VisualBench
BUG=skia:

Review URL: https://codereview.chromium.org/1181973008
2015-06-18 13:08:26 -07:00
scroggo
6f5e619b87 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
2015-06-18 12:53:43 -07:00
reed
bedd0e87e6 remove SkData proc guard
BUG=skia:
NOTRY=True

Review URL: https://codereview.chromium.org/1188773008
2015-06-18 12:11:36 -07:00
cdalton
4271765d11 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
2015-06-18 11:54:31 -07:00
bsalomon
241b56db1d 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
2015-06-18 11:49:42 -07:00
joshualitt
274980cda1 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
2015-06-18 11:49:18 -07:00
joshualitt
c69fe20ef3 Work around for nexus 6 TexSubImage issue
BUG=skia:

Review URL: https://codereview.chromium.org/1173203005
2015-06-18 11:07:09 -07:00
bungeman
1e23736f59 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
2015-06-18 10:48:08 -07:00
mtklein
cd08effd00 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
2015-06-18 10:30:32 -07:00
mtklein
525e90ab92 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
2015-06-18 09:58:57 -07:00
bsalomon
6dc6f5f4a1 Add support for creating texture backed images where Skia will delete the texture.
Review URL: https://codereview.chromium.org/1187523005
2015-06-18 09:12:17 -07:00
rmistry
4c58e085b2 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
2015-06-18 07:52:14 -07:00
bungeman
7b7c844bca 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
2015-06-18 07:46:58 -07:00
msarett
b3ec76b34f Update android perf script
BUG=skia:

Review URL: https://codereview.chromium.org/1185293006
2015-06-18 06:29:48 -07:00