Commit Graph

17904 Commits

Author SHA1 Message Date
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
fmalita
822ace9001 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
2015-06-15 07:07:32 -07:00
fmalita
fd674ddbd6 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
2015-06-15 06:56:22 -07:00
caryclark
65cdba6ba7 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
2015-06-15 06:51:08 -07:00
caryclark
f53ce808e9 call portable font cleanup only once at app end
R=mtklein@google.com

Review URL: https://codereview.chromium.org/1180593005
2015-06-15 06:48:30 -07:00
caryclark
0bdb08b1ba 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

Review URL: https://codereview.chromium.org/1184123002
2015-06-15 05:28:00 -07:00
caryclark
be7f768a35 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

Review URL: https://codereview.chromium.org/1176243006
2015-06-15 05:09:59 -07:00
Takahiro.Aizawa
b5b50a07ab SkGIFMovie: Fix corrupted background color
The 'paintingColor' in onGetBitmap() was used to save the entire
gif's background color while filling the 1st frame of a gif image,
since it is 'static' qualified, so when re-entering this function
for subsequent frames, this saved value will be used directly without
re-obtaining it.
But if asynchronous playing multi gif files in single process without
being controlled, this 'static' will make the 'paintingColor'
corrupted, because the different SkGIFMovie instances hold the same
reference of 'paintingColor'.

Signed-off-by: Lu Tong <lu.x.tong@sonymobile.com>;

BUG=skia:

Review URL: https://codereview.chromium.org/1184083002
2015-06-15 02:52:46 -07:00
halcanary
eee0e4e9d3 SkPDF: Annotations are clipped by canvas clip stack.
Also, remove some SkPDFDevice functions.

Will fix this GM: http://crrev.com/1159273003

BUG=skia:3872

Review URL: https://codereview.chromium.org/1148263005
2015-06-14 11:04:58 -07:00
skia.buildbots
245c850034 Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=
NO_MERGE_BUILDS

Review URL: https://codereview.chromium.org/1183033002
2015-06-14 00:20:12 -07:00
bungeman
c0c4d75da4 The correct case of 'sdl' directory in gyp.
The 'sdl' directory is lower case, but the gyp files refer to it
with upper case.
2015-06-12 17:24:51 -04:00
cdalton
626e1ffe84 Import functionality for new GL backend
Brings in the following functionality:

  ARB_draw_instanced
  ARB_instanced_arrays
  NV_bindless_texture
  EXT_direct_state_access
  KHR_debug

Also cleans up some of the NVPR extension loading.

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/202c4c75fb806f751cf796850bf67fe9793e0643

Review URL: https://codereview.chromium.org/1185573003
2015-06-12 13:56:46 -07:00