Jim Van Verth [Thu, 2 Feb 2017 18:06:31 +0000 (13:06 -0500)]
Spot shadow cleanup and optimization
Fixes clip polygon and centroid calculation.
Clips interior umbra region against original path.
BUG=skia:6119
Change-Id: I37a740ae004c38b75405e05158d92cf9fd954eda
Reviewed-on: https://skia-review.googlesource.com/7823
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Ethan Nicholas [Thu, 2 Feb 2017 15:43:58 +0000 (10:43 -0500)]
Revert "Replaced all calls to fragmentPosition() with sk_FragCoord"
This reverts commit
de4d301881e7fd084f1f0b359ec6f9b2bf8bd4c5.
Reason for revert: several Chrome rendering bugs on Mac
BUG=skia:
Change-Id: I492082b0b7e7c902ede4b598c5809f604d210ce1
Reviewed-on: https://skia-review.googlesource.com/7887
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Florin Malita [Wed, 1 Feb 2017 23:01:43 +0000 (15:01 -0800)]
Don't instantiate shaders with non-invertible local matrix
Change-Id: If11f7d57cbf45929632d858f91c02d8f5fa9f442
Reviewed-on: https://skia-review.googlesource.com/7885
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Robert Phillips [Thu, 2 Feb 2017 15:06:18 +0000 (10:06 -0500)]
Force instantiation in GaussianBlur to hopefully prevent (and diagnose) Chrome crash
BUG=687174
Change-Id: Ieb9930feca9abad9220a1a099e7dd247e6eff70e
Reviewed-on: https://skia-review.googlesource.com/7920
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Hal Canary [Thu, 2 Feb 2017 15:03:22 +0000 (10:03 -0500)]
Revert "Revert "SkScalar: delete code that doesn't compile.""
This reverts commit
8233fc82b00763d37a7b0db7890b15c7d58939d4.
Change-Id: Ia32ccdb3b385ed28e1b41e553c7d80cf803522cc
Reviewed-on: https://skia-review.googlesource.com/7899
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
Eric Boren [Thu, 2 Feb 2017 14:02:37 +0000 (09:02 -0500)]
Copy modules back in from skia-recipes repo
BUG=skia:6070
Change-Id: I86b3f039c27bd8287516c1db8bd1cae62888171b
Reviewed-on: https://skia-review.googlesource.com/7890
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
Leon Scroggins [Thu, 2 Feb 2017 13:12:23 +0000 (13:12 +0000)]
Revert "SkScalar: delete code thqat doesn't compile."
This reverts commit
565da18f6e4a0f04dc836ce9d35f31bee31644f7.
Reason for revert: breaking android roll:
https://googleplex-android-review.git.corp.google.com/#/c/1853481/-1..1
Some code in Android references SK_SCALAR_IS_FLOAT:
https://cs.corp.google.com/android/frameworks/base/core/jni/android/graphics/Interpolator.cpp?q=frameworks/base/core/jni/android/graphics/Interpolator.cpp&sq=package:android&l=30
Original change's description:
> SkScalar: delete code thqat doesn't compile.
>
> Change-Id: I8a5c404d6151fca79af5c5a98d4b44924c0ade52
> Reviewed-on: https://skia-review.googlesource.com/7882
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Hal Canary <halcanary@google.com>
>
TBR=halcanary@google.com,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I4df06c4593abaa3ac3877b270a41aec7a9c3fc8f
Reviewed-on: https://skia-review.googlesource.com/7888
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Eric Boren [Wed, 1 Feb 2017 20:56:55 +0000 (15:56 -0500)]
gen_tasks.go: Read jobs, Android, and GPU mappings from a JSON file
BUG=skia:6070
Change-Id: I02edcb0b1a98967e5d84f89a5ef578b36efadd8f
Reviewed-on: https://skia-review.googlesource.com/7825
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Hal Canary [Tue, 31 Jan 2017 18:50:44 +0000 (13:50 -0500)]
make GR_TEST_UTILS=0 work
Change-Id: Icce35140ca08b65217b32e6b1ffc6ad2f38ab37f
Reviewed-on: https://skia-review.googlesource.com/7840
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
Robert Phillips [Wed, 1 Feb 2017 19:45:04 +0000 (14:45 -0500)]
Have Vulkan advertise that compressed textures are currently unsupported
This allows the ProxyTest to run on the Vulkan backend.
Change-Id: I89a3212bdc2d4a1ceb0c27d0ff60f558d7b12647
Reviewed-on: https://skia-review.googlesource.com/7880
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Hal Canary [Wed, 1 Feb 2017 19:47:57 +0000 (14:47 -0500)]
SkScalar: delete code thqat doesn't compile.
Change-Id: I8a5c404d6151fca79af5c5a98d4b44924c0ade52
Reviewed-on: https://skia-review.googlesource.com/7882
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
Matt Sarett [Wed, 1 Feb 2017 23:34:22 +0000 (15:34 -0800)]
Prepare to test all image decode modes to F16
I've only been running F16 tests in "colorImage" mode.
We really should be running our "image" tests to F16 as well - so
they can be tested with scaling, subsets, etc.
This CL fixes bugs so that we can enable those tests.
BUG=skia:
Change-Id: I8137eb4fce7ea12f2c9d233a029d946d4a63e6b0
Reviewed-on: https://skia-review.googlesource.com/7801
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Brian Salomon [Wed, 1 Feb 2017 17:23:25 +0000 (12:23 -0500)]
Add a GM for SkShadowUtils and fix a few issues.
1) Transform the path center to device space before computing the shadow offset.
2) Modulate the shadow color by the color filter's output color.
3) Make the scale of path points in the spot tessellator be relative to the path centroid.
4) Clamp the shadow alphas at 1.
Change-Id: I480476df79b959f11c1eca0ba2a49a134d355cbb
Reviewed-on: https://skia-review.googlesource.com/7860
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Brian Salomon [Wed, 1 Feb 2017 19:23:56 +0000 (14:23 -0500)]
Roll skia-recipes to pick up shadow_utils blacklist.
Change-Id: I11dd76fcb687e46c708feb725aef6f1102d74d0a
Reviewed-on: https://skia-review.googlesource.com/7881
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Brian Salomon [Wed, 1 Feb 2017 17:07:17 +0000 (12:07 -0500)]
Add caching of ambient and spot shadow meshes.
Change-Id: If882186225621af4af4b4ddae0c786ec33ff40f3
Reviewed-on: https://skia-review.googlesource.com/7643
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Robert Phillips [Wed, 1 Feb 2017 16:14:57 +0000 (11:14 -0500)]
Disable Vulkan backend in DeferredProxyTest (for now)
With the expansion in https://skia-review.googlesource.com/c/7864/ (Add test for proactive proxy-creation failure) the ProxyTest is now failing for the PixelXL and N6p in Vulkan mode
Change-Id: Iebefa1be4f1a5deb450e1f2083a06f3f2249c382
Reviewed-on: https://skia-review.googlesource.com/7870
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Kevin Lubick [Wed, 1 Feb 2017 16:10:32 +0000 (11:10 -0500)]
Update to ubuntu 16.10 to see if a driver update helps
BUG=skia:6186
Change-Id: I7e76ca2c76b287e03c046076745130ebae50efbe
Reviewed-on: https://skia-review.googlesource.com/7869
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Robert Phillips [Wed, 1 Feb 2017 15:53:20 +0000 (10:53 -0500)]
Fix memory leak in DeferredProxyTest
Change-Id: Ib183f71e972b0756b8558098dabe32b6934c0847
Reviewed-on: https://skia-review.googlesource.com/7866
Commit-Queue: Robert Phillips <robertphillips@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Robert Phillips [Tue, 31 Jan 2017 22:53:34 +0000 (17:53 -0500)]
Expand SkImage::getTextureHandle call
AFAICT cc/output/gl_renderer.cc only calls SkImage:getTexture to determine the origin of the backing GrTexture. What do y'all think of this CL as a means of removing that call to getTexture?
One alternative would be to add a new entry point like:
bool SkImage::getBackendTextureDesc(GrBackendTextureDesc* desc) const;
which fills in the entire desc and returns whether the image is texture backed.
Change-Id: Idd302c0a11d69ad08e0100bcf546b3bbaa7cf27e
Reviewed-on: https://skia-review.googlesource.com/7788
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Robert Phillips [Tue, 31 Jan 2017 23:24:12 +0000 (18:24 -0500)]
Broaden checking of GrSurfaceProxy::MakeDeferred's return value
We now expect MakeDeferred to baulk if the ultimate texture/rendertarget will not be instantiable.
Added checks for MakeWrapped too since, technically, it too can baulk.
BUG=676753
Change-Id: I3e052ebf98303fc46124272082c10f303d89da27
Reviewed-on: https://skia-review.googlesource.com/7830
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Robert Phillips [Wed, 1 Feb 2017 14:20:00 +0000 (09:20 -0500)]
Add test for proactive proxy-creation failure
This is a follow up to https://skia-review.googlesource.com/c/7828/ (Add more pre-checks to surfaceProxy creation)
BUG=687174
Change-Id: I97385afbdaf1881b806ee37737020564e3f4d444
Reviewed-on: https://skia-review.googlesource.com/7864
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Hans Wennborg [Wed, 1 Feb 2017 00:14:24 +0000 (16:14 -0800)]
GR_PROXY_MOVE: Work around Win/Clang eval order bug
BUG=chromium:687259
Change-Id: I145dac240a3c4f89cf1b6bf6ff54ba73cd110ebf
Reviewed-on: https://skia-review.googlesource.com/7831
Reviewed-by: Hans Wennborg <hwennborg@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Eric Boren [Wed, 1 Feb 2017 13:13:34 +0000 (08:13 -0500)]
Move presubmit bot to skia.swarmbucket
BUG=skia:6183
Change-Id: Ib678c83f46f453b561101cdc12ee637a4e51fb17
Reviewed-on: https://skia-review.googlesource.com/7863
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
Robert Phillips [Tue, 31 Jan 2017 22:25:29 +0000 (17:25 -0500)]
Add more pre-checks to surfaceProxy creation
Chrome is seeing crashes in GrProcessor::TextureSampler::reset when
the textures are being instantiated. This CL moves more potential
failures cases up-stack.
BUG=687174
Change-Id: I014acff9730ffd1e8ac178611372ed4dedbd82f3
Reviewed-on: https://skia-review.googlesource.com/7828
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Robert Phillips [Tue, 31 Jan 2017 12:40:33 +0000 (07:40 -0500)]
Update SkSurface's cached image ownership handling to sk_sp
Change-Id: I9dca3d355bfe39211cb5054a5834d9c1750d8152
Reviewed-on: https://skia-review.googlesource.com/7780
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Herb Derby [Tue, 31 Jan 2017 20:30:44 +0000 (15:30 -0500)]
WS: remove trailing WS.
TBR=stani@google.com
Change-Id: I8d2b86697797977ed153cc65e2ca63941677c010
Reviewed-on: https://skia-review.googlesource.com/7826
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Mike Klein [Tue, 31 Jan 2017 18:26:15 +0000 (13:26 -0500)]
Make flag parsing work in GN-built iOS nanobench.
Just like DM.
CQ_INCLUDE_TRYBOTS=skia.primary:Test-iOS-Clang-iPadMini4-GPU-GX6450-Arm7-Debug,Build-Mac-Clang-arm64-Debug-GN_iOS
Change-Id: I4af3fa1813e3b7ee48407096e91373b5fee569c7
Reviewed-on: https://skia-review.googlesource.com/7824
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Mike Klein [Tue, 31 Jan 2017 17:07:33 +0000 (12:07 -0500)]
Automate more parts of gn/package_ios.py.
We can determine the signing identity by running 'security',
and can find an installed mobile provisioning profile by
looking in the directory where they're installed.
Change-Id: Ia6a4579ef1918b5337cdf8745ac1e39743b38252
Reviewed-on: https://skia-review.googlesource.com/7798
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Robert Phillips [Tue, 31 Jan 2017 16:31:39 +0000 (11:31 -0500)]
Reduce use of SkImage_Base::peekTexture
Change-Id: I079093c9706df4911d47fba04b786e59240e8cb4
Reviewed-on: https://skia-review.googlesource.com/7792
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Mike Klein [Mon, 30 Jan 2017 19:00:54 +0000 (14:00 -0500)]
gn: iOS packaging script
This is enough to run DM on my iPad.
I've tweaks DM so that it can run as built by both GN and GYP.
When we kill off GYP, all the dm_main() nonsense goes away.
CQ_INCLUDE_TRYBOTS=skia.primary:Test-iOS-Clang-iPadMini4-GPU-GX6450-Arm7-Debug,Build-Mac-Clang-arm64-Debug-GN_iOS
Change-Id: I59176bc203ee3180618b94ac5f9d291e0ad20b62
Reviewed-on: https://skia-review.googlesource.com/7757
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Hal Canary <halcanary@google.com>
Brian Salomon [Tue, 31 Jan 2017 16:33:11 +0000 (11:33 -0500)]
Fix assert in SkShadowVertices constructor
Change-Id: Icedbe70079d41234c98330af64d71a4e60b67f1c
Reviewed-on: https://skia-review.googlesource.com/7796
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Brian Salomon [Tue, 31 Jan 2017 16:26:26 +0000 (11:26 -0500)]
Work around GCC 4.6 issue with constructing unique_ptr<const T[]> from a T*.
Change-Id: I74f309f56e5042ad58c7e959d5bc434de1446efa
Reviewed-on: https://skia-review.googlesource.com/7793
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Ravi Mistry [Tue, 31 Jan 2017 14:49:18 +0000 (09:49 -0500)]
Add GN target for skpinfo
BUG=skia:6178
Change-Id: If6f96063fcb4e541da560ff00b925fd8098ce6b9
Reviewed-on: https://skia-review.googlesource.com/7791
Commit-Queue: Ravi Mistry <rmistry@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Brian Salomon [Mon, 30 Jan 2017 22:01:28 +0000 (17:01 -0500)]
Make SkShadowUtils tessellations ref counted in preparation for caching them.
Change-Id: I60133fcc4101a27bcc3e7ad38e7348ad9147b8a9
Reviewed-on: https://skia-review.googlesource.com/7784
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Florin Malita [Mon, 30 Jan 2017 17:08:05 +0000 (12:08 -0500)]
SkRasterPipeline shader adapter
Reland of https://skia-review.googlesource.com/c/7615.
(lifted from https://skia-review.googlesource.com/c/7088/)
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD
Change-Id: I797a2f0ae80209c8637875418e08d2fa03249672
Reviewed-on: https://skia-review.googlesource.com/7731
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Greg Daniel [Mon, 30 Jan 2017 21:33:57 +0000 (16:33 -0500)]
Make sure to preserve stencil on vulkan copy as draws
BUG=skia:
Change-Id: I65a7eebe2024585e0696f8185b8ae9af5069f459
Reviewed-on: https://skia-review.googlesource.com/7782
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Hal Canary [Mon, 30 Jan 2017 22:09:04 +0000 (17:09 -0500)]
delete project.pbxproj
Change-Id: Ibe6ab90eeeb76a8c75f2e8c2d881b099265a3f8e
Reviewed-on: https://skia-review.googlesource.com/7785
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
Stephen White [Mon, 30 Jan 2017 19:31:31 +0000 (14:31 -0500)]
GrTessellator (AA): improve AA quality for near-overlapping paths.
When path features are very close together, the outer contours can
overlap. This causes the connector edges (the ones joining the inner and
outer vertices) to intersect other edges. Lerping the alpha along the
connector edge gives us a good approximation of the coverage at that
point.
BUG=skia:
Change-Id: I56bcc570fc185344c5f84d11ef995d3940a08793
Reviewed-on: https://skia-review.googlesource.com/7701
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Stephan White <senorblanco@chromium.org>
Hal Canary [Mon, 30 Jan 2017 21:58:32 +0000 (16:58 -0500)]
delete SkLayer.cpp
Change-Id: I7c0325daef62948ea9f5ef58a06236be502f3ef7
Reviewed-on: https://skia-review.googlesource.com/7783
Commit-Queue: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Leon Scroggins III [Mon, 30 Jan 2017 18:55:14 +0000 (13:55 -0500)]
GIF: Only report a frame after knowing dependency
Previously, getFrameInfo might report a frame that was truncated prior
to setting its requiredFrame. As a result, fRequiredFrame may be
different depending on how much data has already been received.
If there is a local color table, do not report the frame until the
color table has been received, since that is used to determine
fRequiredFrame. If there is no local color table, set fRequiredFrame
and report the frame after reading the header.
Add a test.
Replace make_from_resource with GetResourceAsData
Change-Id: I1b697f766c1d0e1e12ab2ae1d27167af5193395d
Reviewed-on: https://skia-review.googlesource.com/7756
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Mike Reed [Mon, 30 Jan 2017 13:54:04 +0000 (08:54 -0500)]
remove unused SkLayer
BUG=skia:
Change-Id: Ia3b53bd3811a3b9246668739c304ad3654699da0
Reviewed-on: https://skia-review.googlesource.com/7737
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Jim Van Verth [Mon, 30 Jan 2017 19:49:21 +0000 (14:49 -0500)]
Fix SkShadowTessellator.cpp for Chrome iOS build
BUG=skia:6119
Change-Id: I6ddd51c2ebc04e5f8ae29459dc818f0d96ace073
Reviewed-on: https://skia-review.googlesource.com/7758
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Robert Phillips [Mon, 30 Jan 2017 19:15:59 +0000 (14:15 -0500)]
Add test for outre GrSurfaceProxy requests
This would've caught the N7 failure in https://skia-review.googlesource.com/c/7738/ (Make blur utils take GrTextureProxies)
Change-Id: I67b56c9d38c14829b2812253c2e3f3e54eb585a5
Reviewed-on: https://skia-review.googlesource.com/7751
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Hal Canary [Mon, 30 Jan 2017 18:18:43 +0000 (13:18 -0500)]
experimental/documentation/gerrit.md: more detail
NOTRY=true
Change-Id: I386013af35ae2a8b51fa78109ebd89a826334839
Reviewed-on: https://skia-review.googlesource.com/7754
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Robert Phillips [Mon, 30 Jan 2017 18:27:37 +0000 (13:27 -0500)]
Rationalize GrContext's Gr*Proxy getter naming
This CL replaces the entry points:
asDeferredSurface
asDeferredTexture
asDeferredRenderTarget
with:
GrSurfaceProxy* asSurfaceProxy
sk_sp<GrSurfaceProxy> asSurfaceProxyRef
GrTextureProxy* asTextureProxy
sk_sp<GrTextureProxy> asTextureProxyRef
GrRenderTargetProxy* asRenderTargetProxy
sk_sp<GrRenderTargetProxy> asRenderTargetProxyRef
Change-Id: I7c2b1ea3d702023ff23019815ca13c9ff6f3b32d
Reviewed-on: https://skia-review.googlesource.com/7741
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Jim Van Verth [Mon, 30 Jan 2017 18:11:45 +0000 (13:11 -0500)]
Change shadow tessellators to use SkColor and move to util.
BUG=skia:6119
Change-Id: I4c4a8933c663ccc057596318a06c538175b9f16b
Reviewed-on: https://skia-review.googlesource.com/7726
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Robert Phillips [Mon, 30 Jan 2017 17:26:47 +0000 (12:26 -0500)]
Make blur utils take GrTextureProxies - take 2
This is a re-land of https://skia-review.googlesource.com/c/7738/ (Make blur utils take GrTextureProxies) with a fix for the Nexus7
Change-Id: I5821a26b1e986daa11d960ae826a1207512cd2a0
Reviewed-on: https://skia-review.googlesource.com/7746
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Hal Canary [Mon, 30 Jan 2017 17:50:18 +0000 (12:50 -0500)]
experimental/documentation/gerrit.md: fix markdown
https://skia.googlesource.com/skia/+/master/experimental/documentation/gerrit.md
NOTRY=true
Change-Id: Id7fcb90c563dfb7cd160421d18ae84fd442eb98e
Reviewed-on: https://skia-review.googlesource.com/7752
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
Hal Canary [Mon, 30 Jan 2017 17:27:14 +0000 (12:27 -0500)]
experimental/documentation/gerrit.md: improvements
https://skia.googlesource.com/skia/+/master/experimental/documentation/gerrit.md
NOTRY=true
Change-Id: I90d8e16e9d6146fefe0199bb98d5f8eea31d4e8f
Reviewed-on: https://skia-review.googlesource.com/7750
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
Eric Boren [Mon, 30 Jan 2017 16:15:44 +0000 (11:15 -0500)]
Fix PDFium bot
Sync pdfium/third_party/skia to the correct revision and apply the patch
there, as opposed to maintaining a parallel Skia checkout and attempting
to use that.
(Rolls recipe DEPS for skia-recipes)
BUG=skia:6120
Change-Id: I6e1fa46741d7ccb0d950ef8a59c6174da7967ff2
Reviewed-on: https://skia-review.googlesource.com/7747
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
Yuqian Li [Mon, 30 Jan 2017 16:33:46 +0000 (11:33 -0500)]
Implement onAppendStages for SkPictureShader
BUG=skia:
Change-Id: Ibc525a666f17fed1d987c0316b1963ebed7de343
Reviewed-on: https://skia-review.googlesource.com/7739
Commit-Queue: Yuqian Li <liyuqian@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Mike Reed [Sun, 29 Jan 2017 13:55:03 +0000 (08:55 -0500)]
remove SkArithmeticMode.h empty header
needs associated fix in critique to land, removing a reference to the header.
BUG=skia:
Change-Id: I55c919e0cca801ea424641253d3fb406cb73fd12
Reviewed-on: https://skia-review.googlesource.com/7729
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Leon Scroggins III [Mon, 30 Jan 2017 14:59:28 +0000 (09:59 -0500)]
Do not crash when the resources are missing
In test_conversion_possible
BUG=skia:5314
Change-Id: Ia0e4178a262820b4161e55e07b0669f18322a64b
Reviewed-on: https://skia-review.googlesource.com/7742
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Brian Salomon [Sun, 29 Jan 2017 14:34:17 +0000 (09:34 -0500)]
Make SkGpuDevice::drawVertices perform color byte order swap and premul step using vertex shader.
Change-Id: I8153ba8c6bb48d8b15d524fbfafbe3c6d83f39c5
Reviewed-on: https://skia-review.googlesource.com/7727
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Hal Canary [Fri, 13 Jan 2017 18:49:18 +0000 (13:49 -0500)]
bin/fetch-gn is 3.5x faster
Change-Id: I8098a38eb81efe0a73201c1f00dff8363b9c2075
Reviewed-on: https://skia-review.googlesource.com/7025
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Robert Phillips [Mon, 30 Jan 2017 15:58:27 +0000 (15:58 +0000)]
Revert "Make blur utils take GrTextureProxies"
This reverts commit
d0dc05b98b71af43b44f13beba1292db52b75539.
Reason for revert: assertion failure on N7
Original change's description:
> Make blur utils take GrTextureProxies
>
> Change-Id: I1c5054de6d9827eece2f73c4c78818b4db0bc611
> Reviewed-on: https://skia-review.googlesource.com/7738
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
>
TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I82d9385e23279db4c7a6757f1224e603e231354c
Reviewed-on: https://skia-review.googlesource.com/7744
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Robert Phillips [Mon, 30 Jan 2017 14:14:04 +0000 (09:14 -0500)]
Make blur utils take GrTextureProxies
Change-Id: I1c5054de6d9827eece2f73c4c78818b4db0bc611
Reviewed-on: https://skia-review.googlesource.com/7738
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Eric Boren [Mon, 30 Jan 2017 13:40:08 +0000 (08:40 -0500)]
Roll Recipe DEPS
BUG=skia:
Change-Id: I9a88c578e53f5df1ad3bf06df7469bf010bdae21
Reviewed-on: https://skia-review.googlesource.com/7736
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Robert Phillips [Mon, 30 Jan 2017 13:06:27 +0000 (08:06 -0500)]
Push GrTextureProxy down to more effects
Change-Id: Ie3f32a88f25af082c25bc6daf3fe24e303e80f9e
Reviewed-on: https://skia-review.googlesource.com/7616
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Ben Wagner [Mon, 30 Jan 2017 02:50:51 +0000 (21:50 -0500)]
Omit new test from Bazel ASAN.
BUG=skia:
Change-Id: Id22973cc861a41e5e72561cd47acdcc81e2824b0
Reviewed-on: https://skia-review.googlesource.com/7732
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Florin Malita [Sun, 29 Jan 2017 16:42:42 +0000 (16:42 +0000)]
Revert "SkRasterPipeline shader adapter"
This reverts commit
6d11ed2951fadc281433606a8edc6774bed39735.
Build failure: https://chromium-swarm.appspot.com/task?id=
3403da0cdee8c210&refresh=10
../../../src/core/SkOpts.cpp -o obj/src/core/libskia.SkOpts.o
In file included from ../../../src/core/SkOpts.cpp:46:
../../../src/opts/SkRasterPipeline_opts.h:1093:11: error: no member named 'Load4' in '(anonymous namespace)::SkNx<8, float>'
SkNf::Load4(buf, &r, &g, &b, &a);
~~~~~~^
1 error generated.
Leak: https://chromium-swarm.appspot.com/task?id=
3403df55fd5eaa10&refresh=10
Original change's description:
> SkRasterPipeline shader adapter
>
> (lifted from https://skia-review.googlesource.com/c/7088/)
>
> R=mtklein@google.com,herb@google.com,reed@google.com
>
> CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD
>
> Change-Id: Idddb84069423c5fc535bea0a65a5b21a4d07084d
> Reviewed-on: https://skia-review.googlesource.com/7615
> Commit-Queue: Florin Malita <fmalita@chromium.org>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Mike Reed <reed@google.com>
>
TBR=mtklein@chromium.org,mtklein@google.com,herb@google.com,fmalita@chromium.org,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD
Change-Id: I68c0be3398bde93cd0842baf25b025c5fe1c3df7
Reviewed-on: https://skia-review.googlesource.com/7730
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Florin Malita [Fri, 27 Jan 2017 21:41:22 +0000 (16:41 -0500)]
SkRasterPipeline shader adapter
(lifted from https://skia-review.googlesource.com/c/7088/)
R=mtklein@google.com,herb@google.com,reed@google.com
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD
Change-Id: Idddb84069423c5fc535bea0a65a5b21a4d07084d
Reviewed-on: https://skia-review.googlesource.com/7615
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Brian Salomon [Thu, 26 Jan 2017 16:25:12 +0000 (11:25 -0500)]
Rename GrFragmentProcessor::MulOutputByInputUnpremulColor to MakeInputPremulAndMulByOutput.
Change-Id: I33d74ddb8a7836e8f1922a5ae73f0adb74d59db3
Reviewed-on: https://skia-review.googlesource.com/7609
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
herb [Sat, 28 Jan 2017 20:42:16 +0000 (15:42 -0500)]
Make SkSmallAllocator obey alignment properties of objects.
TBR=mtklein@google.com
Change-Id: I505590f18a7e5babc9f0fc8af07d89b774d267bf
Reviewed-on: https://skia-review.googlesource.com/7728
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Matt Sarett [Fri, 27 Jan 2017 23:16:40 +0000 (18:16 -0500)]
Update SkJPEGImageEncoder
(1) Use libjpeg-turbo color space extensions when possible.
(2) Use transform_scanline_procs when pre-libjpeg-turbo transformation
are required.
(3) Add support for Gray and F16.
BUG=skia:
Change-Id: I77b977cb8c9e0afc17d907dd73a1cf3f16539bcc
Reviewed-on: https://skia-review.googlesource.com/7642
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
Florin Malita [Fri, 27 Jan 2017 20:39:32 +0000 (15:39 -0500)]
Add missing nextafter() clamping to SkLinearBitmapPipeline tile procs
Fixes the asserts trigered in
https://skia-review.googlesource.com/c/7615
Change-Id: I7e1802bc699becf85396445fe0df4cb110ab69c4
Reviewed-on: https://skia-review.googlesource.com/7720
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
Stephen White [Fri, 27 Jan 2017 15:53:15 +0000 (10:53 -0500)]
AA GrTessellator: fix bevelling of acute angles.
The code to handle acute outer angles in generated geometry was pretty
broken: it did a simple runnning average of consecutive acute vertices,
and didn't handle acute angles between the last and first edges.
Replaced it with something simpler that does proper bevelling for
angles less than 2.5 degrees.
This revealed a bug with thin path segments, exposed by the thinconcavepaths
test. This will be fixed by upcoming changes, but I've also dded a few more
test cases to make it clearer.
Change-Id: I23a628ab2e16acaab798c746a5fd87842cacbfab
Reviewed-on: https://skia-review.googlesource.com/7660
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Stephan White <senorblanco@chromium.org>
Hal Canary [Fri, 27 Jan 2017 18:33:55 +0000 (13:33 -0500)]
experimental/documentation/gerrit.md
NOTRY=true
Change-Id: I5f429b48732ca99409cb923c2a3d7bf5f4189d24
Reviewed-on: https://skia-review.googlesource.com/7723
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
Lee Salzman [Fri, 27 Jan 2017 19:31:10 +0000 (14:31 -0500)]
verify that glyph position rect is non-empty in GrAtlasTextBlob::appendGlyph
BUG=skia:
Change-Id: I35d170480cb3320a9d116e34aaf740aa201a294f
Reviewed-on: https://skia-review.googlesource.com/7700
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Leon Scroggins III [Thu, 26 Jan 2017 22:21:27 +0000 (17:21 -0500)]
Generate Android build targets for dm and nanobench
Generate targets for dm and nanobench from ninja and add them to the
generated Android.bp file.
Remove nanobenchAndroid and SkAndroidSDKCanvas. These rely on HWUI
internals and are currently unused.
Update gyp file references to removed files, just in case.
Change-Id: Ic6ae18a70bfd0c33804e7996d077f2081dfdfe07
Reviewed-on: https://skia-review.googlesource.com/7635
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Jim Van Verth [Fri, 27 Jan 2017 19:15:54 +0000 (14:15 -0500)]
Add geometric version of spot shadow
BUG=skia:6119
Change-Id: Ib9770bd88f4eebd68f2d893c5788f966d89f193c
Reviewed-on: https://skia-review.googlesource.com/7585
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Leon Scroggins III [Thu, 26 Jan 2017 22:28:35 +0000 (17:28 -0500)]
Remove old generator code
We're generating Android.bp from BUILD.gn, so no need for the old
version.
Change-Id: Ie5bcec1d4f15d0e9a178feb9191e42c872bd8e08
Reviewed-on: https://skia-review.googlesource.com/7639
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Leon Scroggins III [Fri, 27 Jan 2017 18:16:28 +0000 (13:16 -0500)]
Set fOptions in SkCodec::getPixels
Subclasses sometimes try to read fOptions, but it used to not get set
for full decodes. As a result, they might be reading the Options from a
previous scanline/incremental decode. In addition to being wrong, this
is bad in the case of an fSubset pointing to a rectangle that no longer
exists.
So set fOptions in getPixels, prior to any attempts to read it by sub-
classes. Use a different workaround for the webp/incomplete bug. Set
fSubset to null prior to calling fillIncompleteImage. It can only be
non-null for webp, and in that case we do not want the fill call to
be using the subset width.
Modify the Codec_jpeg_rewind test to use an incomplete image, so that
it will also test fillIncompleteImage.
DM tests of inc0.webp and inc1.webp will verify that the incomplete
bug has not resurfaced.
BUG=skia:5772
Change-Id: If5e1e3c9a7f337183783299c0a9e58dcbbc84119
Reviewed-on: https://skia-review.googlesource.com/7682
Commit-Queue: Matt Sarett <msarett@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Mike Reed [Fri, 27 Jan 2017 16:59:07 +0000 (11:59 -0500)]
give up on big cubics (for now) and just draw a line
BUG=683631, skia:6152
Change-Id: I69aa741af74a37e1d7bed25ad0401535599f6af0
Reviewed-on: https://skia-review.googlesource.com/7659
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Hal Canary [Fri, 27 Jan 2017 13:20:17 +0000 (08:20 -0500)]
SkTScopedComPtr: implicit nullptr cast to SkTScopedComPtr<T>()
Change-Id: Ic09da242650eb20164f31333e912fc899428c548
Reviewed-on: https://skia-review.googlesource.com/7634
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
Florin Malita [Fri, 27 Jan 2017 17:05:27 +0000 (12:05 -0500)]
Remove SkBlitter:resetShaderContext()
Refactor SkDraw::drawVertices() to reset the whole blitter instead.
No noticeable bench diff.
out/Release/nanobench --config 8888 -m patch_grid_colors_tex
Before:
9/9 MB 1 9.24ms 11.4ms 11.5ms 15ms 16% █▆▅▄▄▃▂▂▁▁ 8888 patch_grid_colors_texs_big
9/9 MB 1 5.2ms 5.2ms 5.2ms 5.21ms 0% █▃▂▁▂▂▃▂▂▁ 8888 patch_grid_colors_texs_medium
9/9 MB 2 378µs 380µs 380µs 382µs 0% █▆▅▄▄▁▄▄▆▄ 8888 patch_grid_colors_texs_small
After:
9/9 MB 1 9.29ms 11.5ms 11.6ms 15.3ms 17% █▇▅▄▄▃▂▂▁▁ 8888 patch_grid_colors_texs_big
9/9 MB 1 5.15ms 5.16ms 5.16ms 5.18ms 0% █▄▁▁▄▂▁▂▃▂ 8888 patch_grid_colors_texs_medium
9/9 MB 2 378µs 380µs 380µs 382µs 0% █▅▄▃▁▄▄▄▃▄ 8888 patch_grid_colors_texs_small
R=reed@google.com,mtklein@google.com,herb@google.com
BUG=skia:6168
Change-Id: I0b6b7d1297323681d8d2838040450c4e1afabc17
Reviewed-on: https://skia-review.googlesource.com/7626
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Hal Canary [Fri, 27 Jan 2017 16:57:13 +0000 (11:57 -0500)]
tools/git-sync-deps improvements
* Use `/usr/bin/env python` patten: more robust on non-standard systems.
* Factor out status line, make formatting clearer.
* Alwyas call `git remote set-url origin $repo` since it is quick.
* Find `fetch-gn` script more robustly.
* `--help` works again.
* handling deps_os better
* check to see that directories don't include each other
Change-Id: I06806226e2c263147723c6326c09c5e385abc68d
Reviewed-on: https://skia-review.googlesource.com/7646
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Hal Canary <halcanary@google.com>
Robert Phillips [Fri, 27 Jan 2017 15:58:31 +0000 (10:58 -0500)]
Add utilities to create GrSurfaceProxy & GrSurfaceContext from backend descs
Change-Id: Iff2278de8ddd6c0dff74e5cf1996702bad31217b
Reviewed-on: https://skia-review.googlesource.com/7647
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Florin Malita [Fri, 27 Jan 2017 15:51:58 +0000 (10:51 -0500)]
Raster pipeline support for SkLocalMatrixShader composition
Plumb a local matrix arg to onAppendStages, similar to onCreateContext's
ContextRec::fLocalMatrix.
Change-Id: I6db3706918733b35eb7a3ae2cc65503223d0cf2d
Reviewed-on: https://skia-review.googlesource.com/7653
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Greg Daniel [Tue, 24 Jan 2017 20:12:12 +0000 (15:12 -0500)]
Add offset to uniform blocks in Vulkan
This is the first step to being able to use push constants.
BUG=skia:5039
Change-Id: I49edea8faacf78814036ce3b3f9f2814974cf2c7
Reviewed-on: https://skia-review.googlesource.com/7448
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Brian Salomon [Fri, 27 Jan 2017 15:59:27 +0000 (10:59 -0500)]
Revert "Revert "Start of rewrite of GrFragmentProcessor optimizations.""
This reverts commit
052fd5158f7f85e478a9f87c45fecaacf7d0f5f3.
Disables the test (of unused code) until platform-specific issues are addressed.
Change-Id: I7aa23a07954fccf382aa07d28afcbffb0bebcd6d
Reviewed-on: https://skia-review.googlesource.com/7656
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Hal Canary [Fri, 27 Jan 2017 15:59:40 +0000 (10:59 -0500)]
bin/sync : call tools/git-sync-deps now
Also, update some docs.
NOTRY=true
Change-Id: I7ad3375fc1cbf8f71ed42a460ecfe29ef6c1d85e
Reviewed-on: https://skia-review.googlesource.com/7657
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
Robert Phillips [Fri, 27 Jan 2017 15:11:42 +0000 (10:11 -0500)]
Consolidate read/write-Pixels testing code - take 2
Change-Id: I0de058a9eec749a7086138ac2eb79732f06ce55e
Reviewed-on: https://skia-review.googlesource.com/7650
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Ethan Nicholas [Fri, 27 Jan 2017 15:34:34 +0000 (15:34 +0000)]
Revert "Start of rewrite of GrFragmentProcessor optimizations."
This reverts commit
85eb4226a4cd8c10a0e3f3ba2f3a60efbb2dd61b.
Reason for revert: test failures on Windows, e.g. https://chromium-swarm.appspot.com/task?id=
33f9527484414110&refresh=10
Original change's description:
> Start of rewrite of GrFragmentProcessor optimizations.
>
> This adds a replacement for computeInvariantOutput buts does not use it yet. The replacement allows for three types of optimizations:
>
> * known input color -> known output color for GrFP elimination
> * tracking of whether all color processors modulate their input for the "tweak alpha" optimziation
> * opaqueness tracking
>
> This loses some of the generality of computInvariantOutput. It does not track the known output status of individual color components (other than opaque alpha). It does not track whether GrFragmentProcessors read their input color. It doesn't allow a processor that will receive non-constant output to advertise that it produces a constant output. These could probably be added back in the unlikely case that they prove valuable.
>
> Unlike computeInvariantOutput the optimizations are decided at instantiation time and constant colors are expressed as GrColor4f rather than GrColor.
>
> Change-Id: I684d3f9050693dde2d28154fa695e049ed8cf61a
> Reviewed-on: https://skia-review.googlesource.com/7481
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
>
TBR=egdaniel@google.com,bsalomon@google.com,brianosman@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I2390df257456013fa74137cb5d7b5a93820c291e
Reviewed-on: https://skia-review.googlesource.com/7652
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Brian Salomon [Thu, 26 Jan 2017 22:35:06 +0000 (17:35 -0500)]
Start of rewrite of GrFragmentProcessor optimizations.
This adds a replacement for computeInvariantOutput buts does not use it yet. The replacement allows for three types of optimizations:
* known input color -> known output color for GrFP elimination
* tracking of whether all color processors modulate their input for the "tweak alpha" optimziation
* opaqueness tracking
This loses some of the generality of computInvariantOutput. It does not track the known output status of individual color components (other than opaque alpha). It does not track whether GrFragmentProcessors read their input color. It doesn't allow a processor that will receive non-constant output to advertise that it produces a constant output. These could probably be added back in the unlikely case that they prove valuable.
Unlike computeInvariantOutput the optimizations are decided at instantiation time and constant colors are expressed as GrColor4f rather than GrColor.
Change-Id: I684d3f9050693dde2d28154fa695e049ed8cf61a
Reviewed-on: https://skia-review.googlesource.com/7481
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Ravi Mistry [Fri, 27 Jan 2017 14:39:46 +0000 (14:39 +0000)]
Revert "Revert "SkUserConfig.h: remove out-of-date comment on SK_SFNTLY_SUBSETTER""
This reverts commit
156a749eb15d18539a58436d767e9401de413eb3.
Reason for revert: Reverting this makes it much easier to test the merge_into_android.py script. I also stopped the Android autoroller for now.
Original change's description:
> Revert "SkUserConfig.h: remove out-of-date comment on SK_SFNTLY_SUBSETTER"
>
> This reverts commit
68fc549e840d1efc6285c301da1bf52c04e57e0a.
>
> Reason for revert: Breaking the Android roll.
>
> (The change is fine, but the script for merging did not consider that we might edit this file. We can reland this after we update the script.)
>
> Original change's description:
> > SkUserConfig.h: remove out-of-date comment on SK_SFNTLY_SUBSETTER
> >
> > Change-Id: I6894fe43de071999e4923e1515a951b73e2ba0b1
> > Reviewed-on: https://skia-review.googlesource.com/7619
> > Reviewed-by: Ben Wagner <bungeman@google.com>
> > Commit-Queue: Hal Canary <halcanary@google.com>
> >
>
> TBR=halcanary@google.com,bungeman@google.com,reed@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Change-Id: Ib1a2c9faa79d1186705d87c5e17f20fe49b82bb1
> Reviewed-on: https://skia-review.googlesource.com/7641
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> Commit-Queue: Leon Scroggins <scroggo@google.com>
>
TBR=mtklein@chromium.org,halcanary@google.com,bungeman@google.com,scroggo@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: Ifa42e4fb48bbe9dac40c57cf09cf9586ca86c6df
Reviewed-on: https://skia-review.googlesource.com/7649
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
Robert Phillips [Fri, 27 Jan 2017 14:28:29 +0000 (14:28 +0000)]
Revert "Consolidate read/write-Pixels testing code"
This reverts commit
0bd4a23ef40d74ef051eb7f457c133d5febc377d.
Reason for revert: What?!?
Original change's description:
> Consolidate read/write-Pixels testing code
>
> Change-Id: I853f8f747ed0040333473fbc722cabac84e6ac83
> Reviewed-on: https://skia-review.googlesource.com/7560
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
>
TBR=robertphillips@google.com,brianosman@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I9cb049a4f86350f849d00839a55b55fb07e861b0
Reviewed-on: https://skia-review.googlesource.com/7648
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Mike Reed [Fri, 27 Jan 2017 13:21:36 +0000 (08:21 -0500)]
remove SK_SUPPORT_LEGACY_GETCLIPBOUNDS
BUG=skia:6166
Change-Id: I5c8035ee172e14a7a769baff45392a29014d09cb
Reviewed-on: https://skia-review.googlesource.com/7645
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Robert Phillips [Fri, 27 Jan 2017 12:51:23 +0000 (07:51 -0500)]
Consolidate read/write-Pixels testing code
Change-Id: I853f8f747ed0040333473fbc722cabac84e6ac83
Reviewed-on: https://skia-review.googlesource.com/7560
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Leon Scroggins [Thu, 26 Jan 2017 23:51:57 +0000 (23:51 +0000)]
Revert "SkUserConfig.h: remove out-of-date comment on SK_SFNTLY_SUBSETTER"
This reverts commit
68fc549e840d1efc6285c301da1bf52c04e57e0a.
Reason for revert: Breaking the Android roll.
(The change is fine, but the script for merging did not consider that we might edit this file. We can reland this after we update the script.)
Original change's description:
> SkUserConfig.h: remove out-of-date comment on SK_SFNTLY_SUBSETTER
>
> Change-Id: I6894fe43de071999e4923e1515a951b73e2ba0b1
> Reviewed-on: https://skia-review.googlesource.com/7619
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Hal Canary <halcanary@google.com>
>
TBR=halcanary@google.com,bungeman@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: Ib1a2c9faa79d1186705d87c5e17f20fe49b82bb1
Reviewed-on: https://skia-review.googlesource.com/7641
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Matt Sarett [Thu, 26 Jan 2017 23:13:11 +0000 (18:13 -0500)]
Delete SkAutoTime from jpeg encoder
We use nanobench instead to measure encode performance.
BUG=skia:
Change-Id: I4f0b43b7e09f99967889e941cb6947433033006a
Reviewed-on: https://skia-review.googlesource.com/7640
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Herb Derby [Thu, 26 Jan 2017 21:48:28 +0000 (16:48 -0500)]
Keep valgrind happen by purging caches.
Change-Id: Ic387edb9b5d71110c10c8a40a362ed2853d140f5
Reviewed-on: https://skia-review.googlesource.com/7638
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Ben Wagner [Wed, 25 Jan 2017 16:15:50 +0000 (11:15 -0500)]
Implement getFamilyName for stream fonts on Linux.
When SkFontMgr_fontconfig and SkFontMgr_FontConfigInterface create a
typeface from data they do not store the default font name and
getFamilyName will return the empty string. All of the code to handle
this properly now exists, it just needs to be hooked up.
BUG=skia:1508
Change-Id: I75f2a598a5451babb4a9ceb5e9a9e9d3daa41d60
Reviewed-on: https://skia-review.googlesource.com/7506
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
Florin Malita [Thu, 26 Jan 2017 21:23:06 +0000 (16:23 -0500)]
Simplify SkShader::ContextRec::fLocalMatrix handling
Minor cleanup.
R=robertphillips@google.com,reed@google.com
Change-Id: I1a27af61e3e3bb5e895c9a3265da6b0408234165
Reviewed-on: https://skia-review.googlesource.com/7632
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Mike Klein [Thu, 26 Jan 2017 20:46:02 +0000 (15:46 -0500)]
Really use vpmaddwd in hsw::convolve_vertical().
No pixel diffs.
Performance on 8888 looks like an overall win.
Before:
micros bench
222.41 bitmap_scale_filter_64_256
40.06 bitmap_scale_filter_256_64
8.17 bitmap_scale_filter_90_10
10.32 bitmap_scale_filter_90_30
22.50 bitmap_scale_filter_90_80
1.80 bitmap_scale_filter_90_90
57.51 bitmap_scale_filter_80_90
41.99 bitmap_scale_filter_30_90
31.51 bitmap_scale_filter_10_90
After:
micros bench
193.60 bitmap_scale_filter_64_256
46.26 bitmap_scale_filter_256_64
7.81 bitmap_scale_filter_90_10
9.99 bitmap_scale_filter_90_30
22.05 bitmap_scale_filter_90_80
1.96 bitmap_scale_filter_90_90
52.07 bitmap_scale_filter_80_90
37.73 bitmap_scale_filter_30_90
27.63 bitmap_scale_filter_10_90
Change-Id: I2f29366b0fd503176c5af4d825fa524e632da21b
Reviewed-on: https://skia-review.googlesource.com/7630
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Mike Klein [Thu, 26 Jan 2017 21:23:26 +0000 (16:23 -0500)]
Graceful degredation for SkOpts_hsw.
__AVX2__ will not be defined if you omit -mavx2. Android does this
intentionally for x86 builds. (No mobile CPU supports AVX2 AFAIK.)
This should fix the Android roll.
Change-Id: Ib94c862641abc11fbb46863afc53bcc049f362ad
Reviewed-on: https://skia-review.googlesource.com/7633
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Matt Sarett <msarett@google.com>
Ben Wagner [Thu, 26 Jan 2017 21:40:03 +0000 (21:40 +0000)]
Reland "remove clipbounds flag"
This reverts commit
2aa26abe6daad2fc933ef638992cce71cb65f458.
Reason for revert: CL this depends on has now landed.
Original change's description:
> Revert "remove clipbounds flag"
>
> This reverts commit
7e0489da25c578bd04ce74d03ad48198280ca3fd.
>
> Reason for revert: missed a headless
>
> Original change's description:
> > remove clipbounds flag
> >
> > BUG=skia:
> >
> > Change-Id: I55b3098abd5e566e9f8bf27988c33e531d2ea54d
> > Reviewed-on: https://skia-review.googlesource.com/7618
> > Reviewed-by: Mike Reed <reed@google.com>
> > Commit-Queue: Mike Reed <reed@google.com>
> >
>
> TBR=reed@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Change-Id: Id1310372499905dddcca4b9454f6a81d192a1e32
> Reviewed-on: https://skia-review.googlesource.com/7629
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
>
TBR=reviews@skia.org,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Change-Id: I593bdad8d654e272e772559aa0fccafcce8ff541
Reviewed-on: https://skia-review.googlesource.com/7636
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Matt Sarett [Thu, 26 Jan 2017 20:14:56 +0000 (15:14 -0500)]
Fix gradients gm
Some of my local changes slipped into the tree.
BUG=skia:
Change-Id: I6e452f12608db6b80c5887ccd3cac199cfbf9494
Reviewed-on: https://skia-review.googlesource.com/7625
Reviewed-by: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Matt Sarett <msarett@google.com>
Mike Reed [Thu, 26 Jan 2017 20:49:22 +0000 (20:49 +0000)]
Revert "remove clipbounds flag"
This reverts commit
7e0489da25c578bd04ce74d03ad48198280ca3fd.
Reason for revert: missed a headless
Original change's description:
> remove clipbounds flag
>
> BUG=skia:
>
> Change-Id: I55b3098abd5e566e9f8bf27988c33e531d2ea54d
> Reviewed-on: https://skia-review.googlesource.com/7618
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
>
TBR=reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Change-Id: Id1310372499905dddcca4b9454f6a81d192a1e32
Reviewed-on: https://skia-review.googlesource.com/7629
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Mike Klein [Thu, 26 Jan 2017 19:58:42 +0000 (14:58 -0500)]
Fix variable names in convolve_vertical().
These new names reflect the actual pixels stored in each register.
Change-Id: I8e626196cd8bcbef622e4fb87ac3566a79d3573a
Reviewed-on: https://skia-review.googlesource.com/7624
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Matt Sarett <msarett@google.com>