Commit Graph

28717 Commits

Author SHA1 Message Date
Chris Dalton
febbffad1c Improve cubic KLM accuracy
Moves cubic root finding logic out of GrPathUtils and
PathOpsCubicIntersectionTest, and unifies it in SkGeometry.

"Normalizes" the homogeneous parameter values of the roots, rather
than the cubic inflection function. Does this normalization by
twiddling the exponents instead of division (which causes a loss of
precision).

Abandons the built-in derivatives in GrCubicEffect. These don't have
high enough precision on many mobile gpus. Instead we pass the KLM
matrix to the vertex shader via uniform, where we can use it to set up
new linear functionals from which the fragment shader can calculate
the gradient of the implicit function.

Bug: skia:4410
Change-Id: Ibd64e999520adc8cdef7803a492d3699995aef5a
Reviewed-on: https://skia-review.googlesource.com/19017
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-06-09 17:13:54 +00:00
Mike Reed
01b2b83aba Extend composeshader to support a lerp parameter
Bug: skia:
Change-Id: I3bbb2cb8d0a84fca0309654498548ebc94d8938f
Reviewed-on: https://skia-review.googlesource.com/18460
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2017-06-09 17:13:53 +00:00
Matt Sarett
6a0feba05b Add clamp before drawing F16->8888 in DMSrcSink ColorCodecSrc
Verified that this fixes the wrongness of a few of the colorImage
diffs in Gold.

Bug: skia:6738
Change-Id: Icf0b7573ccb87268b480d7cc0a6cfe6fa8ae73f7
Reviewed-on: https://skia-review.googlesource.com/19271
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-06-09 15:30:19 +00:00
Matt Sarett
ee7c8202eb Remove debug checks for unsupported ICC profiles
This was never fully integrated with our automated image testing.
I feel it has limited usefulness in terms of catching bugs.

Bug: skia:
Change-Id: Iecd0a4e9b664ab0b351debde45ada864379de7ec
Reviewed-on: https://skia-review.googlesource.com/19267
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-06-09 15:26:48 +00:00
Ben Wagner
1aa2369883 Add new Kaby Lake bot Win IntelIris640.
Bug: skia:6743
No-Try: true
Change-Id: Ib670ce861ccf6568acfe0d0b27fcc112a51989bc
Reviewed-on: https://skia-review.googlesource.com/19092
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
2017-06-09 15:15:47 +00:00
Brian Salomon
6af270116d Make gradient effect creation fail if texture LUT creation fails
Bug: skia:6198
Change-Id: Ib8fb273564ca54ee9e6e045ac67e191af705a37a
Reviewed-on: https://skia-review.googlesource.com/19260
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-06-09 14:57:27 +00:00
Mike Reed
12bf424ec2 remove unused colorfilter virtual asACompose
Bug: skia:
Change-Id: I1e23dbd18f7145dcaaa864f3fd7b34aea2c342a6
Reviewed-on: https://skia-review.googlesource.com/19269
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-09 14:53:37 +00:00
Brian Osman
7f95dfc385 Revert "Handle too many (or too large) paths in GrDefaultPathRenderer"
This reverts commit eb86b70947.

Reason for revert: May be responsible for Command Buffer failure?

Original change's description:
> Handle too many (or too large) paths in GrDefaultPathRenderer
> 
> PathGeoBuilder constructs the geometry with the same basic
> technique as before, but allows interrupting the process
> to emit multiple draws.
> 
> Original test case was 2000 non-AA stroked circles, which
> created ~66000 vertices. That now renders, as do various
> tests with a single large path (as well as filled paths).
> 
> TODO: I think that this could be extracted and re-used for
> MSAA path renderer without too much work? I need to read
> that code more carefully to make sure it lines up.
> 
> Re-land of: https://skia-review.googlesource.com/18360
> 
> Bug: skia:6695
> Change-Id: Ibdedeb0ea2570a8847ba42328588bd7203411573
> Reviewed-on: https://skia-review.googlesource.com/18983
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:6695

Change-Id: I2cb010db502c315b3e2f7212818aea5503ecb28c
Reviewed-on: https://skia-review.googlesource.com/19270
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-06-09 14:43:58 +00:00
Matt Sarett
9466bf5694 Make SkPixmap::getColor support kUnpremul pixels
Bug: skia:6319
Change-Id: Id5ad27b4e85516dfdad0c127655e6272bc0a39ac
Reviewed-on: https://skia-review.googlesource.com/19089
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-06-09 14:27:44 +00:00
Mike Klein
39afa1226f fix f16 -> sRGB in encode_bitmap_for_png()
The existing logic looks wrong to me:
   - clamp premul to [0,1]
   - unpremul, ignoring zero alpha

It seems like we should do:
   - unpremul, avoiding any divide by zero
   - clamp unpremul to [0,1]

Am I misunderstanding this or has this just always been wrong?

Change-Id: I9636b9566c746bc05371e1e660f4e59dde16827b
Reviewed-on: https://skia-review.googlesource.com/19264
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-06-09 14:18:12 +00:00
Brian Osman
eb86b70947 Handle too many (or too large) paths in GrDefaultPathRenderer
PathGeoBuilder constructs the geometry with the same basic
technique as before, but allows interrupting the process
to emit multiple draws.

Original test case was 2000 non-AA stroked circles, which
created ~66000 vertices. That now renders, as do various
tests with a single large path (as well as filled paths).

TODO: I think that this could be extracted and re-used for
MSAA path renderer without too much work? I need to read
that code more carefully to make sure it lines up.

Re-land of: https://skia-review.googlesource.com/18360

Bug: skia:6695
Change-Id: Ibdedeb0ea2570a8847ba42328588bd7203411573
Reviewed-on: https://skia-review.googlesource.com/18983
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-06-09 13:25:36 +00:00
Mike Reed
65a9344120 remove unneeded include
Bug: skia:
Change-Id: If8c689c008438efed398d018782021195f6d0274
Reviewed-on: https://skia-review.googlesource.com/19261
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-09 12:44:54 +00:00
Mike Reed
43e498e7e7 specialize D32 proc for legacy src
lots of dead-code removal

Bug: skia:
Change-Id: I23ea25eb38855b4776e97fa8ff777d9744baab1d
Reviewed-on: https://skia-review.googlesource.com/19147
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-09 00:48:50 +00:00
Robert Phillips
fee2b4ed0f Create a new HDC for each ANGLE context
Bug: skia:6711
Change-Id: I9c4720a8dbad4c6b18efe73e0e61afbdc19627bc
Reviewed-on: https://skia-review.googlesource.com/19090
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-06-09 00:39:00 +00:00
recipe-roller
21157ce049 Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).


More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
depot_tools:
  https://crrev.com/fd238086f1c3caa5bc4c11d3457f81d9a30f3ed7 Use API to set TBR code-review (agable@chromium.org)
  https://crrev.com/7303dcb9b399b67cc533d32109b2e4f1da8147e2 Use whole --message argument on patchset upload (agable@chromium.org)
  https://crrev.com/9387b4f0be621a3027848e0624a3ca3a70ee5195 Make gerrit 'git cl patch' use hard reset by default (agable@chromium.org)
  https://crrev.com/ce325ac84abf7b4200a0b55681fcb527215ba306 Update gsutil pin for download_from_google_storage.py from 4.15 to 4.26 (hinoka@google.com)
  https://crrev.com/027a5424859847ae849723812b726eca1d850ef9 [infra_paths] remove unused goma_deps_cache. (iannucci@chromium.org)
recipe_engine:
  https://crrev.com/c40412cbc4e1b8ee1e6eba2e88328ca71c6ec1e4 [context] Add path prefix/suffix manipulation. (dnj@chromium.org)
  https://crrev.com/c916898b8189866a0bf43fe15c800e4fe6d4a19e [context] fix treatment of None in env. (iannucci@chromium.org)
  https://crrev.com/154ef7e5d8f964ef30b1250dd33751582705f6f2 [path] Add concept of a "cleanup" directory. (dnj@chromium.org)


TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: Ic45a05b05ab3873d35a844c5c4ddf4f2b20f2353
Reviewed-on: https://skia-review.googlesource.com/19097
Reviewed-by: Recipe Roller <recipe-roller@chromium.org>
Commit-Queue: Recipe Roller <recipe-roller@chromium.org>
2017-06-08 22:22:07 +00:00
Brian Salomon
af971de661 Add flush before drawing lines workaround for Adreno 3xx
Bug: skia:6309
Change-Id: I354c678ca4e833c523a89b3196804fbe1adcf9d1
Reviewed-on: https://skia-review.googlesource.com/19087
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-06-08 21:12:47 +00:00
Mostyn Bramley-Moore
c0110ff1c2 Use nextafter rather than std::nextafter, it's more widely available
Bug: skia:
Change-Id: Idffe99cde348af83ae4290614c44767fffe36609
Reviewed-on: https://skia-review.googlesource.com/19120
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-06-08 21:08:07 +00:00
Robert Phillips
eb4f186779 Disable ReadPixels_Texture & ReadPixels_Gpu on ANGLE
Depends on https://skia-review.googlesource.com/c/19101/ (Store context type (rather than backend type) in ContextInfo)

Bug: skia:6742
Change-Id: I321c01838acf93ad28a17d8e97aa1bf594425502
Reviewed-on: https://skia-review.googlesource.com/19077
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-06-08 21:07:37 +00:00
Robert Phillips
a5b39fa902 Don't reuse failed buffers as scratch
This is/was occurring for ANGLE D3D configs

Change-Id: I45d4c40143ce4ac4989612c7bfe7aefd178842da
Reviewed-on: https://skia-review.googlesource.com/19076
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-06-08 20:46:47 +00:00
Robert Phillips
cdabbcc3b5 Store context type (rather than backend type) in ContextInfo
Change-Id: I7dbfb735f1f094fa0a025b84f69e06a3533f2815
Reviewed-on: https://skia-review.googlesource.com/19101
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-06-08 20:29:44 +00:00
Stan Iliev
ba81af27cf Add support for SkImageGenerator creating external textures
Copy the SkImageGenerator texture if tiling is needed and
original texture target is GR_GL_TEXTURE_EXTERNAL.

Bug: skia:
Change-Id: I98f5acc3883e2060b1a35f80633b02b08a706107
Reviewed-on: https://skia-review.googlesource.com/18268
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Stan Iliev <stani@google.com>
2017-06-08 20:23:05 +00:00
Stephen White
0cb31675f3 GrTessellator: fix intersection above the first vertex.
Handle the case where the an intersection falls not only above both
edge endpoints, but above the first vertex in the mesh. This requires
passing the mesh into check_for_intersection(), in order to modify the
head. We also need to rewind the mesh after insertion, since we need
to rewind to the newly-inserted vertex.

This also cleans up vertex ID computation a little (for logging), so
that vertices before the first vertex or after the last have a
reasonable ID. It also cleans up the intersection-on-endpoint 
special cases by refactoring the calls to split_edge().

BUG=730687

Change-Id: Idea736eca7b7c3c5d8a470b1373a16ad8e649e80
Reviewed-on: https://skia-review.googlesource.com/19069
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2017-06-08 20:07:04 +00:00
Matt Sarett
dc79270101 Draw time color xform API for Android
Will do a lazy color xform to the dst color space at GPU upload time.

I've included the capability to control the gen id of the output
image.  This will allow us to reuse images in the Ganesh cache.
This should only be temporary.  When Android is able to cache the
actual SkImage object, we won't need to expose this anymore.

Bug: b/62347704
Change-Id: I93b950ef680f6bbdd7eb6a2ec6f50195dbb78311
Reviewed-on: https://skia-review.googlesource.com/16440
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Yuqian Li <liyuqian@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-06-08 19:07:54 +00:00
Matt Sarett
81c83a7db4 Revert "Do not return Index8 from SkAndroidCodec::computeOutputColorType"
This reverts commit b6f4767294.

Reason for revert: This breaks CTS tests in Android.  Doh.

Original change's description:
> Do not return Index8 from SkAndroidCodec::computeOutputColorType
> 
> Given that this is the only known use of Index8 color type,
> this is essentially an experimental delete.
> 
> Bug: skia:6620
> Change-Id: Ib363d237e0217f6e7f461a62e54d32892c428095
> Reviewed-on: https://skia-review.googlesource.com/10586
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> Commit-Queue: Matt Sarett <msarett@google.com>

TBR=msarett@google.com,scroggo@google.com,reed@google.com
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:6620

Change-Id: I2b44c695b8b95659520e9532901f636f56e01e2a
Reviewed-on: https://skia-review.googlesource.com/19084
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-06-08 18:45:45 +00:00
Mike Reed
7c14d274ee Experimental change to diagnose image diffs in g3
Bug: skia:
Change-Id: I33226a0266093a98083b4c78cdaba402ce3f3929
Reviewed-on: https://skia-review.googlesource.com/19082
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
2017-06-08 18:38:43 +00:00
Mike Reed
70bc94f273 Bump min picture to 7+ months ago
Delete lots of support code, including need for SkXfermode objects
which are no longer used anywhere else.

Bug: skia:
Change-Id: Id6b7ef0f529691041ff2b206c35e336e8a4c974d
Reviewed-on: https://skia-review.googlesource.com/19059
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-06-08 18:23:19 +00:00
Jim Van Verth
bc2cdd154b Fix LCD distance field text color filtering
Distance field text was applying the color filter to determine any gamma
adjustments, but not any effects of the shader as well.

Bug: skia:6669
Change-Id: I73384f68141fb523ea2058e00d0a9fbb2fbc622b
Reviewed-on: https://skia-review.googlesource.com/19049
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2017-06-08 15:49:20 +00:00
Brian Salomon
e03a72917e Disable buffer mapping on Galaxy J5
Bug: skia:6309
Change-Id: Ieaf5bbc36c7fa7dee0cc07b480046bb0f190b138
Reviewed-on: https://skia-review.googlesource.com/19053
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-06-08 15:39:50 +00:00
Brian Osman
0ce3d43df9 Fix native_image_to_raster_surface crash in ANGLE msaa configs
We only support MSAA with RGBA (not BGRA), on ANGLE, so we were failing
to construct the GPU surface. Instead, use the original canvas' info to
make the image surface (but always use N32 to make the raster surface).

I think this will fix the Ubuntu Intel glesmsaa4 crashes, too, although
I don't have a machine to test on right now.

Bug: skia:6457 skia:6401
Change-Id: Icfc47845e97ef0806fb6d875f454d3920020ffbd
Reviewed-on: https://skia-review.googlesource.com/19054
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-06-08 15:37:40 +00:00
Ben Wagner
a6b2ba2153 Increase timeout for 32-bit Debug tests.
Bug: skia:6737
No-Try: true
Change-Id: I1e3751f1bce087980bf8f8e4317b1aae1a9fcf8f
Reviewed-on: https://skia-review.googlesource.com/19051
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
2017-06-08 14:54:19 +00:00
Ethan Nicholas
2d78bcd557 eliminate GPU line snapping
Bug: skia:4474
Change-Id: I8dd1d9bc49365c554b27a4c50bafa3d518391d9f
Reviewed-on: https://skia-review.googlesource.com/19047
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-06-08 14:34:39 +00:00
Matt Sarett
d21fd4b336 Disable F16-nullptr sources
Also includes the refactor that triggered this change - stricter
checking on creation on raster SkImages.

Bug: skia:
Change-Id: Ie3216ac3f5307de4b78792b472676faa51e5459d
Reviewed-on: https://skia-review.googlesource.com/19040
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-06-08 14:05:39 +00:00
Brian Salomon
7fbeb5acdd Revert "Revert "Revert "DeferredTextureImageData low-bit-depth/dithering support"""
This reverts commit 840ff8837b.

Reason for revert: Not obvious to me how to fix, reverting the chrome CL that was dependent on this.

Original change's description:
> Revert "Revert "DeferredTextureImageData low-bit-depth/dithering support""
> 
> This reverts commit d7c681d6a7.
> 
> Reason for revert: New param already used in Chrome
> 
> Original change's description:
> > Revert "DeferredTextureImageData low-bit-depth/dithering support"
> > 
> > This reverts commit 2c075e749d.
> > 
> > Reason for revert: Breaking tests. e.g.: https://chromium-swarm.appspot.com/task?id=369dc44f62ce9510&refresh=10
> > 
> > Original change's description:
> > > DeferredTextureImageData low-bit-depth/dithering support
> > > 
> > > Cause DeferredTextureImageData functionality to support low bit depth
> > > (4444, 565) image formats (with dithering).
> > > 
> > > Bug: 720105
> > > Change-Id: Ie3b5768ebc393d9b0a5322461c722bf37c80b791
> > > Reviewed-on: https://skia-review.googlesource.com/18945
> > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > Commit-Queue: Eric Karl <ericrk@chromium.org>
> > 
> > TBR=bsalomon@google.com,ericrk@chromium.org
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: 720105
> > 
> > Change-Id: I07aec722425efc62bc54f82cee9a19a9bf339f7b
> > Reviewed-on: https://skia-review.googlesource.com/19039
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Brian Salomon <bsalomon@google.com>
> 
> TBR=bsalomon@google.com,reviews@skia.org,ericrk@chromium.org
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 720105
> 
> Change-Id: I91e690d0564f04209a2bd677de9ae9eb9c0f90d3
> Reviewed-on: https://skia-review.googlesource.com/19041
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,reviews@skia.org,ericrk@chromium.org
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 720105

Change-Id: I63eb0051964ce99e187b4e4943ea79bc22d392d2
Reviewed-on: https://skia-review.googlesource.com/19046
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-06-08 14:02:20 +00:00
Brian Salomon
840ff8837b Revert "Revert "DeferredTextureImageData low-bit-depth/dithering support""
This reverts commit d7c681d6a7.

Reason for revert: New param already used in Chrome

Original change's description:
> Revert "DeferredTextureImageData low-bit-depth/dithering support"
> 
> This reverts commit 2c075e749d.
> 
> Reason for revert: Breaking tests. e.g.: https://chromium-swarm.appspot.com/task?id=369dc44f62ce9510&refresh=10
> 
> Original change's description:
> > DeferredTextureImageData low-bit-depth/dithering support
> > 
> > Cause DeferredTextureImageData functionality to support low bit depth
> > (4444, 565) image formats (with dithering).
> > 
> > Bug: 720105
> > Change-Id: Ie3b5768ebc393d9b0a5322461c722bf37c80b791
> > Reviewed-on: https://skia-review.googlesource.com/18945
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Eric Karl <ericrk@chromium.org>
> 
> TBR=bsalomon@google.com,ericrk@chromium.org
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 720105
> 
> Change-Id: I07aec722425efc62bc54f82cee9a19a9bf339f7b
> Reviewed-on: https://skia-review.googlesource.com/19039
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,reviews@skia.org,ericrk@chromium.org
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 720105

Change-Id: I91e690d0564f04209a2bd677de9ae9eb9c0f90d3
Reviewed-on: https://skia-review.googlesource.com/19041
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-06-08 13:32:30 +00:00
Matt Sarett
b6f4767294 Do not return Index8 from SkAndroidCodec::computeOutputColorType
Given that this is the only known use of Index8 color type,
this is essentially an experimental delete.

Bug: skia:6620
Change-Id: Ib363d237e0217f6e7f461a62e54d32892c428095
Reviewed-on: https://skia-review.googlesource.com/10586
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-06-08 13:28:29 +00:00
Brian Salomon
d7c681d6a7 Revert "DeferredTextureImageData low-bit-depth/dithering support"
This reverts commit 2c075e749d.

Reason for revert: Breaking tests. e.g.: https://chromium-swarm.appspot.com/task?id=369dc44f62ce9510&refresh=10

Original change's description:
> DeferredTextureImageData low-bit-depth/dithering support
> 
> Cause DeferredTextureImageData functionality to support low bit depth
> (4444, 565) image formats (with dithering).
> 
> Bug: 720105
> Change-Id: Ie3b5768ebc393d9b0a5322461c722bf37c80b791
> Reviewed-on: https://skia-review.googlesource.com/18945
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Eric Karl <ericrk@chromium.org>

TBR=bsalomon@google.com,ericrk@chromium.org
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 720105

Change-Id: I07aec722425efc62bc54f82cee9a19a9bf339f7b
Reviewed-on: https://skia-review.googlesource.com/19039
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-06-08 13:03:50 +00:00
Mike Reed
cde9031a5a remove unused xfermode methods
Bug: skia:
Change-Id: Ib0dfa7bbf3d4e73aab355df4d5f5e2a53f653809
Reviewed-on: https://skia-review.googlesource.com/19035
Reviewed-by: Mike Reed <reed@google.com>
2017-06-08 03:57:48 +00:00
recipe-roller
6162e03cd7 Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).


More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
depot_tools:
  https://crrev.com/f69860bdbf90ea5c42b610c88d07f087b6c93b96 gclient: evaluate conditions for deps (phajdan.jr@chromium.org)
  https://crrev.com/572537307e46403e256d862a8309f1aa1fcb45bd gclient: implement exporting variables to .gni files (phajdan.jr@chromium.org)
  https://crrev.com/52e8abc30fb35fc21369fa3bd14b0f9fc4e15f69 git-map: use committer date instead of author date (agable@chromium.org)
  https://crrev.com/3c2aa8389485a303a1185b7d28116c9312ff7e8e gclient flatten: handle GN settings (phajdan.jr@chromium.org)
  https://crrev.com/f475a4780737f7451ec4f4196d48a406ae715354 Update my_activity.py to use crrev.com short URLs for Gerrit. (jbroman@chromium.org)
recipe_engine:
  https://crrev.com/db920908bf51fcdb0e30f686a528b25cd4876ca7 Update vpython and spec to new text protobuf. (dnj@chromium.org)


TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I2fed378f059229dfd5a52810404dab6616325f8c
Reviewed-on: https://skia-review.googlesource.com/19031
Reviewed-by: Recipe Roller <recipe-roller@chromium.org>
Commit-Queue: Recipe Roller <recipe-roller@chromium.org>
2017-06-07 23:52:42 +00:00
Florin Malita
d1aeddeb8a Remove SkLinearGradient::kForce4fContext_PrivateFlag
... and related tests/gms.

We now exercise the 4f impl with raster-pipeline/burst, no need for a
special test flag.

Change-Id: If67684d2d8840b3c413db9eeebb051f59cbc5a34
Reviewed-on: https://skia-review.googlesource.com/19025
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-06-07 20:24:51 +00:00
Hal Canary
db6365a9e2 SkPDF: Do draw{Image,Bitmap} with maskfilter.
https://fiddle.skia.org/c/@skbug_237_drawImage_with_blur
BUG=skia:237
Change-Id: I50f65d428f254e3965a448a110edd39c0f7a937f
Reviewed-on: https://skia-review.googlesource.com/19027
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-06-07 20:21:16 +00:00
Eric Karl
2c075e749d DeferredTextureImageData low-bit-depth/dithering support
Cause DeferredTextureImageData functionality to support low bit depth
(4444, 565) image formats (with dithering).

Bug: 720105
Change-Id: Ie3b5768ebc393d9b0a5322461c722bf37c80b791
Reviewed-on: https://skia-review.googlesource.com/18945
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Eric Karl <ericrk@chromium.org>
2017-06-07 20:19:46 +00:00
Leon Scroggins III
33deb7ed4d Make SkCodec more flexible about its required frame
SkCodec sets fRequiredFrame to be the earliest possible frame that a
given frame can depend on. e.g.

- Frame A fills the screen, Keep
- Frame B does not cover A, Keep
- Frame C covers B but not A, and is opaque

Frame C can depend on either A or B. SkCodec already reports that C
depends on A. This CL allows a client of SkCodec to use either A or
B to create C.

Also expose the DisposalMethod. Since any frame between A and C can
be used to create C except for DisposePrevious frames, the client
needs to be able to know the disposal method so they do not try to
use such a frame to create C.

Further, the disposal method can be used to give the client a better
idea whether they will continue to need a frame. (e.g. if frame i is
DisposePrevious and depends on i-1, the client may not want to steal
i-1 to create i, since i+1 may also depend on i-1.)

TODO: Share code for decoding prior frames between GIF and WEBP

Change-Id: I91a5ae22ba3d8dfbe0bde833fa67ae3da0d81ed6
Reviewed-on: https://skia-review.googlesource.com/13722
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Chris Blume <cblume@chromium.org>
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-06-07 20:15:17 +00:00
Hal Canary
9982c4eb76 GM for drawImage w/ maskFilter
BUG=skia:237
Change-Id: I8b06fa5b0e05af28e010ccbd2772c64e3eaefdde
Reviewed-on: https://skia-review.googlesource.com/19026
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-06-07 20:08:46 +00:00
Hal Canary
fa2a26a026 SkPDF: Do draw{Image,Bitmap}Rect with maskfilter.
https://fiddle.skia.org/c/@skbug_237_drawImageRect

BUG=skia:237
Change-Id: I4d6d683fcbfd6dc86a27998e3d03534458952db0
Reviewed-on: https://skia-review.googlesource.com/19023
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-06-07 19:30:05 +00:00
Florin Malita
a924dd3b7e Use burst mode for linear gradients w/ > 2 stops
Change-Id: I4c2778ca9a004ae8b45362e11cb15ac7703c18ac
Reviewed-on: https://skia-review.googlesource.com/19022
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-06-07 19:11:01 +00:00
Chris Dalton
46983b7dd8 Introduce dynamic pipeline state
Adds a DynamicState struct to GrPipeline that has a field for the
scissor rect. Eventually this should become the only way to specify a
scissor rectangle and may grow to contain more fields. Adds an array of
DynamicStates to GrGpuCommandBuffer::draw and implements support in GL
and Vulkan.

Bug: skia:
Change-Id: If5aebbf9da5d192acf7e68e7def4674ffc7ec310
Reviewed-on: https://skia-review.googlesource.com/18510
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-06-07 18:26:11 +00:00
Matt Sarett
912e6b8837 Reland "Handle different types of streams in different jpeg source managers"
For streams that are memory backed (stream->getMemoryBase() returns
a non-null ptr and hasLength() returns true), handle the stream
with skjpeg_mem_source_mgr, which directly assigns memory base to
the source manager.  For other non memory backed streams, handle the
stream with skjpeg_buffered_source_mgr, which is renamed from
the old skjpeg_source_mgr with no implementation change.

Original Author: cjbao <cathy.bao@intel.com>
https://skia-review.googlesource.com/c/17296/

Bug: skia:
Change-Id: I0885c5114083f976a9c08afe5954434196762e39
Reviewed-on: https://skia-review.googlesource.com/18933
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-06-07 18:19:29 +00:00
Mike Reed
65cfb5ecbc disable coverage optimization for hairlines
The coverage blitter is an optimization of regular blitting to A8.
It can go faster because it never tries to blend with itself... because
it was intended to be called only by fill-path, which is written to
never draw twice in the same place. Hairlines don't make this promise,
so we can use the coverage optimization for hairlines.

Change-Id: I0a4816f886462017ad81378d5928357ef038ae8f
Reviewed-on: https://skia-review.googlesource.com/18666
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-06-07 17:34:14 +00:00
Robert Phillips
5ab7276a35 Suppress rendererability of kAlpha8 GL_CHROMIUM_framebuffer_multisample for ANGLE D3D9
For ANGLE D3D9 ES2 we're seeing GL_CHROMIUM_framebuffer_multisample but not GL_ANGLE_framebuffer_multisample.
The same occurs for ANGLE D3D11 ES2 but kAlpha8 is renderable in that case.

Bug: 730082
Change-Id: I7eda844b0ad48150d19406517d1dfbe453e9e478
Reviewed-on: https://skia-review.googlesource.com/18980
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-06-07 17:27:54 +00:00
Chris Dalton
b246b9407f Fix croppedrects GM
The stroke-to-rect test was accidentally doing both non-aa draws and
non-filtered texture sampling on exact half pixel boundaries. So
sometimes the CPU and GPU rounded in different directions. This CL
updates the draws and sampling to fall on integer boundaries.

Bug: skia:5522
Change-Id: If968bcbb327106eba8919e4abf3a7211c5326daf
Reviewed-on: https://skia-review.googlesource.com/18960
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-06-07 16:41:37 +00:00