Commit Graph

19349 Commits

Author SHA1 Message Date
senorblanco
4449398b32 Make SkImageFilter::applyCropRect() optionally compute srcBounds.
BUG=skia:4526

Review URL: https://codereview.chromium.org/1410553007
2015-10-28 14:17:17 -07:00
scroggo
a3f792d4d4 Rename SkScaledCodec.cpp to SkSampledCodec.cpp
Review URL: https://codereview.chromium.org/1413363008
2015-10-28 14:06:10 -07:00
mtklein
7de63d50d4 Android framework builds can't see cpu-features.h
Don't try to do NEON detection for Android framework builds.

BUG=skia:

Review URL: https://codereview.chromium.org/1423953004
2015-10-28 13:45:59 -07:00
joshualitt
b5068fce36 Update deps to pull sdl
BUG=skia:

Review URL: https://codereview.chromium.org/1425033003
2015-10-28 13:28:54 -07:00
mtklein
bbba16878f nanobench: fix and simplify --samplingTime
Recent changes to WallTimer broke --samplingTime.  In particular, this idiom became nonsensical:
   WallTimer timer;
   timer.start();
   do {
     ...
     timer.end();
   } while(timer.fWall < ...);

WallTimer started making private use of fWall between when start() and end() were called, so the second time around the loop we end up with nonsense.

If that makes no sense, don't worry.  The code here using now_ms() is just as fast, just as precise, and clearer.

I took the opportunity to simplify --samplingTime <complicated string parsing> to --ms <int>, and to simplify the code that depends on it.

BUG=skia:

Review URL: https://codereview.chromium.org/1419103004
2015-10-28 11:36:30 -07:00
senorblanco
87e066ee80 Change saveLayer() semantics to take unfiltered bounds.
For optimizing saveLayer() offscreens, it is useful to know the
bounds of the primitive being drawn. Currently, the bounds passed to
saveLayer() are filtered, which makes it difficult to know the original
bounds of the primitive. This CL changes the semantics to accept
unfiltered bounds. This actually simplifies the callsites too. In
order to result in the correct pixels being produced, we then call
computeFastBounds() inside clipRectBounds().

The old behaviour is wrapped in #ifdef SK_SAVE_LAYER_BOUNDS_ARE_FILTERED,
until we can update Chrome's callsites (see
https://codereview.chromium.org/1316243002/).

This change will affect the following GMs:
testimagefilters: saveLayer bounds no longer cause clipping
imagefiltersbase: slight pixel diffs
resizeimagefilter: slight pixel diffs on the "high quality" test case
imagefilterscropexpand: displacement results are now correct
filterfastbounds: slight pixel diffs
matriximagefilter: slight pixel diffs

BUG=skia:3194 skia:4526

Review URL: https://codereview.chromium.org/1304883004
2015-10-28 11:23:36 -07:00
robertphillips
544b9aa9e7 Remove gpu-side clip mask merging from clip mask manager
In the clip mask merging path, the CMM creates new renderTargets and draws to them. In the non-MDB world this is okay b.c. all the draws land in the same drawTarget anyway. In the MDB world the draws for the new renderTargets have to land in different drawTargets.

This can be resolved by a lot of plumbing and refactoring to create drawContexts for the created renderTargets or by removing the mask-merging drawing path.

Since, https://codereview.chromium.org/1424853002/ (Disable gpu-side clip mask merging in the clip mask manager), appears to have stuck, this CL removes the clip mask merging code.

BUG=skia:4094
BUG=skia:4519

Review URL: https://codereview.chromium.org/1418073005
2015-10-28 11:01:41 -07:00
senorblanco
d5fa77ff6a SkBlurImageFilter_opt.h: break conditions into separate loops.
This gives ~15% improvement on blur_image on Linux Z620,
and should allow me to implement cropping without
incurring a perf hit.

BUG=skia:
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review URL: https://codereview.chromium.org/1426583004
2015-10-28 10:26:06 -07:00
mtklein
e4881b6f2b add a note
BUG=skia:

Review URL: https://codereview.chromium.org/1405083008
2015-10-28 10:02:06 -07:00
mtklein
72815e9b15 move reinterpret_cast into SK_PREFETCH
no public API changes
TBR=reed@google.com

BUG=skia:

Review URL: https://codereview.chromium.org/1419573011
2015-10-28 09:52:20 -07:00
mtklein
bdef140b50 Send SkDebugf through stderr and flush on Windows too.
This makes it consistent with Linux/Mac.  There, stderr is not buffered, so the flush is not needed / implicit.

BUG=skia:

Review URL: https://codereview.chromium.org/1419073003
2015-10-28 09:50:31 -07:00
mtklein
24a592c2ef Make bin/c and bin/compare work on Windows.
- Call python explicitly.
  - Drop numpy dependency (on numpy.mean.... come on.)
  - Make scipy dependency optional.

Depends on https://codereview.chromium.org/1419073003 to really work.

BUG=skia:

Doesn't change code.
NOTRY=true

Review URL: https://codereview.chromium.org/1416833004
2015-10-28 09:45:44 -07:00
scroggo
27a58348b2 Add missing include for sleep().
This used to be leaked unconditionally by libc++.

Change-Id: I984ab7328ff3a2499c3c89a6862feaa62b6166de

Author: Dan Albert<danalbert@google.com>

Cherry-pick of https://android-review.googlesource.com/#/c/178189/1

This fixes the AOSP mips build.

Review URL: https://codereview.chromium.org/1425843003
2015-10-28 08:56:41 -07:00
hendrikw
9a7404188e skia: Add ANGLE support on Mac
I want to be able to compare ANGLE vs CommandBuffer for
dm and nanobench on Mac, so enabling ANGLE on mac.

Review URL: https://codereview.chromium.org/1395783003
2015-10-28 08:42:29 -07:00
bsalomon
100b8f8c07 Remove min texture size support
BUG=skia:4524

Review URL: https://codereview.chromium.org/1430643002
2015-10-28 08:37:44 -07:00
egdaniel
018fb62d12 Create GLSL base class for ProgramDataManager
BUG=skia:

Review URL: https://codereview.chromium.org/1428543003
2015-10-28 07:26:40 -07:00
bsalomon
fe6876280f Make SkOSWindow windows implementation use CS_OWNDC in its window class
TBR=joshualitt@google.com

Review URL: https://codereview.chromium.org/1413213005
2015-10-28 06:29:44 -07:00
kkinnunen
177519e5be Disable CHROMIUM_bind_uniform_location due to a spec bug
Bound uniforms that are optimized away causes GL errors
when they are used.

The bound location becomes unused if its bound uniform is
optimized away. Updating the inactive uniform using the
bound location causes a GL error from the command buffer.

Alternatively, command buffer may bind another free, unbound
uniform to the bound location. This causes the uniform update to
update the wrong uniform.

Disable the extension until the spec can be clarified and the
implementation fixed, if possible and needed.

BUG=skia:4454

Review URL: https://codereview.chromium.org/1417633008
2015-10-28 06:18:35 -07:00
senorblanco
963037c121 Refactor SkBlurImageFilter_Opts.h.
Refactor box_blur() into a single driver function which
SSE*, NEON and generic code paths can use. I've used macros
to do this in order to keep debug performance reasonable,
but it's fairly ugly. I'm open to other suggestions.

BUG=skia:
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review URL: https://codereview.chromium.org/1408003007
2015-10-27 14:39:31 -07:00
herb
6440f0b09e Add shared mutexes to the direct write cache code to get better parallelism.
BUG=547182

Review URL: https://codereview.chromium.org/1424093002
2015-10-27 14:37:00 -07:00
halcanary
337797580d Make SkTextBlob::RunIterator public.
Motivation: This will be easier than adding a friend every time I want
to create a one-off SkCanvas subclass or SkRemote::Encoder subclass.

See also: SkPath::Iter.

Review URL: https://codereview.chromium.org/1411723005
2015-10-27 14:01:05 -07:00
hendrikw
aef4971443 skia: Roll latest angle
Required to fix a mac build error with command buffer, and possible
memory allocation issue when used with skia_angle on linux.

Review URL: https://codereview.chromium.org/1413403005
2015-10-27 13:34:31 -07:00
msarett
c37799282f Make DMSrcSink fail fatally when decodeRegion() fails for BRDSrcs
This involves disabling webps for kCanvas_Strategy.
We have not yet implemented webp subset decodes for this
strategy.

BUG=skia:4521

Review URL: https://codereview.chromium.org/1405273004
2015-10-27 13:28:25 -07:00
msarett
3f65e93b19 Add NewFromStream and getEncodedFormat to BitmapRegionDecoder
The function will be needed in Android.

BUG=skia:

Review URL: https://codereview.chromium.org/1425833002
2015-10-27 13:12:59 -07:00
mtklein
6885a1e7c0 Make SK_PREFETCH work on Windows too.
- Use _mm_prefetch() if available, e.g. with MSVC.
- Some other tidying up.

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

BUG=skia:

Review URL: https://codereview.chromium.org/1427663002
2015-10-27 13:06:47 -07:00
msarett
35e5d1b449 Refactor SkBitmapRegionDecoderInterface for Android
The result SkBitmap, the pixel allocator, and the alpha
preference need to be communicated from the client to
the region decoder.

BUG=skia:

Review URL: https://codereview.chromium.org/1418093006
2015-10-27 12:50:25 -07:00
mtklein
f7c0822911 Default off LTCG for human builds.
It's absurdly slow.

We can turn it back on with

skia> python gyp_skia -Dskia_win_ltcg=1

The bots will automatically define skia_is_bot and skia_win_ltcg.

BUG=skia:

Review URL: https://codereview.chromium.org/1407043009
2015-10-27 11:24:40 -07:00
hendrikw
855dc9395f skia: Fix command buffer support on the mac
The extension on the mac is .dylib, updated the name.

EGL.h isn't available on mac (unless we include skia_angle.h).
I've got a somewhat bad hack of defining the types that I need
to get this running.

GetProcedureAddress was somehow successfully grabbing gl
functions from another lib.  Removed this call, I copied it
from ANGLE impl, but it isn't required.

lib load path works differently, fixed in GYP

BUG=skia:2992

Review URL: https://codereview.chromium.org/1403153002
2015-10-27 10:04:34 -07:00
robertphillips
423e337782 Disable gpu-side clip mask merging in the clip mask manager
In the MDB world the clip mask manager would need to create a separate drawContext for each temporary mask (and we would need to support stencil draws in the drawContext). For now, disable the feature.

Please see skbug.com/4519 (Re-enable gpu-side mask merging in Ganesh)

BUG=skia:4094

Review URL: https://codereview.chromium.org/1424853002
2015-10-27 09:23:38 -07:00
benjaminwagner
aada3e802d Remove SkJpegCodec.cpp from Google3 BUILD due to differing libjpeg_turbo versions.
BUG=skia:4520

Review URL: https://codereview.chromium.org/1418423008
2015-10-27 09:14:29 -07:00
bungeman
13dd023882 Update Android FreeType version.
Update FreeType to a newer version. Because this caused issues in
finding the correct ftoptions.h and ftmodule.h [1], be sure to state
the ones we want explicitly.

This also add gzip.c which is needed for WOFF support [2].

[1] FreeType "Simplify header file hierarchy."
    fae382076409db198dfbff36ac4cbb97b05b30a1

[2] FreeType "[gzip] New function `FT_Gzip_Uncompress'."
    dc240524ff31891a442225430b28e9620c1fa89f

Review URL: https://codereview.chromium.org/833103004
2015-10-27 08:39:39 -07:00
scroggo
27c172885f Update CodexTest for 565
All our codecs now support 565, so no need to have a boolean to check
it.

Review URL: https://codereview.chromium.org/1414553006
2015-10-27 08:14:46 -07:00
robertphillips
cf10b5a432 Cosmetic portion of reverted "Fix ClipMaskManager's SW-fallback logic" CL
This CL isolates the cosmetic portion so the functional portion is clearer. It relies on https://codereview.chromium.org/1412883005/ (Fix ClipMaskManager's SW-fallback logic (take 2))

Review URL: https://codereview.chromium.org/1422023003
2015-10-27 07:53:35 -07:00
robertphillips
3f7357f1a0 Fix ClipMaskManager's SW-fallback logic (take 2)
https://codereview.chromium.org/1421533007/ (Fix ClipMaskManager's SW-fallback logic) had a logic error in it. It did not take into account createAlphaClipMask's fallback to non-Stenciled drawing (in drawElement).

This CL adds that logic and strips out the unnecessary changes (for clarity).

Review URL: https://codereview.chromium.org/1412883005
2015-10-27 07:17:33 -07:00
msarett
90978148e7 Fix DMSrcSink bug
We want to request premultiplied decodes.

BUG=skia:

Review URL: https://codereview.chromium.org/1419403003
2015-10-27 07:12:24 -07:00
bsalomon
e91f7b5cec Move scissor state to GrAppliedClip
Review URL: https://codereview.chromium.org/1385233002
2015-10-27 06:42:50 -07:00
robertphillips
4d8762f8b0 Fix up the clip mask manager's creation of paths (w.r.t. volatility)
I don't expect this to make any difference (perf-wise) but it seems more correct.

This CL relies on https://codereview.chromium.org/1421533007/ (Fix ClipMaskManager's SW-fallback logic)

Committed: https://skia.googlesource.com/skia/+/953fe3139fa60ce56abcfa45a3647d924e637083

Review URL: https://codereview.chromium.org/1419403002
2015-10-26 14:37:03 -07:00
robertphillips
24cdec1744 Revert of Fix ClipMaskManager's SW-fallback logic (patchset #4 id:60001 of https://codereview.chromium.org/1421533007/ )
Reason for revert:
Logic may be incorrect

Original issue's description:
> Fix ClipMaskManager's SW-fallback logic
>
>
> 'useSWOnlyPath' was not correctly toggling between stencil and color draws so there was a mismatch with the behavior in createAlphaClipMask (i.e., we were inadvertently rendering some of the elements in a clip using SW but using stenciling for others - precisely what 'useSWOnlyPath' was intended to prevent).
>
> Committed: https://skia.googlesource.com/skia/+/5c3ea4cd3921e8904d4f201bcdedfd5b8a726542

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

Review URL: https://codereview.chromium.org/1426443008
2015-10-26 14:12:25 -07:00
robertphillips
ee7d516d4b Revert of Fix up the clip mask manager's creation of paths (w.r.t. volatility) (patchset #1 id:1 of https://codereview.chromium.org/1419403002/ )
Reason for revert:
Logic may be incorrect

Original issue's description:
> Fix up the clip mask manager's creation of paths (w.r.t. volatility)
>
> I don't expect this to make any difference (perf-wise) but it seems more correct.
>
> This CL relies on https://codereview.chromium.org/1421533007/ (Fix ClipMaskManager's SW-fallback logic)
>
> Committed: https://skia.googlesource.com/skia/+/953fe3139fa60ce56abcfa45a3647d924e637083

TBR=jvanverth@google.com,bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1415413007
2015-10-26 14:11:15 -07:00
cdalton
e6d2024c68 Flush GrContext between benchmark draw loops
This change updates a small subset of benchmarks to flush the GrContext
between draw loops (specifically SKP benchmarks, SampleApp, and the
warmup in visualbench). This helps improve timing accuracy by not
allowing the gpu to batch across draw boundaries in the affected
benchmarks.

BUG=skia:

Review URL: https://codereview.chromium.org/1427533002
2015-10-26 13:45:29 -07:00
cdalton
c70483f5ab Add visualbench option for device-independent fonts
BUG=skia:

Review URL: https://codereview.chromium.org/1421723004
2015-10-26 13:14:36 -07:00
joshualitt
6db78d74fa Fix visualbench exiting on startup on android
BUG=skia:

Review URL: https://codereview.chromium.org/1416123003
2015-10-26 12:00:42 -07:00
benjaminwagner
86ea33e963 Enable BUILD file compilation of skia and dm with --config=android_arm.
Corresponding google3 cl is 105687529.

BUG=skia:

Review URL: https://codereview.chromium.org/1414643002
2015-10-26 10:46:25 -07:00
robertphillips
87ed6be0e4 Get debugger compiling again
Recent house cleaning has broken the debugger - mainly around the defunct profiling feature. This makes CL it even more defunct.

Review URL: https://codereview.chromium.org/1416723006
2015-10-26 09:28:12 -07:00
robertphillips
953fe3139f Fix up the clip mask manager's creation of paths (w.r.t. volatility)
I don't expect this to make any difference (perf-wise) but it seems more correct.

This CL relies on https://codereview.chromium.org/1421533007/ (Fix ClipMaskManager's SW-fallback logic)

Review URL: https://codereview.chromium.org/1419403002
2015-10-26 09:27:52 -07:00
egdaniel
0a48233783 Fix GLCaps order for CoreProfile
TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1417503005
2015-10-26 08:59:10 -07:00
mtklein
e092cee9ad CMake: exclude SkOSLibrary_posix.cpp on Windows too.
BUG=skia:
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac10.9-Clang-x86_64-Release-CMake-Trybot

Review URL: https://codereview.chromium.org/1414983004
2015-10-26 08:41:10 -07:00
egdaniel
cb7ba1eafc Make appending default precision be controled by GLSL
BUG=skia:

Review URL: https://codereview.chromium.org/1403373012
2015-10-26 08:38:26 -07:00
robertphillips
5c3ea4cd39 Fix ClipMaskManager's SW-fallback logic
'useSWOnlyPath' was not correctly toggling between stencil and color draws so there was a mismatch with the behavior in createAlphaClipMask (i.e., we were inadvertently rendering some of the elements in a clip using SW but using stenciling for others - precisely what 'useSWOnlyPath' was intended to prevent).

Review URL: https://codereview.chromium.org/1421533007
2015-10-26 08:33:10 -07:00
caryclark
950305ec77 fix for teeny strokes
Pass the scale before evaluating degenerate line segments.

This does not change other GMs.

R=reed@google.com
BUG=478337

Review URL: https://codereview.chromium.org/1418133007
2015-10-26 08:17:04 -07:00