Commit Graph

17915 Commits

Author SHA1 Message Date
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
scroggo
d49f48ddf7 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
2015-06-18 06:16:36 -07:00
robertphillips
bcd7ab5c0d Add useDFT field to SkDeviceProperties
Review URL: https://codereview.chromium.org/1191943002
2015-06-18 05:27:18 -07:00
mtklein
00b621cfc0 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
2015-06-17 15:26:15 -07:00
jvanverth
5a9e2994c9 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
2015-06-17 13:06:48 -07:00
bungeman
77f85adadb Move Android SkFontMgr::Factory to its own file.
Review URL: https://codereview.chromium.org/1190993002
2015-06-17 12:07:10 -07:00
mtklein
2a4685f8bb 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
2015-06-17 11:49:04 -07:00
reed
c292ad4c1d add guard for SkData proc change
BUG=skia:
NOTRY=True
TBR=

Review URL: https://codereview.chromium.org/1178023003
2015-06-17 11:48:57 -07:00
mtklein
61fa22be10 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
2015-06-17 10:50:25 -07:00
msarett
ab80e35fbd 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
2015-06-17 10:28:22 -07:00
reed
6b7f34e34c 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
2015-06-17 09:58:25 -07:00
sheyang
12555d7efb Add signcla verifier to skia.
This verifier is just informative now.

BUG=457428

Review URL: https://codereview.chromium.org/1193433003
2015-06-17 09:15:52 -07:00
caryclark
d83f4955a5 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
2015-06-17 08:46:12 -07:00
bungeman
0b1de2626a 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
2015-06-17 07:56:00 -07:00
mtklein
942e99b9c4 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
2015-06-17 07:53:22 -07:00
robertphillips
2334fb655f 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
2015-06-17 05:43:33 -07:00
jin.a.yang
48fc0ea272 Avoid unnecessary comparison if both Typeface are NULL
BUG=skia:

Review URL: https://codereview.chromium.org/1177833004
2015-06-17 04:47:18 -07:00
bsalomon
781d58215f 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
2015-06-16 15:03:11 -07:00
bsalomon
e3b22dc742 Remove SkOSWindow_Mac.cpp
TBR=reed@google.com

Review URL: https://codereview.chromium.org/1186393006
2015-06-16 14:21:01 -07:00
bsalomon
45171e20b3 Load visualbench pictures one at a time.
Add flag to run in windowed mode.

NOPRESUBMIT=true

Review URL: https://codereview.chromium.org/1183193003
2015-06-16 13:52:19 -07:00
mtklein
921827bbc7 Add a note to SkGlobalInitialization_chromium.cpp.
BUG=chromium:486947

Review URL: https://codereview.chromium.org/1193453004
2015-06-16 13:23:03 -07:00
bsalomon
85ab55114f 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
2015-06-16 12:47:25 -07:00
robertphillips
5b16e740fe 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
2015-06-16 12:23:47 -07:00
bsalomon
48297f72fb 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
2015-06-16 12:21:00 -07:00
halcanary
8464a960b8 fix null-pointer deref in SkComposeShader::toString()
Review URL: https://codereview.chromium.org/1185893007
2015-06-16 11:53:26 -07:00
mtklein
bf9e600069 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
2015-06-16 10:41:27 -07:00
robertphillips
c3176aa5e5 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
2015-06-16 09:44:56 -07:00
hendrikw
446ee67fda 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
2015-06-16 09:28:37 -07:00
jvanverth
0fce1fb02d 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
2015-06-16 08:46:24 -07:00
bsalomon
7a61793d96 Don't clear in SkSurface::NewWrappedRenderTarget
Review URL: https://codereview.chromium.org/1191513002
2015-06-16 08:07:16 -07:00
bsalomon
1e7951ffdb There are still things to sort out but this seems to run correctly.
Review URL: https://codereview.chromium.org/1187643002
2015-06-16 07:04:43 -07:00
bungeman
5cf19498f9 Refactor SkFontHost_linux into SkFontMgr_custom.
Review URL: https://codereview.chromium.org/1184923002
2015-06-15 15:17:21 -07:00
fmalita
109a23d64f 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
2015-06-15 13:15:31 -07:00
bsalomon
e0ef4a7157 win32: post invalidation rectangle to OS directly in SkOSWindow::onHandleInval()
Review URL: https://codereview.chromium.org/1190563002
2015-06-15 12:49:55 -07:00
mtklein
256cc89c48 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
2015-06-15 12:27:20 -07:00
fmalita
5042020d01 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
2015-06-15 11:48:16 -07:00
mtklein
3747875341 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
2015-06-15 10:58:43 -07:00
cdalton
07a8fc827b Blacklist ARM from advanced blend
BUG=skia:

Review URL: https://codereview.chromium.org/1191523003
2015-06-15 10:52:11 -07:00
mtklein
b1bbca8049 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
2015-06-15 10:03:41 -07:00
junov
da5469d7bc 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
2015-06-15 09:48:15 -07:00
scroggo
27631bd593 Revert "Remove ambiguity of SkJpegUtility name."
TBR=mtklein

This reverts commit 93858b49a9.

This revert should fix the Android framework build.

NOTREECHECKS=True
NOTRY=True

Review URL: https://codereview.chromium.org/1187463005
2015-06-15 09:10:03 -07:00
mtklein
ce9d11189a Thorough tests for saturatedAdd and mulDiv255Round.
BUG=skia:

Review URL: https://codereview.chromium.org/1184113003
2015-06-15 08:58:22 -07:00
mtklein
c751ecb368 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
2015-06-15 08:56:38 -07:00
caryclark
f5c633f95d 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
2015-06-15 08:05:06 -07:00
bsalomon
1692bd12b5 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
2015-06-15 07:16:57 -07:00