Commit Graph

26190 Commits

Author SHA1 Message Date
Greg Daniel
bfd97c5935 Remove sentinal GLContext used in early days of Vulkan in our tools
I've ran this through multiple variations of dm and nanobench on Linux
and no longer see any crash/hangs. I forget what the original repo case
for the bug was, but I'm at least not seeing it now with updated drivers.

BUG=skia:

Change-Id: I6b7129a4c4d67938baa35d2e2c720cb078fc4c18
Reviewed-on: https://skia-review.googlesource.com/7441
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-01-24 18:57:36 +00:00
Matt Sarett
cf3525a95e SkPixelInfo::CopyPixels() refactor part 0: only one memcpy() case
I envision this eventually looking like the following:
Fast Path 1: memcpy
Fast Path 2: Legacy RGBA/BGRA unpremul/premul
Fast Path 3: SkColorSpaceXform
Fallback: Raster pipeline

BUG=skia:6021

Change-Id: I3f0e36b08b051ab4ba3949f04474f20d0c20a963
Reviewed-on: https://skia-review.googlesource.com/7435
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-01-24 18:19:37 +00:00
Mike Klein
57bc1e7bc8 move sk_memset16,32,64 out-of-line
This helps pick it out on profiles and when debugging.

This will have a negligible impact on speed in most cases (small memsets are always fast, large memsets dwarf function call overhead), and clients like Chrome that use link-time optimization should see exactly zero impact.

This does however affect code size: it makes libskia 43K smaller on my laptop.

Change-Id: I55bdc75b7429a63024ab3b7d55dc1f886bde102a
Reviewed-on: https://skia-review.googlesource.com/6589
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
2017-01-24 18:01:16 +00:00
Brian Salomon
aee504beb2 Make GrConvolutionEffect only support Gaussian kernels and rename.
Change-Id: Ia874ad5bacc550b7ecec579719242e3354dca34b
Reviewed-on: https://skia-review.googlesource.com/7432
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-01-24 17:59:54 +00:00
Herb Derby
5d72f7deb1 Remove SkTDict and calls from SkView.
R=reed@google.com

Change-Id: Iebfddf752a2ac210a3f5c69de8decd06d0c35617
Reviewed-on: https://skia-review.googlesource.com/7436
Commit-Queue: Herb Derby <herb@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-01-24 17:24:50 +00:00
Herb Derby
80d22ea13a Do not embed glyph image data in SkGlyphCache.
Instead of allocating memory for glyph images eagerly by embedding
the memory in the glyph cache, allocate memory dynamically on need.

TBR=bungeman@google.com

BUG=chromium:684366

Change-Id: If32bbc4d2608c976b93868feb519dcfa1212ce59
Reviewed-on: https://skia-review.googlesource.com/7433
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2017-01-24 16:45:59 +00:00
Mike Reed
7717d4a343 conservativelyContainsRect is asserting
BUG=skia:6156

Change-Id: Iea571f001e9a4c4e70313c1bd49fb4e3c598869a
Reviewed-on: https://skia-review.googlesource.com/7423
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-01-24 15:57:31 +00:00
Matt Sarett
55213562f9 Add F16 and gamma correct support to webp encoder
BUG=skia:

Change-Id: Ib788466fa1e2bed26e7ffd8f03bee42930eae1d6
Reviewed-on: https://skia-review.googlesource.com/7425
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2017-01-24 15:11:48 +00:00
Mike Reed
6f4a9b2948 restore bool version of clip-bounds
BUG=skia:

Change-Id: I94e35566cf5bcd250515c71a566dd79030e2acb4
Reviewed-on: https://skia-review.googlesource.com/7430
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-01-24 14:51:24 +00:00
Matt Sarett
eb5061baac Reenable index8 dsts
This is causing problems with image-cacherator-from-ctable gm.

In that gm, we use an index8->index8 readPixels() to take
a subset.

I think we need to keep this as long as we support index8 in the
generator/cacherator.  Though it's really strange because
we don't really bother to verify that color tables are the same
and we don't try to overwrite the dst color table...

BUG=skia:

Change-Id: Icf008caa571c4b81a52a23b8b7d9226789626ef5
Reviewed-on: https://skia-review.googlesource.com/7424
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-01-24 14:17:48 +00:00
Robert Phillips
bc7a4fb067 Make GrYUVEffect take GrTextureProxies
This opens the door for swapping all the effects over to taking GrTextureProxies.

Change-Id: I3b03ba93a68f9945c9a8fee008fd170ed57616eb
Reviewed-on: https://skia-review.googlesource.com/7344
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-01-24 12:23:28 +00:00
Mike Klein
ad24145e41 Update SkAndroidSDKCanvas.
Hope that's right... nothing but the Android roll builds this code.

Change-Id: Ib86099deaaa5a67a480d6dc0eece8552e58aae1c
Reviewed-on: https://skia-review.googlesource.com/7428
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-01-24 02:43:38 +00:00
Mike Klein
5d5cc3cb22 Temporarily restore colorcube bench and GM files.
Just the usual... we don't generate .bp for DM or nanobench yet.

See https://skia-review.googlesource.com/c/7363/ and
https://googleplex-android-review.git.corp.google.com/#/c/1819530/-1..1

Change-Id: If0098ed8a71a170d5efa773495d5bbf02a1e13fc
Reviewed-on: https://skia-review.googlesource.com/7427
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-01-24 02:17:30 +00:00
Herb Derby
f887f8a847 Fix comparison that overflows for addresses near uint max.
- Fix Assert

TBR=mtklein@google.com
BUG=chromium:683578

Change-Id: Iba503d1febace367c71f79a3b9accc0ec3e50f11
Reviewed-on: https://skia-review.googlesource.com/7418
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2017-01-23 22:59:01 +00:00
Lee Salzman
a19f024953 make SkPath::conservativelyContainsRect consume degenerate segments
BUG=skia:

Change-Id: I3a39318bceaf6c95a50d84961d93af4ba62550e3
Reviewed-on: https://skia-review.googlesource.com/6900
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-01-23 22:08:37 +00:00
Mike Reed
42e8c53b3e rename virtuals for clipbounds, and deprecate older bool/var-arg pattern
BUG=skia:

Change-Id: I08bcc2d0559e02838772538816b928e0716dd3aa
Reviewed-on: https://skia-review.googlesource.com/7412
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-01-23 20:56:13 +00:00
Ethan Nicholas
ab23acf4fa Revert "Update libwebp to 0.6.0-pre"
This reverts commit e2f6ffbf49.

Reason for revert:

iOS build failures, see https://luci-milo.appspot.com/swarming/task/33e5e02cf8419d10/steps/build_iOSShell/0/stdout

Original change's description:
> Update libwebp to 0.6.0-pre
> 
> Corresponds with Android change
> https://android-review.googlesource.com/#/c/326439/
> 
> "this prerelease snapshot includes encoder and performance
> improvements"
> 
> Update build file
> * Many files have been renamed from
>     src/<subdir>/<name>.c
>       to
>     src/<subdir>/<name>_<subdir>.c
> 
> * Build new files (*_msa.c, *_neon.c, predictor_enc.c)
> 
> This should fix issue 5876, which was caused by a compiler bug.
> With the added NEON implementation, we will no longer trigger
> the bug.
> 
> BUG=skia:5876
> 
> Change-Id: I0fcce4362ee70138547b1d23aa9ef537a4126e73
> Reviewed-on: https://skia-review.googlesource.com/7376
> Reviewed-by: Matt Sarett <msarett@google.com>
> Commit-Queue: Leon Scroggins <scroggo@google.com>
> 

TBR=msarett@google.com,scroggo@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:5876

Change-Id: Ib81f63861d9f1c6936bd7f790b5e16a9544a4df0
Reviewed-on: https://skia-review.googlesource.com/7420
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2017-01-23 20:47:46 +00:00
Leon Scroggins III
e2f6ffbf49 Update libwebp to 0.6.0-pre
Corresponds with Android change
https://android-review.googlesource.com/#/c/326439/

"this prerelease snapshot includes encoder and performance
improvements"

Update build file
* Many files have been renamed from
    src/<subdir>/<name>.c
      to
    src/<subdir>/<name>_<subdir>.c

* Build new files (*_msa.c, *_neon.c, predictor_enc.c)

This should fix issue 5876, which was caused by a compiler bug.
With the added NEON implementation, we will no longer trigger
the bug.

BUG=skia:5876

Change-Id: I0fcce4362ee70138547b1d23aa9ef537a4126e73
Reviewed-on: https://skia-review.googlesource.com/7376
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-01-23 20:23:59 +00:00
Brian Salomon
5f13fbac19 Stop tracking whether GrFragmentProcessors read their input
Change-Id: Id5338901978b97289798eaef873527597bd8dfd6
Reviewed-on: https://skia-review.googlesource.com/7414
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-01-23 20:17:53 +00:00
Mike Klein
319ba3d3a1 Move shader register setup to SkRasterPipelineBlitter.
We've been seeding the initial values of our registers to x+0.5,y+0.5,
1,0, 0,0,0,0 (useful values for shaders to start with) in all pipelines.
This CL changes that to do so only when blitting, and only when we have
a shader.

The nicest part of this change is that SkRasterPipeline itself no longer
needs to have a concept of y, or what x means.  It just marches x
through [x,x+n), and the blitter handles y and layers the meaning of
"dst x coordinate" onto x.

This ought to make SkSplicer a little easier to work with too.

dm --src gm --config f16 srgb 565 all draws the same.

Change-Id: I69d8c1cc14a06e5dfdd6a7493364f43a18f8dec5
Reviewed-on: https://skia-review.googlesource.com/7353
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-01-23 20:00:23 +00:00
Ethan Nicholas
889176b3a3 Revert "Fix comparison that overflows for addresses near uint max."
This reverts commit db8b8376b0.

Reason for revert: 

Assertion failure, see https://luci-milo.appspot.com/swarming/task/33e5ae4d2bb25210/steps/dm/0/stdout

Original change's description:
> Fix comparison that overflows for addresses near uint max.
> 
> BUG=chromium:683578
> 
> Change-Id: I3f9b79eeeba3c68cccb72bd6423811c8ff8f2067
> Reviewed-on: https://skia-review.googlesource.com/7410
> Commit-Queue: Herb Derby <herb@google.com>
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> 

TBR=mtklein@chromium.org,mtklein@google.com,herb@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:683578

Change-Id: I198ea4c7209d060d0d15dfa3f6e555fa06e1a632
Reviewed-on: https://skia-review.googlesource.com/7415
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2017-01-23 19:59:52 +00:00
Mike Klein
a9e8ef079b SkRasterPipeline: implement support for SkTableColorFilter
This adds and uses a byte_tables stage that converts to bytes, looks up
in the tables, then converts back to floats.

We treat this as color filter as pure math, not considering anything
colorspace related: no transfer functions, no gamut to change, etc.

Change-Id: If5fefc1bcef61a0fb0ae279002a0dd1547e429ea
Reviewed-on: https://skia-review.googlesource.com/7413
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-01-23 19:55:20 +00:00
Mike Klein
b48fd3cc89 GN: add 32-bit and Release iOS builders.
And roll recipes to the point where they pass target_cpu to GN,
adding x86_64 as an alias for x64.

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Mac-Clang-arm64-Debug-GN_iOS,Build-Mac-Clang-arm64-Release-GN_iOS,Build-Mac-Clang-arm-Debug-GN_iOS,Build-Mac-Clang-arm-Release-GN_iOS

Change-Id: I1933d5803ec7f59f78576c5a7b16489362905a97
Reviewed-on: https://skia-review.googlesource.com/7403
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-01-23 19:54:49 +00:00
Herb Derby
db8b8376b0 Fix comparison that overflows for addresses near uint max.
BUG=chromium:683578

Change-Id: I3f9b79eeeba3c68cccb72bd6423811c8ff8f2067
Reviewed-on: https://skia-review.googlesource.com/7410
Commit-Queue: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-01-23 19:38:02 +00:00
Herb Derby
2a0daee1af Update SkTDict to use SkArenaAlloc.
Change-Id: I7ac33faa59bcad25b0580193af965a8525eb18e7
Reviewed-on: https://skia-review.googlesource.com/7360
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-01-23 19:07:01 +00:00
Greg Daniel
77a86f81f3 Track clear counts in vulkan render passes
Though not required by spec, the validation layers have started spitting
out warnings if the clearValueCount in BeginRenderPass is greater than
the number of attachments actually being cleared. This just adds tracking
of the count to appease the validation layers.

BUG=skia:

Change-Id: Iac6500df3ed5ad3f5df5f045c6e533bb021857aa
Reviewed-on: https://skia-review.googlesource.com/7401
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-01-23 18:52:25 +00:00
Matt Sarett
62bb2803a8 Make SkWEBPImageEncoder use transform_scanline_procs
This refactor will make it simple to add F16 and
GammaCorrect support to the webp encoder.

BUG=skia:

Change-Id: I379ba2ff0b44d865847877322e86d0c138e727c8
Reviewed-on: https://skia-review.googlesource.com/7356
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-01-23 18:26:03 +00:00
Matt Sarett
03dd6d5208 Reland "Refactor trimming logic for read/writePixels()"
Original CL: https://skia-review.googlesource.com/c/7326/

(1) Move trimming logic into Bitmap/Pixmap level for
    raster.  Everything goes through here, so we'll
    only do the work once.
(2) This means it also goes to GPU level.
(3) Always use SkReadPixelsRec rather than inlining
    the logic.
(4) Create an SkWritePixelsRec to encapsulate write
    trimming.
(5) Disabled kIndex8 as a dst - always.

CQ_INCLUDE_TRYBOTS=skia.primary:Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug

BUG=skia:6021

Change-Id: I25a964e3c610c4e36d195a255e2150657baec649
Reviewed-on: https://skia-review.googlesource.com/7404
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-01-23 18:12:46 +00:00
Koji Ishii
a6725fcb14 Support fCapHeight in SkScalerContext_DW
BUG=chromium:681857

Change-Id: Ia97354d7798eb685351a98ff559bcf176a67af18
Reviewed-on: https://skia-review.googlesource.com/7380
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-01-23 17:21:15 +00:00
Mike Reed
918e144408 change clip-bounds getters to always return the rect
(actually fixes undefined result in getClipBounds)

future CLs
- update all callers to new apis
- move/rename virtuals

BUG=skia:

DOCS_PREVIEW= https://skia.org/?cl=7400

Change-Id: I45b93014e915c0d1c36d97d948c9ac8931f23258
Reviewed-on: https://skia-review.googlesource.com/7400
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-01-23 17:14:53 +00:00
Herb Derby
9adfef8680 Remove public APIs that use SkDataTable.
Change-Id: Ibb8f987efc585713a6f8061c72fb416d07be13b1
Reviewed-on: https://skia-review.googlesource.com/7352
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-01-23 17:09:37 +00:00
Skia_Android Canary Bot
5b92e4ab8e Fix autoroller instructions
BUG=skia:6065

NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=7377

Change-Id: Iefd6af3104f4aea2f2ae93c556b6b429e54ebff4
Reviewed-on: https://skia-review.googlesource.com/7377
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2017-01-23 15:53:15 +00:00
Matt Sarett
26ecfe0af8 Revert "Refactor trimming logic for read/writePixels()"
This reverts commit 977f64cbfa.

Reason for revert: Triggering nanobench asserts

Original change's description:
> Refactor trimming logic for read/writePixels()
> 
> (1) Move trimming logic into Bitmap/Pixmap level for
>     raster.  Everything goes through here, so we'll
>     only do the work once.
> (2) This means it also goes to GPU level.
> (3) Always use SkReadPixelsRec rather than inlining
>     the logic.
> (4) Create an SkWritePixelsRec to encapsulate write
>     trimming.
> (5) Disabled kIndex8 as a dst - always.
> 
> BUG=skia:6021
> 
> Change-Id: I748f50c3b726f7c6de5462e2b1ccb54bc387a510
> Reviewed-on: https://skia-review.googlesource.com/7326
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Matt Sarett <msarett@google.com>
> 

TBR=msarett@google.com,brianosman@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:6021

Change-Id: If9aacc6ce8b20e3dfe8a0f22ebca653f28356175
Reviewed-on: https://skia-review.googlesource.com/7379
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
2017-01-23 15:51:14 +00:00
Matt Sarett
bfe8dca7df Allow conversion from non-opaque to opaque
BUG:683787

Change-Id: I1b78cc8d1b5d3917a2a952da036b93022e99e053
Reviewed-on: https://skia-review.googlesource.com/7374
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-01-23 15:47:42 +00:00
Cary Clark
59d5a0e3f5 Revert "offset angle check edge in common"
This reverts commit d2eb581ebc.

Reason for revert: broke Google3 MSAN run of dm

Original change's description:
> offset angle check edge in common
> 
> When curves cross, their intersection points may be nearby, but not exactly the same.
> Sort the angles formed by the crossing curves when all angles don't have the same
> origin.
> 
> This sets up the framework to solve test case that currently fail (e.g., joel6) but
> does not fix all related test cases (e.g., joel9).
> 
> All older existing test cases, including extended tests, pass.
> 
> Rework the test framework to better report when tests expected to produce failing
> results now pass.
> 
> Add new point and vector operations to support offset angles.
> 
> TBR=reed@google.com
> BUG=skia:6041
> 
> Change-Id: I67c651ded0a25e99ad93d55d6a35109b3ee3698e
> Reviewed-on: https://skia-review.googlesource.com/6624
> Commit-Queue: Cary Clark <caryclark@google.com>
> Reviewed-by: Cary Clark <caryclark@google.com>
> 

TBR=caryclark@google.com,reviews@skia.org
# Not skipping CQ checks because original CL landed > 1 day ago.
BUG=skia:6041

Change-Id: I43db0808522ac44aceeb4f70e296167ea84a3663
Reviewed-on: https://skia-review.googlesource.com/7373
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
2017-01-23 15:31:25 +00:00
Bruce Dawson
b07a01e6b9 Get rid of level of indirection, noticed by VC++ 2017 bug
When building Chrome with VC++ 2017 the QuickFDot6Inverse::table pointer
is initialized to zero. This is certainly a bug, and it has been
reported to the VC++ team. But, the table pointer appears to be
unnecessary. Changing the code to reference the array directly should
give identical or perhaps even better code.

The change to the array indexing code is as follows:

- return table[x];
+ gFDot6INVERSE[kInverseTableSize + x];

This looks like a step backwards, but it isn't. 'table' is a pointer.
So, by default the compiler will load this pointer and then load the
value from the array. gFDot6INVERSE is an array, not a pointer. This
means that the adding of kInverseTableSize is trivially done at
compile time, and there is no loading of a pointer - only one data
segment memory access is needed.

The compiler may have realized that this optimization was ready before,
but now it is more trivial. And, this works around the VC++ 2017 bug so
that Chrome with VC++ 2017 will launch.

https://connect.microsoft.com/VisualStudio/feedback/details/3119337
BUG=683729

Change-Id: Iad443b59a70af83b39260e244e3242e782fafdbb
Reviewed-on: https://skia-review.googlesource.com/7284
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2017-01-23 15:26:28 +00:00
Matt Sarett
977f64cbfa Refactor trimming logic for read/writePixels()
(1) Move trimming logic into Bitmap/Pixmap level for
    raster.  Everything goes through here, so we'll
    only do the work once.
(2) This means it also goes to GPU level.
(3) Always use SkReadPixelsRec rather than inlining
    the logic.
(4) Create an SkWritePixelsRec to encapsulate write
    trimming.
(5) Disabled kIndex8 as a dst - always.

BUG=skia:6021

Change-Id: I748f50c3b726f7c6de5462e2b1ccb54bc387a510
Reviewed-on: https://skia-review.googlesource.com/7326
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-01-23 15:23:31 +00:00
Yuqian Li
6987b00fae Fix performance issue and compute intersections more often.
(This CL also turned on Analytic AA for concave paths by removing SK_SUPPORT_LEGACY_AAA flag.)

Performance:
The SK_ALWAYS_INLINE was restored because it could bring 30%-50% speedup
in certain convex cases (e.g., fill_big_triangle). We also have to
reduce the number of branchings in the concave code path to enable such
speedup. (Although the speedup is for convex cases. The assembly code is
so strange...)

Intersection:
Previously, the criterion is too loose and that caused some bad pixels
(mostly unnoticeable by human eyes without magnifying). For example,
pixel (198, 222) of
https://gold.skia.org/detail?test=parsedpaths&digest=979e81de6f7b3f9e7e8dc810e31cad8d


BUG=skia:

Change-Id: I5e8191865c3df625f895cd4588c67c283fcbeaec
Reviewed-on: https://skia-review.googlesource.com/7318
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2017-01-23 15:19:29 +00:00
Brian Salomon
85f58b5ac9 Look for GenerateMipMapEXT
Change-Id: I1ced904f0929653aa9bac09fee86607533e28be6
Reviewed-on: https://skia-review.googlesource.com/7359
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-01-23 15:16:33 +00:00
Mike Klein
8f297c9994 SkSplicer: favor 1.0f as a constant.
1.0f is the most commonly used constant, so we put it first in the
constant struct.  This usually cuts an instruction off loading it.

Change-Id: Ie54a9482aa3e90e9e5d8fcaa40dbd353af0fa1ca
Reviewed-on: https://skia-review.googlesource.com/7367
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-01-21 16:20:13 +00:00
Mike Klein
09008ff8dd Revert "Try /MTd on Debug Windows builds."
This reverts commit 58ce2bc51a.

Reason for revert: warnings / errors when building ANGLE.

Original change's description:
> Try /MTd on Debug Windows builds.
> 
> The people clamor for it!  I doubt we'll care in our testing.
> 
> BUG=skia:5928
> 
> Change-Id: I80d3948fd1f5d0b956c308bc3a6183b8660575ae
> Reviewed-on: https://skia-review.googlesource.com/7364
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Reviewed-by: Ben Wagner <bungeman@google.com>
> 

TBR=mtklein@chromium.org,bungeman@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:5928

Change-Id: Id6ab3de7ebb5394749233429bada2f5244ff2978
Reviewed-on: https://skia-review.googlesource.com/7372
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-01-21 15:35:24 +00:00
Mike Klein
4a84f0afe0 SkSplicer: move armv7 ABI settings into build_stages.py.
This just tidies up the .cpp files a bit, and makes it easier to make
sure all exported functions use the aapcs-vfp callig convention, which
hard-float implies.

As a small simplification, fold -march=armv7-a into --target.

No generated code changes.

Change-Id: I2694970a6e48bd69c41dd280a44ddd0029e52ae8
Reviewed-on: https://skia-review.googlesource.com/7371
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-01-21 15:24:38 +00:00
Mike Klein
58ce2bc51a Try /MTd on Debug Windows builds.
The people clamor for it!  I doubt we'll care in our testing.

BUG=skia:5928

Change-Id: I80d3948fd1f5d0b956c308bc3a6183b8660575ae
Reviewed-on: https://skia-review.googlesource.com/7364
Commit-Queue: Mike Klein <mtklein@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2017-01-21 15:12:07 +00:00
Mike Klein
f167dfb272 mild tweaks to build_stages.py to run on my desktop
Change-Id: Ie193e5bf576b8d3ddbd4c99d3707e3211557cc01
Reviewed-on: https://skia-review.googlesource.com/7368
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-01-21 15:11:17 +00:00
Mike Klein
efaad3cd53 Remove SkColorCubeFilter. It is unused.
Change-Id: Iec5fc759e331de24caea1347f9510917260d379b
Reviewed-on: https://skia-review.googlesource.com/7363
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-01-21 15:09:31 +00:00
Mike Reed
17b5e5c591 minor cleanups in newly privatized device headers
BUG=skia:

Change-Id: Id6ebd54f404b5f0869d96368b98957ac10a2083f
NOTREECHECKS=True
Reviewed-on: https://skia-review.googlesource.com/7369
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-01-21 04:26:20 +00:00
Mike Reed
288e471eda clipstack is now private
BUG=skia:

Change-Id: I91e601d59eb5d46de17c280898ca01fcfab89e5c
NOTREECHECKS=True
Reviewed-on: https://skia-review.googlesource.com/7362
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-01-21 03:22:28 +00:00
Brian Osman
8ccbbb455c Remove SkImage::MakeTextureFromPixmap
Another step towards reducing the number of texture upload paths.

BUG=skia:

Change-Id: Ica185e7334f52dc9ebf87e21fe6f60589ef87bb3
Reviewed-on: https://skia-review.googlesource.com/7346
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-01-20 20:26:59 +00:00
Florin Malita
5b2f579331 Replace raster pipeline nextafter() calls with SkNu nudging
(courtesy of mtklein@)

  nanobench -m gradient_linear_clamp\$ --config f16 --ms 2000 -q

Before: 753.66
After:  658.69

R=mtklein@google.com,herb@google.com

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD

Change-Id: Ie1442da340f6cfc9aef65bec1f114c0e5db89fcb
Reviewed-on: https://skia-review.googlesource.com/7351
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-01-20 20:25:57 +00:00
Brian Salomon
5be6c95fa9 Revert "Revert "Make it possible to query GrXPFactory for dst texture without GrPipelineAnalysis.""
This reverts commit 3329cceab5.

Reason for revert: Bot failures are unrelated to the original change.

Change-Id: I21b5927dc4384a25930bdefe16e57bcc9276ffa4
Reviewed-on: https://skia-review.googlesource.com/7347
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-01-20 20:04:01 +00:00