Commit Graph

22583 Commits

Author SHA1 Message Date
brianosman
25d57db234 Request an sRGB FBO0 on Android. Fixes sRGB GL mode.
Tried to comment my logic, but it's totally possible that we run on some
device where this doesn't work. From a strict reading of the relevant
specs, what I'm doing shouldn't work on the Nexus 5X, but it's necessary
to get correct results.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2054223002

Review-Url: https://codereview.chromium.org/2054223002
2016-06-13 07:49:07 -07:00
update-skps
d2ebe49e1f Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=
NO_MERGE_BUILDS
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2065433003

Review-Url: https://codereview.chromium.org/2065433003
2016-06-13 04:10:29 -07:00
reed
3cc37d3db3 tweak mipmap_srgb gm to use integer coordinates
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2061553002

TBR=

Review-Url: https://codereview.chromium.org/2061553002
2016-06-11 04:48:12 -07:00
bsalomon
cadb5a24c2 Make large array of GrShapes in test code heap allocated
TBR=mtklein@chormium.org
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2058343002

Review-Url: https://codereview.chromium.org/2058343002
2016-06-10 18:28:06 -07:00
csmartdalton
2b5f2cbf0d Move multisampleDisableSupport into GrCaps
Non-platform code needs this information in order to make rendering
decisions.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2062443002

Review-Url: https://codereview.chromium.org/2062443002
2016-06-10 14:06:32 -07:00
mtklein
f10637f279 Type-erase SkAutoMutexAcquire and SkAutoExclusive.
This is purely for convenience, to not need to write the lock type
in the guard anymore.  This should all inline away.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2055023003

Review-Url: https://codereview.chromium.org/2055023003
2016-06-10 13:56:35 -07:00
reed
8151103535 fix non-square stroke rects (non-aa)
fiddle showing bug: https://fiddle.skia.org/c/a21ecf5e33da84f52eba26e8c2f3d280

BUG=skia:5408
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2060543002

Review-Url: https://codereview.chromium.org/2060543002
2016-06-10 13:21:07 -07:00
herb
7df9e4a87d Make SkBlitter hierarchy explicit about what needs to be implemented.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2053823002

Review-Url: https://codereview.chromium.org/2053823002
2016-06-10 13:01:27 -07:00
kjlubick
a233620f9c Remove shaderc cmake compiling
It is no longer needed as of https://skia.googlesource.com/skia/+/b7b4293524e0c1d4c1635c4710aceafaca47b313

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2060503002

Review-Url: https://codereview.chromium.org/2060503002
2016-06-10 12:54:37 -07:00
bungeman
57c948251a Implement SkFontMgr_Custom::onCreateFromFontData.
This fixes serialization issues. We could create a non-default gx
typeface, but not deserialize it correctly.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2057293002

Review-Url: https://codereview.chromium.org/2057293002
2016-06-10 12:43:17 -07:00
csmartdalton
656dbe4c71 Fix GrDrawContextPriv::stencilRect
Updates stencilRect to not call getFillRectBatch. This method can
return a batch that uses coverage AA, which isn't appropriate for
stencil draws.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2057613003

Review-Url: https://codereview.chromium.org/2057613003
2016-06-10 12:32:58 -07:00
bsalomon
687d9d2ecc Extend inverse_paths GM to test dashing
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2057213002

Review-Url: https://codereview.chromium.org/2057213002
2016-06-10 12:09:59 -07:00
kjlubick
b7b4293524 Create .gyp rules for shaderc libraries
To build shaderc, gyp used to punt to cmake, which did not work well on the bots and I couldn't find any way to pipe the variables into cmake which would have made it happy.

So, I wrote a gyp file for shaderc and its dependencies.  Nothing super complicated (thank goodness), except for the files that spirv-tools needed generated.

BUG=skia:5186
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2047833003

Review-Url: https://codereview.chromium.org/2047833003
2016-06-10 12:07:50 -07:00
reed
6644d9353f respect srgb gamma when building mips
Proposed policy:
- If the target is *legacy* (e.g. L32/PMColor) ignore gamma
- If the target is S32/F16 respect gamma

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2029373004

Review-Url: https://codereview.chromium.org/2029373004
2016-06-10 11:41:47 -07:00
bsalomon
7049396b65 Make GrShape capable of representing inverse filled rrects.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2056523002

Review-Url: https://codereview.chromium.org/2056523002
2016-06-10 08:05:14 -07:00
caryclark
013e0e6d48 add fail condition to addexpanded
If coincident pairs don't match,
give up rather than deref null.

R=fmalita@chromium.org
BUG=618991
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2058773002

Review-Url: https://codereview.chromium.org/2058773002
2016-06-10 07:59:50 -07:00
djsollen
9207caebbb Cleanup VulkanWindowContext for use on Android
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2058763002

Review-Url: https://codereview.chromium.org/2058763002
2016-06-10 07:50:00 -07:00
bsalomon
ea406dde3c Add blurcircles to blacklist for macmini4.1
BUG=skia:5414
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2053373002

Review-Url: https://codereview.chromium.org/2053373002
2016-06-10 06:58:16 -07:00
egdaniel
5dfe7bbcfd Define LEAN_AND_MEAN and NOMINMAX for all windows builds
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2055223002

Review-Url: https://codereview.chromium.org/2055223002
2016-06-10 06:42:45 -07:00
bungeman
4772bd537d Implement all onCreateFromStream overloads.
The custom font manager does not implement all onCreateFromStream
overloads leading to warnings. Since this needs to be implemented
anyway, implement it now.

BUG=skia:5412

Review-Url: https://codereview.chromium.org/2053903003
2016-06-10 04:14:51 -07:00
csmartdalton
739bbb2dad Fix glDraw*Indirect prototypes
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2050403002

Review-Url: https://codereview.chromium.org/2050403002
2016-06-09 19:42:38 -07:00
mtklein
c9b4ccd771 Skip verylargebitmap serialization on Android too
I'm trying to figure out why we've been skipping serialize-8888 for these.
They don't draw wrong.  Seems like they just eat up all memory while serializing,
maybe only in Debug mode.

This should fix the red Nexus9 bot.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2050423003

Review-Url: https://codereview.chromium.org/2050423003
2016-06-09 18:57:21 -07:00
mtklein
e18fa440e7 Move immintrin/arm_neon includes to where they are used.
On my Mac (so, immintrin), this improves compile time, both wall and cpu,
by about 16%.  To test I ran this on an SSD with files hot in their caches:

  $ env CC=/usr/bin/clang CXX=/usr/bin/clang++ ./gyp_skia && \
    ninja -C out/Release -t clean && \
    time ninja -C out/Release

  Before: 159 wall / 3367 cpu
          159 wall / 3368 cpu

  After:  137 wall / 2860 cpu
          136 wall / 2863 cpu

I also tried further refining immintrin down to emmintrin / tmmintrin / smmintrin etc.
That made no signficant difference, so I've kept immintrin for its simplicity.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2045633002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

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

Committed: https://skia.googlesource.com/skia/+/12dfaaa53c23f3d03050bde8f64136ac1f44164a
Review-Url: https://codereview.chromium.org/2045633002
2016-06-09 13:40:56 -07:00
jbauman
b445a57e6c Add NV12 texture conversion support.
If textures 1 and 2 passed into MakeFromYUVTexturesCopy are the same,
then treat the input as NV12 and sample from the g component of texture
2.

BUG=skia:5209
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2016593002

Review-Url: https://codereview.chromium.org/2016593002
2016-06-09 13:24:48 -07:00
brianosman
9a3fbf7e55 Add control of manual mipmapping to GrContextOptions
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2054623003

Committed: https://skia.googlesource.com/skia/+/97e398d98928f9497063594ebe633efe2d0f4968
Review-Url: https://codereview.chromium.org/2054623003
2016-06-09 13:11:08 -07:00
djsollen
7e73108a37 Cleanup needed to use WindowContext for Android
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2055693003

Review-Url: https://codereview.chromium.org/2055693003
2016-06-09 13:07:13 -07:00
borenet
09b4224be3 Add housekeeper_skia.isolate
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2054883002

Review-Url: https://codereview.chromium.org/2054883002
2016-06-09 12:58:11 -07:00
senorblanco
ea97673563 SkPictureAnalyzer: expose the number of slow GPU commands.
BUG=614724
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2031243003

Review-Url: https://codereview.chromium.org/2031243003
2016-06-09 12:43:30 -07:00
mtklein
2843c42e59 Revert of Disable tail calls inside Simple GM functions. (patchset #1 id:1 of https://codereview.chromium.org/2050473006/ )
Reason for revert:
Appears to have broken Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug

Original issue's description:
> Disable tail calls inside Simple GM functions.
>
> I haven't found any way to turn off the particular optimization (-foptimize-sibling-calls)
> per-function, but I can control optimization settings coarsely:
>
>    - on GCC, we can pick a particular -O level, so I've picked -O1 which does not
>      enable -foptimize-sibling-calls
>    - on Clang, we can only disable all optimization for a function
>    - have no idea about MSVC
>
> This should make sure the simple GM functions, e.g. all_bitmap_configs_GM(),
> show up on stack traces when we crash.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2050473006
>
> Committed: https://skia.googlesource.com/skia/+/eee3ced68f787aadc47fa274ca8e13b354ec920a

TBR=reed@google.com,mtklein@chromium.org
BUG=skia:

CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug-Trybot

Review-Url: https://codereview.chromium.org/2051193002
2016-06-09 12:20:25 -07:00
mtklein
e239547269 Revert of Add control of manual mipmapping to GrContextOptions (patchset #2 id:20001 of https://codereview.chromium.org/2054623003/ )
Reason for revert:
https://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-Golo-GPU-GT610-x86_64-Debug-ASAN/builds/3481/steps/test_skia%20on%20Ubuntu/logs/stdio

../../../src/gpu/gl/GrGLCaps.cpp:554:25: runtime error: load of value 187, which is not a valid value for type 'bool'
SUMMARY: AddressSanitizer: undefined-behavior ../../../src/gpu/gl/GrGLCaps.cpp:554:25 in
step returned non-zero exit code: 1

Original issue's description:
> Add control of manual mipmapping to GrContextOptions
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2054623003
>
> Committed: https://skia.googlesource.com/skia/+/97e398d98928f9497063594ebe633efe2d0f4968

TBR=bsalomon@google.com,brianosman@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/2050373002
2016-06-09 12:20:10 -07:00
liyuqian
71491dc14c Support resize in Android Viewer App
Previously, we took out resize because Vulkan didn't support it in
Android. Now Android nyc-dev builds >= 2937079 and nyc-release builds >=
NRD66 supports it so we add it back.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2050613003

Review-Url: https://codereview.chromium.org/2050613003
2016-06-09 12:02:34 -07:00
msarett
804b461bc4 SkPixmap::setColorSpace
Landed for reed@ with bug fix:
Use default copy constructor for SkDraw

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2057563002

patch from issue 2057563002 at patchset 1 (http://crrev.com/2057563002#ps1)

Review-Url: https://codereview.chromium.org/2052943002
2016-06-09 11:03:45 -07:00
mtklein
96e4e1ca5a Add raw pixel serialization fallback for SkImages that cannot be encoded.
This fixes serialize-8888 for 2 GMs on Mac that I'm now unblacklisting.
I think another was already fixed, and two more were Windows-only.

Seems safe to use encoded_size=1 as another sentinel here (like we already
use =0); I can't imagine any encoded image format that can encode an image
in a single byte.

I suspect this is the root of the referenced bug too,
but this is a good idea even if not.

BUG=chromium:601851
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2039813007

CQ_EXTRA_TRYBOTS=client.skia:Test-Win-MSVC-GCE-CPU-AVX2-x86_64-Release-Trybot,Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Release-Trybot;client.skia.android:Test-Android-GCC-Nexus5-CPU-NEON-Arm7-Release-Trybot,Test-Android-GCC-Nexus9-CPU-Denver-Arm64-Release-Trybot

Review-Url: https://codereview.chromium.org/2039813007
2016-06-09 10:38:08 -07:00
mtklein
eee3ced68f Disable tail calls inside Simple GM functions.
I haven't found any way to turn off the particular optimization (-foptimize-sibling-calls)
per-function, but I can control optimization settings coarsely:

   - on GCC, we can pick a particular -O level, so I've picked -O1 which does not
     enable -foptimize-sibling-calls
   - on Clang, we can only disable all optimization for a function
   - have no idea about MSVC

This should make sure the simple GM functions, e.g. all_bitmap_configs_GM(),
show up on stack traces when we crash.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2050473006

Review-Url: https://codereview.chromium.org/2050473006
2016-06-09 10:30:04 -07:00
cblume
609623b47f SkMipMap::ComputeLevelSize should only cover SkMipMap's levels.
SkMipMap only deals with the levels it generates.
That is to day, it deals with mipmap levels 1-x, not 0-x.
Other functions reflect thing when indexing.
They go from 0 to x-1 (giving the index into SkMipMap's contents).

ComputeLevelSize should also follow that same indexing.

BUG=578304
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2042843005

Review-Url: https://codereview.chromium.org/2042843005
2016-06-09 09:44:33 -07:00
brianosman
97e398d989 Add control of manual mipmapping to GrContextOptions
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2054623003

Review-Url: https://codereview.chromium.org/2054623003
2016-06-09 09:39:58 -07:00
herb
7ccbc1ad04 Simplify code by breaking general sampler into Nearest and Bilerp.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2055513003

Review-Url: https://codereview.chromium.org/2055513003
2016-06-09 09:05:00 -07:00
mtklein
5b64dab5bc better exclusion for stack traces
Instead of two synchronization systems (in_signal_handler, gMutex),
we can just use one.  This simplifies the signal handler logic to:
   - first thread through grabs the lock, prints what's running and a stack trace,
     then exits
   - all other threads just sit waiting on that lock until exit kills them

Previously I think all threads were racing to exit, which can kill the process
before the printing thread is done.  That truncated the output, which is dumb.

Plus...
   refactor slightly so that crash_handler() shows up at the top of the stack
   trace rather than some odd name for a lambda inside setup_crash_handler().

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2051863002

Review-Url: https://codereview.chromium.org/2051863002
2016-06-09 08:59:48 -07:00
bungeman
06ca8ec87c sk_sp for Ganesh.
Convert use of GrFragmentProcessor, GrGeometryProcessor, and
GrXPFactory to sk_sp. This clarifies ownership and should
reduce reference count churn by moving ownership.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2041113004

Review-Url: https://codereview.chromium.org/2041113004
2016-06-09 08:01:03 -07:00
kjlubick
897a8e3887 Add ICC fuzzer
BUG=skia:5404
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2047353003

Review-Url: https://codereview.chromium.org/2047353003
2016-06-09 07:15:12 -07:00
rmistry
0b04fea228 Update CQ keywords documentation
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2056733002
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=2056733002

Review-Url: https://codereview.chromium.org/2056733002
2016-06-09 06:56:39 -07:00
msarett
8c5424cb77 SkColorSpace::NewICC fix integer overflow caught by fuzzer
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2053683002

Review-Url: https://codereview.chromium.org/2053683002
2016-06-09 06:33:19 -07:00
bsalomon
a058786ae3 Make SkDashPathEffect fail for stroke+fill style (in addition to fill style)
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2048183002

Review-Url: https://codereview.chromium.org/2048183002
2016-06-09 06:03:38 -07:00
msarett
a9e878c836 Optimize color xforms with 2.2 gammas for SSE2
Because we recognize commonly used gamma tables and
parameters as 2.2f, about 98% of jpegs with color profiles
will pass through this xform (assuming the dst is also
2.2f).  Sample size is 10,322 jpegs.

I won't go crazy with performance numbers because this is
a work in progress, particularly in terms of correctness.

201295.jpg on HP z620
(300x280, most common form of sRGB profile)

Decode Time + QCMS Xform      1.28 ms
QCMS Xform Only               0.495 ms
Decode Time + Skia Opt Xform  1.01 ms
Skia Opt Xform Only           0.235 ms

Decode Time + Xform Speed-up  1.27x
Xform Only Speed-up           2.11x

FWIW, Skia xform time before these optimizations was
41.1 ms.  But we expected that code to be slow.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2046013002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review-Url: https://codereview.chromium.org/2046013002
2016-06-08 14:43:53 -07:00
herb
dd40483534 Use faster case for on tile sampling, and a little clean up. This has been a sampling bug and so was bypassed using "false &&". Found the sampling bug and added the case back in.
Remove long commented out code.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2044373003

Review-Url: https://codereview.chromium.org/2044373003
2016-06-08 14:33:15 -07:00
scroggo
faa9036ff1 Stop trying to build files that are not there
The bzl version of Skia does not have these files. Don't try to
build them.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2045263003

Review-Url: https://codereview.chromium.org/2045263003
2016-06-08 14:32:00 -07:00
egdaniel
066df7ca91 Add GpuCommandBuffer support.
Currently this is not actually hooked into the system.

To give some context, in a follow up CL I'll add this to GrDrawTarget.
For this I will move the gpu onDraw command to the GpuCommandBuffer as well.
For GL this will end up just being a pass through to a non virtual draw(...)
on GrGLGpu, and for vulkan it will mostly do what it currently does but
adding commands to the secondary command buffer instead.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2038583002

Review-Url: https://codereview.chromium.org/2038583002
2016-06-08 14:02:27 -07:00
brianosman
28215d44b3 Support running Viewer via android_gdb_app
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2055453003

Review-Url: https://codereview.chromium.org/2055453003
2016-06-08 13:07:08 -07:00
brianosman
e9906e71fb Fix mipmap generation on Nexus 5x & 6p devices.
Just like copyImage, these want the Z range of blit regions to be [0,
1], even for 2D resources where Z should be ignored.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2039913007

Review-Url: https://codereview.chromium.org/2039913007
2016-06-08 12:44:28 -07:00
liyuqian
2a437e6459 Provide filter when there are many options
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2047233003

Review-Url: https://codereview.chromium.org/2047233003
2016-06-08 11:17:09 -07:00