Commit Graph

18182 Commits

Author SHA1 Message Date
reed
91f283bb4e change getBounds to return 0000 iff there are zero points
This is a contract change for SkPath::getBounds(), which formally was defined to return 0,0,0,0 for a 1-point path, regardless of the coordinates of that point. This seems wacky/inconsistent, and was causing other bugs (incorrect bounds) when this was unioned with other rects.

Does anyone remember why we defined it this way?

BUG=513799

Review URL: https://codereview.chromium.org/1261773002
2015-07-28 06:00:50 -07:00
borenet
b2c07364a3 Fix android_launch_app after Gradle change
NOTRY=true
TBR=djsollen
BUG=skia:

Review URL: https://codereview.chromium.org/1258253002
2015-07-28 06:00:36 -07:00
borenet
5f4dc38325 android_install_app: Use lower-cased app name
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1261873002
2015-07-28 05:13:41 -07:00
caryclark
bb13433364 compute split conic endpoints exactly
The divide by w can generate slightly erroneous results even
for t == 0 or t == 1. The error in turn defeats detecting
a point in common for a pair of curves that travel in
opposite directions.

Instead, special case endpoints when the t is 0 or 1.

TBR=reed@google.com
BUG=514118

Review URL: https://codereview.chromium.org/1259513004
2015-07-28 05:12:19 -07:00
msarett
614aa072cb Pass the destination pointer to next() in SkSwizzler
Per our discussion, we can make the swizzler simpler and more usable
for SkCodec and SkScanlineDecoder by only having a single version of
next() which takes a pointer to the srcRow and a pointer to the
dstRow.

BUG=skia:

Review URL: https://codereview.chromium.org/1256373002
2015-07-27 15:13:17 -07:00
halcanary
a3a9ebcfb0 documentation: more API details and examples.
NOTRY=true
DOCS_PREVIEW= https://skia.org/user/api/skpaint?cl=1240893003

Review URL: https://codereview.chromium.org/1240893003
2015-07-27 13:13:03 -07:00
junov
6e9aed9dfe Fixing src rect constraint support for drawImage with SkPicture
Follow-up to https://codereview.chromium.org/1228083004

BUG=skia:

Review URL: https://codereview.chromium.org/1256853004
2015-07-27 13:11:55 -07:00
reed
bca140010f remove pixel assert from ctable validator
BUG=514143

Review URL: https://codereview.chromium.org/1252973003
2015-07-27 12:19:16 -07:00
joshualitt
e9d6095674 Cleanup Default Geo Proc API
TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1253393002
2015-07-27 12:13:14 -07:00
mtklein
2c323427cb No one calls SkXfermode::GetProc16
BUG=skia:

Review URL: https://codereview.chromium.org/1253493002
2015-07-27 12:07:29 -07:00
mtklein
56b78a7a2a Revert of Lay groundwork for SkOpts. (patchset #3 id:40001 of https://codereview.chromium.org/1255193002/)
Reason for revert:
Chromium doesn't call SkGraphics::Init().  This setup won't work.

Original issue's description:
> 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

TBR=djsollen@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4117

Review URL: https://codereview.chromium.org/1261743002
2015-07-27 12:03:23 -07:00
joshualitt
513f265877 fix up GrImmediateDrawTarget.cpp
TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1260023003
2015-07-27 11:41:15 -07:00
mtklein
58fd2c8af4 Remove sk_memcpy32
It's only implemented on x86, where the exisiting benchmark says memcpy() is
faster for all cases:

Timer overhead: 24ns
curr/maxrss    loops    min    median    mean    max    stddev    samples       config    bench
  10/10  MB    1    35.9µs    36.2µs    36.2µs    36.6µs    1%    ▁▂▄▅▅▃█▄▄▅    nonrendering    sk_memcpy32_100000
  10/10  MB    13    2.27µs    2.28µs    2.28µs    2.29µs    0%    █▄▃▅▃▁▃▅▁▄    nonrendering    sk_memcpy32_10000
  11/11  MB    677    91.6ns    95.9ns    94.5ns    99.4ns    3%    ▅▅▅▅▅█▁▁▁▁    nonrendering    sk_memcpy32_1000
  11/11  MB    1171    20ns    20.9ns    21.3ns    23.4ns    6%    ▁▁▇▃▃▃█▇▃▃    nonrendering    sk_memcpy32_100
  11/11  MB    1952    14ns    14ns    14.3ns    15.2ns    3%    ▁▁██▁▁▁▁▁▁    nonrendering    sk_memcpy32_10
  11/11  MB    5    33.6µs    33.7µs    34.1µs    35.2µs    2%    ▆▇█▁▁▁▁▁▁▁    nonrendering    memcpy32_memcpy_100000
  11/11  MB    18    2.12µs    2.22µs    2.24µs    2.39µs    5%    ▂█▄▇█▄▇▁▁▁    nonrendering    memcpy32_memcpy_10000
  11/11  MB    1112    87.3ns    87.3ns    89.1ns    93.7ns    3%    ▄██▄▁▁▁▁▁▁    nonrendering    memcpy32_memcpy_1000
  11/11  MB    2124    12.8ns    13.3ns    13.5ns    14.8ns    6%    ▁▁▁█▃▃█▇▃▃    nonrendering    memcpy32_memcpy_100
  11/11  MB    3077    9ns    9.41ns    9.52ns    10.2ns    4%    ▃█▁█▃▃▃▃▃▃    nonrendering    memcpy32_memcpy_10

(Why?  One fewer thing to port to SkOpts.)

BUG=skia:4117

Review URL: https://codereview.chromium.org/1256763003
2015-07-27 11:08:28 -07:00
mtklein
ce2c5055ce 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

Review URL: https://codereview.chromium.org/1255193002
2015-07-27 10:52:33 -07:00
fmalita
9a5d1ab54d Make peekPixels() usable with raster surface snapshots
SkSurface_Raster snapshots do not lock their backing bitmaps when the
pixel ref is shared - they only lock on deep-copy.

But since for raster surfaces the pixels are always in memory, I think
it would be OK to also lock in the former case.

This allows for optimized (zero-copy) reads of raster surface snapshot
data.

R=reed@google.com

Review URL: https://codereview.chromium.org/1256993002
2015-07-27 10:27:29 -07:00
bsalomon
1c63436f39 Steal refs from other TextBatch in onCombineIfPossible
Review URL: https://codereview.chromium.org/1257683004
2015-07-27 07:00:00 -07:00
mtklein
cf4e567612 NEON has a ternary instruction.
Nothing seems to run any faster or slower, but it is terser.

BUG=skia:

Review URL: https://codereview.chromium.org/1255913004
2015-07-27 06:12:05 -07:00
bsalomon
d602f4d1f7 Make allocation count in TextBatch implicit
Review URL: https://codereview.chromium.org/1254903002
2015-07-27 06:12:01 -07:00
Brian Salomon
4239fc2f69 Remove skia_arch_width, fold into skia_arch_type.
DOCS_PREVIEW= https://skia.org/?cl=1228553010

BUG=skia:4042
R=borenet@google.com, mtklein@google.com

Review URL: https://codereview.chromium.org/1228553010
2015-07-27 09:10:36 -04:00
wangyix
cef14bf9ce Added GrGLBlend.h|cpp with helper function AppendPorterDuffBlend() in preparation for SkComposeShader gpu backend
BUG=skia:

Review URL: https://codereview.chromium.org/1254833003
2015-07-24 13:48:26 -07:00
joshualitt
20dac88565 mixed text blobs really draws LCD
TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1261483002
2015-07-24 13:16:24 -07:00
djsollen
d18b861061 Update Android Apps to use gradle
This CL replaces ant with gradle for the task of building APKs.
The primary driver of this change is that it now allow us to
develop and test our apps using Android Studio.
DOCS_PREVIEW= https://skia.org/?cl=1215023017

Committed: https://skia.googlesource.com/skia/+/425535f1626932e4e22f61a2571f9c3c2b1c5977

Review URL: https://codereview.chromium.org/1215023017
2015-07-24 13:15:59 -07:00
caryclark
1818acb6a4 rename portable_typeface_always to portable_typeface
TBR=reed@google.com

Review URL: https://codereview.chromium.org/1257773002
2015-07-24 12:09:25 -07:00
joshualitt
d9f13aef8d fix for GrAtlasTextContext occasionally crashes on mixed runs
TBR=bsalomon@google.com
BUG=510931

Review URL: https://codereview.chromium.org/1252423002
2015-07-24 11:24:31 -07:00
caryclark
37213558e6 make fontscalar gammatext lcdtext typeface verttext2 gm portable
Pass generic font names to tool util function to generate
platform specific fonts and gm test output by unique name.

R=bungeman@google.com

Review URL: https://codereview.chromium.org/1256903002
2015-07-24 11:08:01 -07:00
joshualitt
6c2c2b07ed Minimize retrieving SkGlyph in GrTextContext
BUG=skia:

Review URL: https://codereview.chromium.org/1257603005
2015-07-24 10:37:00 -07:00
robertphillips
29ccdf86ab Fix Ganesh drawAtlas bug with quad colors
Ganesh was not expanding the quad colors to vertex colors before calling drawVertices.

The new GM would've caught this bug and reveals Ganesh's limitations re the various xfer modes used with drawAtlas (i.e., w/o AA Ganesh only supports kModulate, w/ AA Ganesh only supports the coefficient-based xfer modes).

Review URL: https://codereview.chromium.org/1254943002
2015-07-24 10:20:45 -07:00
bsalomon
965b36cb16 Set preallocated TextBatch geometries to 4 rather than 32
Review URL: https://codereview.chromium.org/1256843003
2015-07-24 08:10:43 -07:00
hendrikw
266c232104 skia: wrong calling convention on eglGetPlatformDisplayEXT
When attempting to run the release compile of nanobench on windows, I would
immediately crash due to c++'s buffer security check.

This was caused by calling the function with the wrong calling
convention.  I'm not sure how this ever worked for anyone.

Anyway, fix is to use eglext.h's version of the function definition.

Review URL: https://codereview.chromium.org/1250383002
2015-07-24 06:52:40 -07:00
caryclark
ba9757abc2 make dftext gm not overlap itself
TBR=jvanverth@google.com

Review URL: https://codereview.chromium.org/1253643004
2015-07-23 14:07:58 -07:00
caryclark
1b31402bab make fontcache textblob gm portable
TBR=reed@google.com

Review URL: https://codereview.chromium.org/1245123006
2015-07-23 13:48:31 -07:00
caryclark
d4349723fa fix path ops fuzz buster
Mark collapsed segments as done and remove collapsed
segment references from the coincidence array.

Also add test names to global debugging.

R=fmalita@chromium.org
BUG=512592

Review URL: https://codereview.chromium.org/1250293002
2015-07-23 12:40:22 -07:00
caryclark
a0170f10aa make dftext the same on Linux and Android
Use the same font sizes on both platforms so that the gm images
are easier to compare one to the other.

TBR=jvanverth@google.com

Review URL: https://codereview.chromium.org/1253573006
2015-07-23 12:38:59 -07:00
bsalomon
a449779a33 Remove test of illegal behavior that modifies a texture backing an SkImage.
Review URL: https://codereview.chromium.org/1244143004
2015-07-23 12:22:19 -07:00
msarett
a56884c17f Fix Android x86 compile on mac
It appears I failed to fully disable it on the first attempt.

BUG=skia:

Review URL: https://codereview.chromium.org/1249083004
2015-07-23 11:57:13 -07:00
hendrikw
4e34001ec0 Skia: ANGLE Roll
Includes fix for vertex index.

BUG=510585

Review URL: https://codereview.chromium.org/1246143005
2015-07-23 11:56:40 -07:00
caryclark
3b0f98ee17 fix typeface leak
TBR=bungeman@google.com

Review URL: https://codereview.chromium.org/1239303003
2015-07-23 11:52:01 -07:00
bsalomon
494aa593c5 Fix ImageNewSurface test on S4.
This still leaves the SkImage_NewFromTexture broken.

Review URL: https://codereview.chromium.org/1253513004
2015-07-23 11:45:02 -07:00
robertphillips
eb86b55fe9 Fix variable shadowing in SkMorphologyImageFilter
Review URL: https://codereview.chromium.org/1245883005
2015-07-23 11:35:08 -07:00
jvanverth
29c69793f0 Update fallback rsqrt implementation to use optimal constants.
Improves max relative error from 0.00175126 to 0.000650197.
Also add unit tests to check error bounds.

BUG=chromium:511458

Review URL: https://codereview.chromium.org/1251423002
2015-07-23 11:14:29 -07:00
joshualitt
4765bdcd63 fix comment on GrBatchTextStrike
TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1252783002
2015-07-23 10:58:48 -07:00
caryclark
e663341605 fix typo
TBR=reed@google.com

Review URL: https://codereview.chromium.org/1245993003
2015-07-23 09:11:58 -07:00
mtklein
b9c47f9968 Have Windows use _mm_rsqrt_ss too.
Tidy up a little while I'm in here:
  1) SIMD headers are now included by SkTypes.h as appropriate.
  2) _mm_cvtss_f32() is pithier and generates the same code.

Looks like this is the only code checking for SSE wrong.  After this CL:
    ~/skia (sse) $ git grep __SSE
    include/core/SkPreConfig.h:    #if defined(__SSE4_2__)
    include/core/SkPreConfig.h:    #elif defined(__SSE4_1__)
    include/core/SkPreConfig.h:    #elif defined(__SSE3__)
    include/core/SkPreConfig.h:    #elif defined(__SSE2__)
every other check is in SkPreConfig.h where it belongs.

This is going to affect some GMs subtly on Windows.

BUG=chromium:511458

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

Review URL: https://codereview.chromium.org/1248503004
2015-07-23 08:37:02 -07:00
joshualitt
11dfc8e57a Small tweak to TextBlobCacheTest
TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1251383003
2015-07-23 08:30:25 -07:00
joshualitt
bedf7e5c0e fix memory leak in TextBlobCacheTest
TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1252593002
2015-07-23 08:09:35 -07:00
bsalomon
398260262f Attempt to somewhat simplify GrContext::readSurfacePixels interaction with GrGpu.
Review URL: https://codereview.chromium.org/1255483005
2015-07-23 08:07:21 -07:00
rmistry
6d600af80a Fix formatting in the CQ keywords markdown
BUG=skia:
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=1247323002
TBR=jcgregorio

Review URL: https://codereview.chromium.org/1247323002
2015-07-23 08:02:13 -07:00
wangyix
150714fb16 Name of primitive processor will now be printed in generated shader code
BUG=skia:

Review URL: https://codereview.chromium.org/1253513003
2015-07-23 08:02:09 -07:00
joshualitt
9efef7b56f Revert "Update Android Apps to use gradle"
This reverts commit 425535f162.

NOTRY=true
NOTREECHECKS=true
TBR=djsollen@google.com
BUG=skia:
DOCS_PREVIEW= https://skia.org/?cl=1250233002

Review URL: https://codereview.chromium.org/1250233002
2015-07-23 08:00:33 -07:00
wangyix
7c157a9888 Added GrGLFragmentProcessor::EmitArgs struct for use with emitCode()
BUG=skia:

Review URL: https://codereview.chromium.org/1251173002
2015-07-22 15:08:53 -07:00