Commit Graph

25289 Commits

Author SHA1 Message Date
Ethan Nicholas
9e1138d566 re-land of switched skslc from std::string to SkString
BUG=skia:

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

Change-Id: Ib21c30afc0d8483392b417e660b7fecfcc30e617
Reviewed-on: https://skia-review.googlesource.com/5084
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2016-11-21 17:14:43 +00:00
Brian Osman
e54d4cefb7 VS script: Handle variation among configurations
The script now emits a meta-solution that include all projects across
all configurations. For example, third party libraries may not be in
all configurations, or certain targets are only present in some.

Additionally, the ItemDefinitionGroup (which includes preprocessor
definitions) is included from every configuration's project file, so
syntax highlighting of inactive code works correctly.

BUG=skia:

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

Change-Id: I241d83aea3f076365811965161fc941f82c9714c
Reviewed-on: https://skia-review.googlesource.com/5085
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2016-11-21 16:35:39 +00:00
Brian Salomon
8d5f9cb5e7 Add an extra pixel to the distance field path renderer bounds.
BUG=chromium:663701
BUG=skia:5989

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

Change-Id: Ie97f46b108f54c711c5928b11a9921be38356f8d
Reviewed-on: https://skia-review.googlesource.com/5086
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2016-11-21 16:23:34 +00:00
Yuqian Li
99bba9ea82 Add missing virtual functions for SkRectClipCheckBlitter
This CL is related to the issue that we tried to fix in
https://skia-review.googlesource.com/c/5078/

Specifically, SkARGB32_Blitter overrides blitAntiH2 and blitAntiV2 and
they're different from blitAntiRuns. Therefore, if
SkRectClipCheckBlitter does not override those two functions, we're
going to get different results in debug and release build.

BUG=skia:

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

Change-Id: I7f9565d494f0a6c45ab5a06fbedb73ef233b9a1f
Reviewed-on: https://skia-review.googlesource.com/5082
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2016-11-21 15:18:37 +00:00
Brian Osman
7992da32f0 Support decoding images to multiple formats, depending on usage
Our codec generator will now preserve any asked-for color space, and
convert the encoded data to that representation. Cacherator now
allows decoding an image to both legacy (nullptr color space), and
color-correct formats. In color-correct mode, we choose the best
decoded format, based on the original properties, and our backend's
capabilities. Preference is given to the native format, when it's
already texturable (sRGB 8888 or F16 linear). Otherwise, we prefer
linear F16, and fall back to sRGB when that's not an option.

Re-land (and fix) of:
https://skia-review.googlesource.com/c/4438/
https://skia-review.googlesource.com/c/4796/

BUG=skia:5907

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

Change-Id: I20ff972ffe1c7e6535ddc501e2a8ab8c246e4061
Reviewed-on: https://skia-review.googlesource.com/4838
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
2016-11-21 14:58:32 +00:00
Yuqian Li
dc940a63c4 Disable RectClipCheckBlitter for cc_unittests
With RectClipCheckBlitter, the cc_unittests in Chromium will have
different results for rel and dbg buidls. As far as I know, the scan
converter blits the same alpha but they are somehow translated into
different RGBs. I'll look into it on Monday.

(RectClipCheckBlitter is added in https://skia-review.googlesource.com/c/4629/)

BUG=skia:
TBR=fmalita@chromium.org

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

Change-Id: I537d4380a44d0194103a4fcfb2bd2e2bcef41fcb
Reviewed-on: https://skia-review.googlesource.com/5078
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2016-11-20 19:52:40 +00:00
Greg Daniel
792d0f13d6 Revert "switched skslc from std::string to SkString"
This reverts commit d8df21a1e0.

Reason for revert: Breaking Roll

Original change's description:
> switched skslc from std::string to SkString
> 
> BUG=skia:
> 
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4977
> 
> Change-Id: I15e24963b09b719a2c07da67745114f5ac66cee8
> Reviewed-on: https://skia-review.googlesource.com/4977
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> 

TBR=bsalomon@google.com,benjaminwagner@google.com,ethannicholas@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I84d5311beb9d5e607b7a4a3c138332f0c8f19648
Reviewed-on: https://skia-review.googlesource.com/5077
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2016-11-20 14:53:48 +00:00
Greg Daniel
7a5b48a75b Revert "fixed iOS build failure"
This reverts commit 83cd50b8af.

Reason for revert: Need to revert previous SkSL CL

Original change's description:
> fixed iOS build failure
> 
> BUG=skia:
> 
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4997
> 
> Change-Id: I5c3727c5dc0e30ae88e1879e12547bdb11db97ee
> Reviewed-on: https://skia-review.googlesource.com/4997
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> 

TBR=bsalomon@google.com,ethannicholas@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Iaafb7abae666556132211e6d49766e629dbec9ba
Reviewed-on: https://skia-review.googlesource.com/5076
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2016-11-20 14:53:11 +00:00
Ivan Krasin
866f286c62 Avoid unnecessary cast on a garbage data.
It's dangerous and rightfully makes Control Flow Integrity check unhappy.

BUG=skia:

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

Change-Id: Ie59490a5c671240128a9fcb353108f67f32d2f9e
Reviewed-on: https://skia-review.googlesource.com/5074
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-19 06:47:34 +00:00
elemental
a675910aea Fix typo in GrGLCaps
BUG=skia:

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

Change-Id: I23a9066de8c96378a1bd8596227e487cdd93669f
Reviewed-on: https://skia-review.googlesource.com/5040
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2016-11-18 23:20:51 +00:00
Mike Reed
62a8aa398e android does not need XFERMODE_PUBLIC flag
BUG=skia:

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

Change-Id: Ib889e8e41bb0fac6a6dfbbec22fe3930d178e3ba
Reviewed-on: https://skia-review.googlesource.com/5071
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2016-11-18 23:10:54 +00:00
Mike Klein
17b6e487b7 Revert "Turn off /arch:AVX[2] on Windows builds."
This reverts commit c89e2438ae.

Reason for revert: 

I'm going to stub this code out in Chrome instead for now.  Chrome's not going to land something that looks like this, so I'd rather undo it than leave Skia in this odd state.

Original change's description:
> Turn off /arch:AVX[2] on Windows builds.
> 
> This canaries a similar change Chrome may need.
> 
> BUG=chromium:666707
> 
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5005
> 
> Change-Id: Ibf7f9941968d905d865b9be1e63ebbf768870175
> Reviewed-on: https://skia-review.googlesource.com/5005
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> 

TBR=mtklein@chromium.org,brucedawson@chromium.org,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I9562f7877749c61f6ba4d48d6c4b557f09876128
Reviewed-on: https://skia-review.googlesource.com/5069
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-11-18 22:11:49 +00:00
Mike Klein
2e35e8a45c mirror tiling
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5064
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Change-Id: I9d48ba73e145701245e5ec4f32c8c360da6baddd
Reviewed-on: https://skia-review.googlesource.com/5064
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-18 22:11:12 +00:00
Brian Salomon
1aaccc77dc Make GrSwizzle::GrSwizzle() constexpr
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5060

Change-Id: I862b895fd92b9b6938627af7b21022564b535e9b
Reviewed-on: https://skia-review.googlesource.com/5060
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2016-11-18 21:19:17 +00:00
Brian Salomon
f31ae49527 Remove unnecessary attribute and varying type modifiers
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5007

Change-Id: Ic9fefe09221d5e367b5aa5dd0084fc7d6631998c
Reviewed-on: https://skia-review.googlesource.com/5007
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2016-11-18 21:15:20 +00:00
Mike Klein
c36dedf613 Build fiddle and public_headers_warnings_check only when skia_enable_tools.
This leaves libskia as the only thing we build when tools are not enabled (other GN environments like Fuchsia, Flutter, Chrome, or for people using ours and actively disabling tools).

BUG=skia:

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

Change-Id: I5acad66c1b068ef81c1a7e292c3524a0b1497b66
Reviewed-on: https://skia-review.googlesource.com/4993
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-18 20:26:34 +00:00
Brian Osman
06e539ad12 VS SLN script: Automatically determine which folder to use/copy
BUG=skia:

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

Change-Id: Ic7765cf23191af840935f7181579e04d62de23af
Reviewed-on: https://skia-review.googlesource.com/5009
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2016-11-18 20:05:37 +00:00
Mike Klein
c89e2438ae Turn off /arch:AVX[2] on Windows builds.
This canaries a similar change Chrome may need.

BUG=chromium:666707

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

Change-Id: Ibf7f9941968d905d865b9be1e63ebbf768870175
Reviewed-on: https://skia-review.googlesource.com/5005
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-18 17:59:30 +00:00
Mike Klein
9de9230b6c update G3 build after crrev.com/2500113004
crrev.com/2500113004 removed SkBitmapProcState_opts_arm.cpp.
ARM targets now use SkBitmapProcState_opts_none.cpp, so stop filtering it out.

(See the gn/opts.gni change.)

BUG=skia:

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

Change-Id: Ib46ac5d9e908e8043aaec1f462672d9f9710431d
Reviewed-on: https://skia-review.googlesource.com/4996
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
2016-11-18 17:28:48 +00:00
Brian Salomon
b014cca49d Make GrBufferAccess a nested class of GrProcessor
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4978

Change-Id: I08c24e9183108f4dd6068216488fd3ac9b5f3ec2
Reviewed-on: https://skia-review.googlesource.com/4978
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2016-11-18 17:17:46 +00:00
Yuqian Li
ce1d293880 Add test for QuickFDot6Div
This test will catch our (1 << 10) bug (which should be 1 << 9)

BUG=skia:

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

Change-Id: I25b607d1535a647284cee3b304a6f567f389e7f6
Reviewed-on: https://skia-review.googlesource.com/4986
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2016-11-18 17:16:49 +00:00
Ethan Nicholas
83cd50b8af fixed iOS build failure
BUG=skia:

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

Change-Id: I5c3727c5dc0e30ae88e1879e12547bdb11db97ee
Reviewed-on: https://skia-review.googlesource.com/4997
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2016-11-18 16:37:31 +00:00
Ethan Nicholas
d8df21a1e0 switched skslc from std::string to SkString
BUG=skia:

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

Change-Id: I15e24963b09b719a2c07da67745114f5ac66cee8
Reviewed-on: https://skia-review.googlesource.com/4977
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2016-11-18 14:34:08 +00:00
Robert Phillips
833dcf4884 Add handling for instantiate failure up the call stack
The following two CLs were created via grep:
https://skia-review.googlesource.com/c/4929/ (Guard against instantiate & accessRenderTarget failures)
https://skia-review.googlesource.com/c/4961/ (Remove accessRenderTarget call in SkGpuDevice ctor)

This CL was created by running through all the tests and having instantiate fail so it catches up-stack failures to handle a null return.

BUG=665681,665500,665621

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

Change-Id: I6611eec8d36679123eef140538ee2526fb18628f
Reviewed-on: https://skia-review.googlesource.com/4991
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2016-11-18 14:26:48 +00:00
Eric Boren
eaef615377 [nobuildbot] Explicitly name all jobs
This makes it clearer which jobs we're running when looking at
gen_tasks.go.  Doesn't actually change any behavior.

BUG=skia:

Change-Id: Ie4fe639552bd673d3a605e03782a68b5e013cf1d
Reviewed-on: https://skia-review.googlesource.com/4990
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2016-11-18 14:02:21 +00:00
Eric Boren
628e78bf0b [nobuildbot] Remaining Android devices
BUG=skia:

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

Change-Id: I4e38d25c37e6a336f90e46d2260fcbb4f9899901
Reviewed-on: https://skia-review.googlesource.com/4933
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2016-11-18 05:17:18 +00:00
Herb Derby
dfa492e580 Use SkFixedAllocator in SkLinearPipeline and remove the embedding of
the entire pipeline.

Adjust SkFixedAlloc to allow nesting of allocation.

BUG=skia:

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

Change-Id: Ieeb1b5deaae004b67cee933af9bc19bbfd5a7687
Reviewed-on: https://skia-review.googlesource.com/4987
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-11-18 03:05:22 +00:00
xiangze.zhang
d2265e537c Port convolve functions to SkOpts
This patch moves the C++/SSE2/NEON implementations of convolve functions
into the same place and uses SkOpts framework.
Also some indentation fix.

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

Review-Url: https://codereview.chromium.org/2500113004
2016-11-17 18:39:38 -08:00
Adam Barth
f8afab9677 Mark this file as executable
The executable bit is needed in the Fuchsia build in order to execute this file
during the build.

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

Change-Id: I4c11d823d052b7c8cef79b2842169581db76e815
Reviewed-on: https://skia-review.googlesource.com/4985
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-17 22:29:59 +00:00
Mike Klein
c01e7dff5f perspective matrix
Nothing too tricky.  The path of least resistance was to keep the matrix row-major when in perspective.  It should make no difference in the end.

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

Change-Id: I48bb9de0265e7873c465874cc37076a8111f5ea1
Reviewed-on: https://skia-review.googlesource.com/4983
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-17 22:20:37 +00:00
Mike Klein
b273fc429f repeat tiling
Does the note in repeat() look right?

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

Change-Id: I347023f312ab4643fc387e486192c3ae3357db8b
Reviewed-on: https://skia-review.googlesource.com/4980
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-17 22:20:26 +00:00
Mike Klein
bf178a7f0f Replace my confusion with a pointer to the explanation.
NOTRY=true

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

Change-Id: I9f1686519ea1dd5b50dce2e6ecef22741468e9d6
Reviewed-on: https://skia-review.googlesource.com/4982
Reviewed-by: Herb Derby <herb@google.com>
2016-11-17 22:20:01 +00:00
Brian Osman
f891147523 In VS SLN fixup script, don't erase old files
First, this avoids removing .suo files (solution options), which is where
things like debugging command line arguments live. This lets those
settings persist when re-generating.

Second, it lets you run the script while you have the solution open.
(Writing new files works okay, but removing the existing ones was
triggering a sharing violation).

BUG=skia:

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

Change-Id: Ib40494caf152dd638f9eee7635639399e8099421
Reviewed-on: https://skia-review.googlesource.com/4981
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2016-11-17 21:47:51 +00:00
Yuqian Li
c88fc74447 Fix the quickSkFDot6Div range check
Our previous (1 << 10) limit is based on 2^32 being our maximum value.
However, that's not the case because we have one more sign bit.
Therefore I should make it (1 << 9).

BUG=skia:

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

Change-Id: I38acb627cdb2514d3e4996aef02480b389cf3588
Reviewed-on: https://skia-review.googlesource.com/4973
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2016-11-17 21:39:34 +00:00
Brian Salomon
514baff8be Rename GrTextureParams to GrSamplerParams
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4965

Change-Id: I7d52e81c670e92ca96117284f44b274ce3cc3671
Reviewed-on: https://skia-review.googlesource.com/4965
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2016-11-17 21:13:18 +00:00
Mike Klein
7776029b54 Strength reduce bilerp to nearest neighbor when the matrix is integer translate.
BUG=skia:

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

Change-Id: I986f5695660d198532f5b0b367868ae904de92a1
Reviewed-on: https://skia-review.googlesource.com/4967
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-17 20:49:25 +00:00
Robert Phillips
b446088690 Fix computation of texture size for approximately-fit deferred proxies
For approximate-fit deferred proxies asserts were firing when the instantiated size was larger than the pre-computed exact-fit size.

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

Change-Id: I879e16b86ab4d9ef9834163c24ccd6507fe4b94a
Reviewed-on: https://skia-review.googlesource.com/4972
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2016-11-17 20:47:18 +00:00
Jim Van Verth
684d7cef02 Fix double deletion of DescriptorSetLayouts
When VkPipeline creation fails the PipelineStateBuilder cleans up
afterwards. It was deleting the sampler DescriptorSetLayout when that
is owned by the ResourceProvider.

BUG=skia:

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

Change-Id: I876c570349f96f58e0256dc91bc1135c59a2058d
Reviewed-on: https://skia-review.googlesource.com/4964
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2016-11-17 20:24:33 +00:00
Herb Derby
297726f36f Use SkSmallAllocator for Blender stage.
BUG=skia:

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

Change-Id: I5466e6b906c1f268860011957a5a00361c6bb66a
Reviewed-on: https://skia-review.googlesource.com/4969
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Herb Derby <herb@google.com>
2016-11-17 20:15:01 +00:00
Mike Klein
4e9bb7470d Initialize all values we load.
Let's see if this can convince MSAN that we're safe.

CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot,Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN-Trybot

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

Change-Id: Ie90124068bc412bee94a4f8e87fae32e4d66e709
Reviewed-on: https://skia-review.googlesource.com/4971
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
2016-11-17 20:00:47 +00:00
Mike Klein
b6ab4ae59e Be careful about types in SkNx_neon.h.
The Google3 Android ARM build is still using GCC, which isn't so loosey-goosey as Clang about bit-casting back and forth between int32x4_t and uint32x4_t.

BUG=skia:

Change-Id: I0d54f6859b8e03be4936c51bbaa1967db4261bd4
Reviewed-on: https://skia-review.googlesource.com/4974
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
2016-11-17 19:54:10 +00:00
Brian Salomon
db4183d227 In GrProcessor::TextureSampler drop the "get", it's cleaner
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4962

Change-Id: I55e7f8d1b6e1097fdbe411e9989dd42a03dd5f33
Reviewed-on: https://skia-review.googlesource.com/4962
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2016-11-17 19:35:53 +00:00
Brian Osman
3a88725d58 Always use GL_HALF_FLOAT_OES on ANGLE, even with ES3.
In the past, ANGLE always used GL_HALF_FLOAT. I filed a bug about that,
and they switched to HALF_FLOAT_OES. However, ES3 has direct support for
HALF_FLOAT, so we expect that as the format for read pixels.

The better solution would be to remember and return the value we get
back from IMPLEMENTATION_COLOR_READ_TYPE, but there are subtleties that
create additional bugs when we do that. In particular:

If trying to read Alpha8 from RGBA, the current sequence is:

1. readPixelsSupported asks for the format to use. getExternalFormat
   switches out the format (assuming we're using GL_RED). This creates
   a format/type pair that fails the ES3.2 rules (16.1.2), so we ask
   the driver for the secondary format, which matches the one that we
   expect (from our config table).
2. Then we *actually* do the readPixels, and here we just call
   getReadPixelsFormat, which does the remapping, but skips the follow
   up checks in readPixelsSupported. So we end up passing a format/type
   pair that our code in readPixelsSupported thinks is illegal (and
   which is neither the pair that our config table stores, *nor* the
   pair returned by the implementation).

A straightforward solution of the original problem is to notice that
we had to ask the implementation (because the values are filled in),
so we should trust those and not the ones in the config table. But then
we miss out on the chance to overwrite the values for the alpha only
from RGBA case. Sigh.

BUG=skia:

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

Change-Id: Icb0c151c9f07ffc178ed3a597fa8ab0ed3c6cb94
Reviewed-on: https://skia-review.googlesource.com/4963
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2016-11-17 19:25:37 +00:00
Mike Klein
06a65e2799 Support SkImageShader in SkRasterPipeline blitter
First of many CLs, I'm sure.

This handles 8888 or sRGB sources with an affine matrix, clamp/clamp tiling, and nearest-neighbor sampling only.

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

Change-Id: I99f7508852b3d44b6f52f7a0bee29a793af35c48
Reviewed-on: https://skia-review.googlesource.com/4906
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-17 18:45:25 +00:00
Robert Phillips
9fab7e98d7 Remove accessRenderTarget call in SkGpuDevice ctor
This is a follow up to https://skia-review.googlesource.com/c/4929/ (Guard against instantiate & accessRenderTarget failures).

Rather than guard this call to accessRenderTarget I would prefer to remove it.

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

BUG=665681,665500,665621

Change-Id: I2c9ec245491d9059de892b2e6a7d4a4de4accdfd
Reviewed-on: https://skia-review.googlesource.com/4961
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2016-11-17 18:35:22 +00:00
Brian Salomon
a7c4c29abf Remove unnecessary TextureSampler comparison in GrTextureDomainEffect.
The base class already performs this comparison.

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

Change-Id: Ic2a46e05f05ba36b291c05e324aa29b4aad15c23
Reviewed-on: https://skia-review.googlesource.com/4960
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2016-11-17 18:33:05 +00:00
Yuqian Li
4eb35bb7d7 Use SkFixedMul instead of SkFixedMul_lowprec
It seems that SkFixedMul_lowprec doesn't have too much performance gain (maybe
1%). But its precision loss is siginificant. No serious issues have been found
in convex cases, but things get much trickier for concave shapes. I'm removing
it now to improve the stability and reliability of our algorithm, which may
potentially benefit our Chrome landing. (Even if we do not remove
SkFixedMul_lowprec now, we eventually will remove it when we land concave AAA
code.)

BUG=skia:

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

Change-Id: Iae5739a3780bb77ce6237888eee51a502fea5cf2
Reviewed-on: https://skia-review.googlesource.com/4926
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2016-11-17 17:54:50 +00:00
Robert Phillips
e60ad620fe Guard against instantiate & accessRenderTarget failures
Chrome's fuzzer have reminded me that, since we are deferring allocation, instantiate and accessRenderTarget can now fail further down the call stack.

This should probably be cherry picked back to M56.

BUG=665681,665500,665621

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

Change-Id: I44d81ff29586dfe75ddda30b5ed8ca76354542d6
Reviewed-on: https://skia-review.googlesource.com/4929
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2016-11-17 17:34:13 +00:00
Mike Klein
987de5b6b9 Plumb filter quality into SkShader::appendStages().
We of course need this to know whether or not to bilerp.

TBR=herb@google.com

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

Change-Id: I5fe6d93c1d36d0d53f566f722960fcafb0d8bc3c
Reviewed-on: https://skia-review.googlesource.com/4932
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-11-17 17:23:59 +00:00
hcm@google.com
f8e41d53d4 Update Skia milestone to 57
Milestone that we typically update, but note that change from 55->56 was missed, will cherry pick to branch.
This change gets current file caught up to show working milestone after branch.

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

Change-Id: If10e0db2d4acc908f5da7c4e9d30497deef6a2ff
Reviewed-on: https://skia-review.googlesource.com/4927
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Heather Miller <hcm@google.com>
Commit-Queue: Heather Miller <hcm@google.com>
2016-11-17 17:23:57 +00:00