Commit Graph

18261 Commits

Author SHA1 Message Date
joshualitt
adcdca86ce Modifying TextBlobCacheTest to use SkRandomScalerContext
BUG=skia:

Review URL: https://codereview.chromium.org/1266003002
2015-07-31 07:44:11 -07:00
bsalomon
0aff2fa82a Also provides the ResourceProvider to onDrawPath which allows the DF PR to no longer require access to GrContext.
Review URL: https://codereview.chromium.org/1265763002
2015-07-31 06:48:27 -07:00
mtklein
99cab4e308 DM: track a direct/indirect bit for each Sink too.
The decoding tests can now veto indirect sinks like pipe-8888.

This moves Sink type detection from automatic to explicit; I can't think of any
way to automatically differentiate pipe-8888 from 8888 based only on the
output.  (They should ideally be identical, after all.)

BUG=skia:4138

Review URL: https://codereview.chromium.org/1263113002
2015-07-31 06:43:04 -07:00
joshualitt
58ff81b42b Remove unused field in micro cleanup
TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1268893002
2015-07-31 06:37:50 -07:00
bungeman
15bde1697a Fix repeat builds with Android.
Currently the SampleApp and VisualBench builds for Android don't work
for rebuilds. The code is re-built, but the apks are not. This
results from the use of a directory as 'output' and the action to
build the apk not depending on the copied libraries.

Review URL: https://codereview.chromium.org/1270643005
2015-07-31 06:33:21 -07:00
joshualitt
76cc6575a4 Tweak the MaskFormat in one more place in GrBatchFontCache
BUG=510931

Review URL: https://codereview.chromium.org/1268743002
2015-07-31 05:51:45 -07:00
robertphillips
a9652ac09e Address some SkLightingShader TODOs
This CL:
  switches the light colors to be 3 scalars (SkColor3f)
  adds some dox

Review URL: https://codereview.chromium.org/1265983003
2015-07-31 05:17:24 -07:00
borenet
850bbf1bb6 Add android_run_app.go
Launches an app, pipes its output, and exits when the app exits.

Loosely based on the old buildbot code in python:
https://skia.googlesource.com/buildbot/+/ac0663c599a443a4958c8cad5aefd25eb09eff58/slave/skia_slave_scripts/utils/android_utils.py

BUG=skia:4093

Review URL: https://codereview.chromium.org/1256353002
2015-07-31 04:13:38 -07:00
kkinnunen
d94708e71e Implement support for dual source blending in ES
Use EXT_blend_func_extended to implement dual source blending in OpenGL
ES. The extension is the ES version of ARB_blend_func_extended.

The extension provides gl_SecondaryFragColorEXT for ES 2.0 contexts.
The extension provides glBindFragDataLocationIndexed to bind a custom
fragment shader output to the secondary color for ES 3.0 contexts.

For ES 3.1 contexts, the extension would also give
"layout (location=0, index=1)" output varible layout modifier syntax,
but it is not used in this patch.

The extension needs #extension GL_EXT_blend_func_extended : require
directive for the variables to be available in ES 2.0. For ES 3.0, the
directive relaxes the rules for the amount of output variables without
layout location qualifiers.

OpenGL continues to use GL_ARB_blend_func_extended for dual source
blending.

Review URL: https://codereview.chromium.org/1266773003
2015-07-30 22:47:04 -07:00
kkinnunen
bf49e46aca Make it possible to toggle MSAA for ES (EXT_multisample_compatibility)
Make it possible to turn MSAA on and off for OpenGL ES, too.
Use EXT_multisample_compatibility.

The extension adds token:
        MULTISAMPLE_EXT                             0x809D

The token can be supplied to glEnable/glDisable/glGetInteger.

This is needed in order to support mixed samples in OpenGL ES. This is
important for path rendering Chromium command buffer integration.

Review URL: https://codereview.chromium.org/1270533002
2015-07-30 22:43:52 -07:00
reed
02d91d1873 lock pixels in image when bitmap is immutable and not-lazy
BUG=skia:

Review URL: https://codereview.chromium.org/1266143003
2015-07-30 20:13:43 -07:00
reed
4ed3dd613e fix empty image constructor
fBitmap was not fully constructed yet

BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1264773004
2015-07-30 19:10:35 -07:00
reed
80c772b2a4 unify pixelref and image ID space, so we can share IDs when we share pixels
I view this as a performance opportunity, not a feature or bug fix per-se.

BUG=skia:

Review URL: https://codereview.chromium.org/1266883002
2015-07-30 18:58:23 -07:00
bsalomon
58b4395b22 Disable SRGB support on PowerVR Rogue due to SRGBReadWritePixels failure
TBR=jvanverth@google.com
BUG=skia:4148

Review URL: https://codereview.chromium.org/1266933002
2015-07-30 16:27:50 -07:00
bsalomon
2aad5f1e6a Make TRecorder alloc_back return a void*
Speculative fix for this bug:

BUG=chromium:515679

TBR=robertphillips@google.com

Review URL: https://codereview.chromium.org/1268493003
2015-07-30 15:57:33 -07:00
bsalomon
16921ec30a SRGB read and write pixels working and unit test
Review URL: https://codereview.chromium.org/1264003002
2015-07-30 15:34:56 -07:00
joshualitt
381b26f03b find image whenever we generateGlyph. This should ensure the glyph is fully initialized before we start using the maskformat.
BUG=skia:

Review URL: https://codereview.chromium.org/1270573003
2015-07-30 12:43:17 -07:00
caryclark
159fa572c4 linear gradient with stops discretized gm
TBR=reed@google.com
BUG=skia:517

Review URL: https://codereview.chromium.org/1259983009
2015-07-30 12:35:48 -07:00
egdaniel
6d901da0ec Move some parts of onReadPixels up to GrGpu readPixels.
BUG=skia:

Review URL: https://codereview.chromium.org/1270583003
2015-07-30 12:02:15 -07:00
msarett
b46e5e2033 Rename SkCodec_libbmp to SkBmpCodec
BUG=skia:

Review URL: https://codereview.chromium.org/1254963006
2015-07-30 11:36:40 -07:00
scroggo
4358f13ac6 Call notifyPixelsChanged after modifying bitmap
In CodecSrc's scanline_subset test, we decode a subset of an image to a
bitmap, draw it to the canvas, and then repeat. This is fine for most
backends, but not for pipe. Pipe sees the same generation ID, so it
assumes it is the same bitmap it saw before, and just draws the
original one.

Call notifyPixelsChanged, so the bitmap will get a new generation ID,
fixing pipe.

BUG=skia:4138

Review URL: https://codereview.chromium.org/1265983004
2015-07-30 11:33:04 -07:00
nodir
f3782fa76f Build buckets: tryjob access
Allowed project-skia-tryjob-access group to schedule builds on public
skia build buckets

R=borenet@chromium.org, rmistry@chromium.org
BUG=495680

Review URL: https://codereview.chromium.org/1256333006
2015-07-30 10:32:27 -07:00
bungeman
24a104d946 Revert character in typeface test on Android.
This is a partial revert of f20488b4f2, particularly
https://skia.googlesource.com/skia/+/f20488b4f2139e6ca09fee7e39b731dd8ab467db%5E%21/#F11

BUG=chromium:515366
TBR=mtklein@google.com
This is a (non-automatic) revert.

Review URL: https://codereview.chromium.org/1265993003
2015-07-30 10:31:57 -07:00
robertphillips
c3eb50cd9e Minor cleanup of SkLightingShader
Fix:
  PM component swizzling on Macs
  Serialization

Review URL: https://codereview.chromium.org/1270533003
2015-07-30 10:11:42 -07:00
mtklein
f684a78d9e Runtime CPU detection for rsqrt().
This enables the NEON sk_float_rsqrt() code for configurations that have NEON at run-time but not compile-time.

These devices will see about a 2x (1.26 -> 2.33) slowdown in sk_float_rsqrt(), but it should be more precise than our portable fallback.

(When inlined, the portable fallback and the NEON code are almost identical in speed.  The only difference is precision.  Going through a function pointer is causing all this slowdown.  This is a good example of a place where Skia really benefits from compile-time NEON.)

BUG=skia:4117,skia:4114

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

Review URL: https://codereview.chromium.org/1264893002
2015-07-30 09:29:37 -07:00
joshualitt
4f19ca325e Dont try to draw glyphs with unexpected mask formats
BUG=510931

Review URL: https://codereview.chromium.org/1269743003
2015-07-30 07:59:20 -07:00
scroggo
ef004e1b49 Remove SK_LEGACY_IMAGE_GENERATOR_ENUMS_AND_OPTIONS
Now that Chrome no longer depends on it, remove dead code.

Review URL: https://codereview.chromium.org/1263013002
2015-07-30 07:47:45 -07:00
bsalomon
6cb3cbe8e6 Make GrGpu read/write pixels take GrSurface
Review URL: https://codereview.chromium.org/1262473004
2015-07-30 07:34:27 -07:00
mtklein
8317a1832f Lay groundwork for SkOpts.
This doesn't really do anything yet.  It's just the CPU detection code, skeleton new .cpp files, and a few little .gyp tweaks.

BUG=skia:4117

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

Review URL: https://codereview.chromium.org/1255193002
2015-07-30 07:30:16 -07:00
borenet
dbf9f014a8 buildbot_spec: Add configuration, do_*_steps, upload_*_results, more env
NOTRY=true
BUG=skia:4132

Review URL: https://codereview.chromium.org/1258193004
2015-07-30 07:09:20 -07:00
mtklein
6fbd79e4bf Revert of Optimize RGB16 blitH functions with NEON for ARM platform. (patchset #2 id:20001 of https://codereview.chromium.org/1229673008/)
Reason for revert:
This doesn't draw correctly, e.g. our GM test named dashcubics.

Good: https://gold.skia.org/img/images/0f7e8e226379afbad8a700e0a80fd8f1.png

Bad:
https://gold.skia.org/img/images/56ce15fc67436065a3db4b8ee31f13ae.png

Original issue's description:
> Optimize RGB16 blitH functions with NEON for ARM platform.
>
> Here are some performance resultsi on Nexus 9:
> SkRGB16BlitterBlitH_neon:
>     +--------+-----------+
>     |height  |  C/NEON   |
>     +--------+-----------+
>     |1       | 0.888531  |
>     +--------+-----------+
>     |8       | 1.231800  |
>     +--------+-----------+
>     |18      | 1.073327  |
>     +--------+-----------+
>     |32      | 1.136991  |
>     +--------+-----------+
>     |76      | 1.174638  |
>     +--------+-----------+
>     |85      | 1.188551  |
>     +--------+-----------+
>     |120     | 1.180261  |
>     +--------+-----------+
>     |128     | 1.183726  |
>     +--------+-----------+
>     |512     | 1.220806  |
>     +--------+-----------+
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/6c72d5740231f47c664a8e765a8df05cd124c88c

TBR=djsollen@google.com,caryclark@google.com,reed@google.com,bero@linaro.com,yang.zhang@linaro.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1268513003
2015-07-30 07:03:20 -07:00
caryclark
1864bfae63 add radial gradient hard stop test
TBR=reed@google.com
BUG=skia:4140

Review URL: https://codereview.chromium.org/1269723002
2015-07-30 06:41:39 -07:00
reed
6b38eabc16 add helper to create RSXform w/ anchorPt
BUG=skia:

Review URL: https://codereview.chromium.org/1269563006
2015-07-30 05:46:05 -07:00
yang.zhang
6c72d57402 Optimize RGB16 blitH functions with NEON for ARM platform.
Here are some performance resultsi on Nexus 9:
SkRGB16BlitterBlitH_neon:
    +--------+-----------+
    |height  |  C/NEON   |
    +--------+-----------+
    |1       | 0.888531  |
    +--------+-----------+
    |8       | 1.231800  |
    +--------+-----------+
    |18      | 1.073327  |
    +--------+-----------+
    |32      | 1.136991  |
    +--------+-----------+
    |76      | 1.174638  |
    +--------+-----------+
    |85      | 1.188551  |
    +--------+-----------+
    |120     | 1.180261  |
    +--------+-----------+
    |128     | 1.183726  |
    +--------+-----------+
    |512     | 1.220806  |
    +--------+-----------+

BUG=skia:

Review URL: https://codereview.chromium.org/1229673008
2015-07-30 05:37:06 -07:00
robertphillips
640898f588 Update SkLightingShader to take a localMatrix
W/o this we can't draw lit objects anywhere but the origin.

Review URL: https://codereview.chromium.org/1253223003
2015-07-30 05:09:17 -07:00
bungeman
a15cd9cb7f Remove WEBKIT_VERSION_MIN_REQUIRED and config.h.
WebKit style guide (https://www.webkit.org/coding/coding-style.html)
explicitly states:

> All implementation files must #include "config.h" first.
> Header files should never include "config.h".

Also, it isn't currently being used.

TBR=reed@google.com
This just removes unused bits.

Review URL: https://codereview.chromium.org/1256133004
2015-07-29 14:46:12 -07:00
fmalita
5479d3b569 Double free in ~SkPictureData()
On subpicture parsing failures we clean up all fPictureRefs entries
*and* delete the array itself.  But the destructor also deletes the
array => double free.

Alternatively, we can set fPictureCount to the number of successfully
parsed pictures such that the destructor handles all the cleanup.

BUG=515228
R=reed@google.com,mtklein@google.com

Review URL: https://codereview.chromium.org/1264503011
2015-07-29 14:40:06 -07:00
bungeman
3ac6b7551d Remove SK_BUILD_FOR SDL, BREW, and PALM.
SDL isn't an OS anyway, it's just a library views can use. Remaining
support for Brew was removed some time ago, and there are currently
no uses of SK_BUILD_FOR_PALM.

Review URL: https://codereview.chromium.org/1268573002
2015-07-29 13:37:27 -07:00
mtklein
0867943b9f Move the last headers. Cross your fingers.
If this doesn't work, one at a time...

BUG=skia:4126

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

Review URL: https://codereview.chromium.org/1255373006
2015-07-29 13:31:22 -07:00
mtklein
e88b1fb7a5 Move non-trivial constructors out-of-line.
There is more than one way to skin this SkPathPriv.h cat.

These constructors are large enough that they probably shouldn't have
been inlined like this anyway.

BUG=skia:4126

Review URL: https://codereview.chromium.org/1253963004
2015-07-29 13:14:05 -07:00
reed
3ae4701fe8 remove (unnecessary?) call to notifyPixelsChanged
BUG=skia:

Review URL: https://codereview.chromium.org/1265733002
2015-07-29 12:44:52 -07:00
bungeman
028205bedb Remove SK_BUILD_FOR_WINCE.
This hasn't been tested for years, and no one currently knows when it
last worked (if ever). It is doubtful that any of the remaining logic
would even make sense with a modern version of Embedded Compact 2013.

Review URL: https://codereview.chromium.org/1260453008
2015-07-29 12:34:25 -07:00
robertphillips
5f865b9cf1 Move LightingShader to effects
Additionally this CL:

forces the light colors to be opaque
forces the light direction to be normalized
adds a raster implementation
adds a gm

Review URL: https://codereview.chromium.org/1245883003
2015-07-29 12:28:04 -07:00
bungeman
f20488b4f2 Clean up a few includes, introduce iwyu.
The current include-what-you-use with current clang is much less
noisy and more useful than it has been in the past. This change
introduces a few IWYU directives (which are helpful documentation for
humans as well) and fixes a few sets of includes.

Review URL: https://codereview.chromium.org/1207893002
2015-07-29 11:49:40 -07:00
reed
26e0e587f7 SkImage_Raster's pixels are always immutable.
To make this work, we tag their pixelrefs as temporarily immutable, allowing
ourselves to restore the pixels to mutability only when the image drops away.

This should allow us to wobble back and forth between writing to the Surface
and reading from the Image without a COW, with the Surface seeing mutable
pixels and the Image seeing immutable pixels.

The big idea is, Image doesn't need forever-immutable pixels, it just needs
pixels that are immutable as long as it's alive.

BUG=skia:

patch from issue 804523002 at patchset 40001 (http://crrev.com/804523002#ps40001)

Review URL: https://codereview.chromium.org/1254383006
2015-07-29 11:44:52 -07:00
borenet
2481b8b719 buildbot_spec.py: Include dm_flags and nanobench_flags
Eventually I'll want to merge them into this file, but not just yet.

NOTRY=true
BUG=skia:4132

Review URL: https://codereview.chromium.org/1257933003
2015-07-29 11:43:07 -07:00
borenet
7bccca1a82 buildbot_spec.py: Add Android/ChromeOS device info, add builder_cfg dict
NOTRY=true
BUG=skia:4132

Review URL: https://codereview.chromium.org/1269543002
2015-07-29 11:15:42 -07:00
mtklein
22355c4f40 Move headers with no dependencies.
C.f.  https://codereview.chromium.org/1261013003/

BUG=skia:4126

Will follow up with two more CLs if this works:
  - one moving SkRecords.h
  - one moving SkMiniRecorder.h

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

Committed: https://skia.googlesource.com/skia/+/117842223bd13325b6da26110d80e0590c1a742b

Review URL: https://codereview.chromium.org/1266593002
2015-07-29 11:10:46 -07:00
joshualitt
e43e3bdd6d Fix for GrAtlasTextContext crash
BUG=510931

Review URL: https://codereview.chromium.org/1256763005
2015-07-29 11:10:38 -07:00
msarett
fdb788cbfc Make SkSwizzler::Fill() support 565
BUG=skia:4135

Review URL: https://codereview.chromium.org/1267543002
2015-07-29 10:37:29 -07:00