platform/upstream/libSkiaSharp.git
7 years ago[SVGDom] Fix <ellipse> positioning
fmalita [Wed, 17 Aug 2016 22:08:48 +0000 (15:08 -0700)]
[SVGDom] Fix <ellipse> positioning

R=robertphillips@google.com,stephana@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2253283002

Review-Url: https://codereview.chromium.org/2253283002

7 years agoFix assert caused by floating point error in tessellating path renderer.
senorblanco [Wed, 17 Aug 2016 21:56:22 +0000 (14:56 -0700)]
Fix assert caused by floating point error in tessellating path renderer.

In rare cases, floating point error causes the tesselator to add the
same Vertex to more than one Poly on the same side. This was not a big
problem when we were allocating new vertices when constructing Polys,
but after https://codereview.chromium.org/2029243002 it causes more serious
issues, since each Edge can only belong to two Polys, and violating this
condition messes up the linked list of Edges used for left & right Polys
and the associated estimated vertex count.

The fix is to simply let the first Poly win, and skip that vertex for
subsequent Polys. Since this only occurs in cases where vertices are very
close to each other, it should have little visual effect.

This is also exercised by Nebraska-StateSeal.svg.

BUG=skia:5636
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2259493002

Review-Url: https://codereview.chromium.org/2259493002

7 years ago[SVGDom] Add support for assorted absolute units
fmalita [Wed, 17 Aug 2016 21:51:03 +0000 (14:51 -0700)]
[SVGDom] Add support for assorted absolute units

R=robertphillips@google.com,stephana@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2259473002

Review-Url: https://codereview.chromium.org/2259473002

7 years agoSkPDF: cache metrics once.
halcanary [Wed, 17 Aug 2016 21:21:42 +0000 (14:21 -0700)]
SkPDF:  cache metrics once.

Motivation: drawText can look up unicode mapping at draw time to see
if ActualText should be used after crrev.com/2084533004 lands.

For each SkTypeface, only call getAdvancedTypefaceMetrics() once per
document.  Cache the result in the SkPDFCanon, indexed by SkFontID.
Also cache PDF FontDescriptors in the canon, also indexed by SkFontID
(Type1 fonts only).

Simplify PDF font lookup, map SkFontID+SkGlyphID into a uint64_t.  Map
that uint64_t to SkPDFFonts.  Remove SkPDFCanon::findFont(),
SkPDFCanon::addFont(), SkPDFFont::IsMatch(), and enum SkPDFFont::Match.

SkPDFFont no longer holds on to ref of SkAdvancedTypefaceMetrics.
Instead, SkPDFFont::GetFontResource() and SkPDFFont::getFontSubset()
get metrics from canon.

SkPDFFont multybite bool is now a function of type.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2253993002

Review-Url: https://codereview.chromium.org/2253993002

7 years agoAdd alphaType() to SkImage
brianosman [Wed, 17 Aug 2016 21:01:05 +0000 (14:01 -0700)]
Add alphaType() to SkImage

Keep isOpaque as a convenience method -- many places really only need to
know that for optimization purposes (SrcOver -> Src, etc...).

In all the places where we pull data back out or convert to another
object and need to supply an SkImageInfo, we can avoid losing information
about premulness.

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

Review-Url: https://codereview.chromium.org/2250663002

7 years agoFix BUILD.gn for arch other then x86 and x64
anmittal [Wed, 17 Aug 2016 20:57:26 +0000 (13:57 -0700)]
Fix BUILD.gn for arch other then x86 and x64

opts_gypi should only be defined for x86 and x64 else we get unused
variable error

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

Review-Url: https://codereview.chromium.org/2248323002

7 years agoFix computation of clipped src rect when tiling bitmaps in SkGpuDevice
bsalomon [Wed, 17 Aug 2016 20:56:57 +0000 (13:56 -0700)]
Fix computation of clipped src rect when tiling bitmaps in SkGpuDevice
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2252913004

Review-Url: https://codereview.chromium.org/2252913004

7 years agoReduce window rectangles cap to 8
csmartdalton [Wed, 17 Aug 2016 20:52:15 +0000 (13:52 -0700)]
Reduce window rectangles cap to 8

Lowers the cap to 8 and adds a warning message if this value is ever
exceeded. The largest (only) implementation currently supports 8, so
there isn't yet reason to go higher.

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

Review-Url: https://codereview.chromium.org/2254013002

7 years agoEagerly update the unichar to glyphID mapping.
herb [Wed, 17 Aug 2016 20:51:54 +0000 (13:51 -0700)]
Eagerly update the unichar to glyphID mapping.

In addition, some small cleanups.

BUG=chromium:635005
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2249063005

Review-Url: https://codereview.chromium.org/2249063005

7 years agofix no-gpu build
reed [Wed, 17 Aug 2016 20:24:05 +0000 (13:24 -0700)]
fix no-gpu build

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

TBR=robertphilips
NOTREECHECKS=true

Review-Url: https://codereview.chromium.org/2253073003

7 years agoFix fb variable name in GLSL
egdaniel [Wed, 17 Aug 2016 19:55:30 +0000 (12:55 -0700)]
Fix fb variable name in GLSL

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

NOTREECHECKS=True

Review-Url: https://codereview.chromium.org/2252143002

7 years agoSkLiteDL: a little spring cleaning
mtklein [Wed, 17 Aug 2016 18:39:48 +0000 (11:39 -0700)]
SkLiteDL: a little spring cleaning

  - kill off optimizeFor() now that we know it's broken and have a better way;
  - simplify makeThreadsafe() a bit: we're not calling it anyway.

This sort of earns me back some crazy code currency,
which I am going to try to spend making reset() faster.

If anything, this appears to make makeThreadsafe() _faster_.

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

Review-Url: https://codereview.chromium.org/2254913002

7 years agoSimplify adding attributes to GrGeometryProcessor
bsalomon [Wed, 17 Aug 2016 18:33:39 +0000 (11:33 -0700)]
Simplify adding attributes to GrGeometryProcessor
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2248323003

Review-Url: https://codereview.chromium.org/2248323003

7 years agoFix SampleAndroidShadows warnings
fmalita [Wed, 17 Aug 2016 18:33:29 +0000 (11:33 -0700)]
Fix SampleAndroidShadows warnings

R=jvanverth@google.com,robertphillips@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2255863002
NOTRY=true

Review-Url: https://codereview.chromium.org/2255863002

7 years agopin as texture api
reed [Wed, 17 Aug 2016 18:12:33 +0000 (11:12 -0700)]
pin as texture api

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

Review-Url: https://codereview.chromium.org/2241353002

7 years agoMove FamilyClass and Panose enums to enum class.
bungeman [Wed, 17 Aug 2016 17:59:30 +0000 (10:59 -0700)]
Move FamilyClass and Panose enums to enum class.

The IBMFamilyClass and Panose structures are obvious candidates
for simplification now that it is no longer necessary to nest
enums inside structs to avoid name clashes.

Review-Url: https://codereview.chromium.org/2253543004

7 years agoFix various issues with framebuffer fetch
egdaniel [Wed, 17 Aug 2016 17:59:00 +0000 (10:59 -0700)]
Fix various issues with framebuffer fetch

This CL does two things. First it fixes a bug of ours where when using
a custom fbFetch variable (es 3.0 and higher), we sometimes overwrite
the out color and then attempt to use it as the dst color later. This is
fixed here by using an intermediate variable.

Secondly I've added a workaround to an andreno fbFetch where reading from
the outColor always returns the original dstColor even if we've overwritten
the value.

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

Review-Url: https://codereview.chromium.org/2248403003

7 years agoDetemplatize GrGLSLGeometryProcessor::setTransformDataHelper()
bsalomon [Wed, 17 Aug 2016 17:30:17 +0000 (10:30 -0700)]
Detemplatize GrGLSLGeometryProcessor::setTransformDataHelper()

Instead take a local matrix parameter.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2250563004

Review-Url: https://codereview.chromium.org/2250563004

7 years agoSkLiteDL: inline empty()
mtklein [Wed, 17 Aug 2016 17:20:27 +0000 (10:20 -0700)]
SkLiteDL: inline empty()

1.85%     1.85%  RenderThread     6458  6475  /system/lib64/libskia.so  SkLiteDL::empty() const

:/

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

Review-Url: https://codereview.chromium.org/2254823002

7 years agoAdd alternative spot shadow to Android shadow sample
jvanverth [Wed, 17 Aug 2016 17:06:18 +0000 (10:06 -0700)]
Add alternative spot shadow to Android shadow sample

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

Review-Url: https://codereview.chromium.org/2256713002

7 years agoImplement difference clip rects with window rectangles
csmartdalton [Wed, 17 Aug 2016 17:00:21 +0000 (10:00 -0700)]
Implement difference clip rects with window rectangles

Plumbs the pipeline for window rectangles and uses them for a very
basic implementation of difference clip rects. This puts a common
Blink pattern on fast path, but we will still eventually need to make
more comprehensive use of window rectangles during clipping.

GTX 960 perf result:
                              gpu                     glinst4                 glinst16
desk_jsfiddlebigcar.skp       0.254 -> 0.177 [70%]    0.279 -> 0.197 [71%]    0.577 -> 0.196 [34%]
keymobi_sfgate_com_.skp       0.697 -> 0.513 [74%]    0.766 -> 0.451 [59%]    0.769 -> 0.597 [78%]
keymobi_blogger.skp           0.406 -> 0.314 [77%]    0.436 -> 0.292 [67%]    0.696 -> 0.319 [46%]
desk_pokemonwiki.skp          0.121 -> 0.098 [81%]     0.13 -> 0.105 [81%]    0.216 -> 0.097 [45%]
desk_wikipedia.skp            0.121 -> 0.098 [81%]     0.13 -> 0.104 [80%]    0.199 -> 0.104 [52%]
keymobi_androidpolice_co...   0.443 -> 0.382 [86%]    0.447 -> 0.398 [89%]    0.444 -> 0.396 [89%]
keymobi_booking_com_sear...   1 .15 ->  1.03 [90%]     1.17 ->  1.06 [91%]     1.17 ->  1.05 [90%]
keymobi_theverge_com.skp      0.417 -> 0.396 [95%]    0.426 -> 0.405 [95%]    0.429 ->   0.4 [93%]

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

Review-Url: https://codereview.chromium.org/2251573002

7 years agoMake GrReducedClip's gen ID only apply to the element list
csmartdalton [Wed, 17 Aug 2016 16:39:38 +0000 (09:39 -0700)]
Make GrReducedClip's gen ID only apply to the element list

Renames fGenID to fElementsGenID and designates this value as
undefined when when the element list is empty.

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

Review-Url: https://codereview.chromium.org/2244223004

7 years agoKick the can down the road a bit w.r.t. fuzzer complaint
robertphillips [Wed, 17 Aug 2016 16:28:59 +0000 (09:28 -0700)]
Kick the can down the road a bit w.r.t. fuzzer complaint

BUG=635787
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2247033006

Review-Url: https://codereview.chromium.org/2247033006

7 years agoFix tile bitmap code in SkGpuDevice to compute correct local coords.
bsalomon [Wed, 17 Aug 2016 16:02:09 +0000 (09:02 -0700)]
Fix tile bitmap code in SkGpuDevice to compute correct local coords.

This fixes a bug when using an alpha bitmap/image with a SkShader where the SkShader's GrFragmentProcessor would receive incorrect coordinates.

BUG=skia:5643

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

Review-Url: https://codereview.chromium.org/2249163004

7 years agoMinor cleanup of GP classes in GrOvalRenderer
bsalomon [Wed, 17 Aug 2016 16:00:24 +0000 (09:00 -0700)]
Minor cleanup of GP classes in GrOvalRenderer

Move GLSL nested classes to private and remove unnecessary public getters.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2253903002

Review-Url: https://codereview.chromium.org/2253903002

7 years agoModify SkPngCodec to recognize 565 images from the sBIT chunk
msarett [Wed, 17 Aug 2016 15:54:08 +0000 (08:54 -0700)]
Modify SkPngCodec to recognize 565 images from the sBIT chunk

Conveniently, SkPngImageEncoder already writes the sBIT chunk
appropriately.

BUG=skia:5616
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2212563003

Review-Url: https://codereview.chromium.org/2212563003

7 years ago[SVGDom] Add <line> support
fmalita [Wed, 17 Aug 2016 15:38:15 +0000 (08:38 -0700)]
[SVGDom] Add <line> support

R=robertphillips@google.com,stephana@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2244223005

Review-Url: https://codereview.chromium.org/2244223005

7 years agoCast for fuzzer complaint
robertphillips [Wed, 17 Aug 2016 15:02:51 +0000 (08:02 -0700)]
Cast for fuzzer complaint

Given the cast in the following else block, this isn't the first time we've encountered this.

BUG=637187
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2258463002

Review-Url: https://codereview.chromium.org/2258463002

7 years agoAdd alternative ambient shadow method to Android shadow sample
jvanverth [Wed, 17 Aug 2016 14:59:41 +0000 (07:59 -0700)]
Add alternative ambient shadow method to Android shadow sample

TBR=bsalomon@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2249973003

Review-Url: https://codereview.chromium.org/2249973003

7 years agoSkPDF: pull out SkPDFMakeCIDGlyphWidthsArray.cpp
halcanary [Wed, 17 Aug 2016 14:57:27 +0000 (07:57 -0700)]
SkPDF: pull out SkPDFMakeCIDGlyphWidthsArray.cpp

Extract from inside SkPDFFont.cpp
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2251803002

Review-Url: https://codereview.chromium.org/2251803002

7 years agoAdd gerrit config lines to cq.cfg
rmistry [Wed, 17 Aug 2016 14:51:57 +0000 (07:51 -0700)]
Add gerrit config lines to cq.cfg

Needed for the CQ to see Gerrit. Eg:
https://cs.chromium.org/chromium/tools/depot_tools/infra/config/cq.cfg?q=cq.cfg&sq=package:chromium&dr=C&l=9

BUG=skia:5627
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2251643005

Review-Url: https://codereview.chromium.org/2251643005

7 years agomove private test for sect_with_horizontal into unittests
reed [Wed, 17 Aug 2016 14:37:57 +0000 (07:37 -0700)]
move private test for sect_with_horizontal into unittests

BUG=638575
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2250353004

Review-Url: https://codereview.chromium.org/2250353004

7 years agoAdd mssa configs for vulkan, and simple bug fix
egdaniel [Wed, 17 Aug 2016 13:26:16 +0000 (06:26 -0700)]
Add mssa configs for vulkan, and simple bug fix

BUG=skia:5127
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2251473002

Review-Url: https://codereview.chromium.org/2251473002

7 years agofix fuzz
caryclark [Wed, 17 Aug 2016 13:14:06 +0000 (06:14 -0700)]
fix fuzz

TBR=reed@google.com
BUG=638496
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2250413002

Review-Url: https://codereview.chromium.org/2250413002

7 years agoGN: make current_cpu work
mtklein [Wed, 17 Aug 2016 01:28:43 +0000 (18:28 -0700)]
GN: make current_cpu work

Then we can use it to remind ourselves that SSE and AVX are x86-only.

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

Review-Url: https://codereview.chromium.org/2247413003

7 years agoSkLiteDL: thread the original canvas matrix through for SetMatrix::Draw().
mtklein [Wed, 17 Aug 2016 00:18:27 +0000 (17:18 -0700)]
SkLiteDL: thread the original canvas matrix through for SetMatrix::Draw().

The SkLiteDL is recorded in some identity space (imagine, SkMatrix::I()),
but played back in a different one (here named SkMatrix original).  Any
calls to setMatrix() need to be made relative to this new space.

All other ops already operate in relative coordinates.

This should let us not fiddle with setMatrix().

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

Review-Url: https://codereview.chromium.org/2247353003

7 years agoRevert of Start using vertex attributes for nine-patch blurred rrect draws (patchset...
robertphillips [Tue, 16 Aug 2016 22:49:20 +0000 (15:49 -0700)]
Revert of Start using vertex attributes for nine-patch blurred rrect draws (patchset #8 id:140001 of https://codereview.chromium.org/2245653002/ )

Reason for revert:
??

Original issue's description:
> Start using vertex attributes for nine-patch blurred rrect draws
>
> Calved off:
> https://codereview.chromium.org/2243133002/ (Pull handling of blurred circles out of GrRRectBlurEffect::Make)
> https://codereview.chromium.org/2249463002/ (Update blurred rrect mask filter creation method to also handle caching)
> https://codereview.chromium.org/2248533002/ (Update ComputeBlurredRRectParams to compute all the parameters needed for occluded blurred rrect ninepatch draws)
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2245653002
>
> Committed: https://skia.googlesource.com/skia/+/087905a730241939da320092543c19dc06d5a7b4

TBR=bsalomon@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/2250543004

7 years ago[SVGDom] Add <circle>, <ellipse> support
fmalita [Tue, 16 Aug 2016 22:38:51 +0000 (15:38 -0700)]
[SVGDom] Add <circle>, <ellipse> support

R=robertphillips@google.com,stephana@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2249033003

Review-Url: https://codereview.chromium.org/2249033003

7 years agoAdd test for platform encoders, turn off platform encoders by default
msarett [Tue, 16 Aug 2016 22:11:24 +0000 (15:11 -0700)]
Add test for platform encoders, turn off platform encoders by default

Clients that like WIC and CG can still use them.  And we can be
confident about that, since we now test WIC and CG.

Let Skia always use our own encoders by default, so we can do cool,
custom things on all platforms.

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

Review-Url: https://codereview.chromium.org/2250683003

7 years agoFix bug in cubic derivative coefficient with missing parens
hstern [Tue, 16 Aug 2016 22:10:34 +0000 (15:10 -0700)]
Fix bug in cubic derivative coefficient with missing parens

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

Review-Url: https://codereview.chromium.org/2242603002

7 years agoStart using vertex attributes for nine-patch blurred rrect draws
robertphillips [Tue, 16 Aug 2016 21:50:18 +0000 (14:50 -0700)]
Start using vertex attributes for nine-patch blurred rrect draws

Calved off:
https://codereview.chromium.org/2243133002/ (Pull handling of blurred circles out of GrRRectBlurEffect::Make)
https://codereview.chromium.org/2249463002/ (Update blurred rrect mask filter creation method to also handle caching)
https://codereview.chromium.org/2248533002/ (Update ComputeBlurredRRectParams to compute all the parameters needed for occluded blurred rrect ninepatch draws)

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

Review-Url: https://codereview.chromium.org/2245653002

7 years agoOnly test SVG DM sources against direct raster/gpu sinks.
fmalita [Tue, 16 Aug 2016 21:23:29 +0000 (14:23 -0700)]
Only test SVG DM sources against direct raster/gpu sinks.

There isn't much value in testing against indirect or vector sinks.

R=mtklein@google.com,robertphillips@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2252443002

Review-Url: https://codereview.chromium.org/2252443002

7 years agoRemove SkPreprocessorSeq.h and SkTypedEnum.h.
bungeman [Tue, 16 Aug 2016 19:27:49 +0000 (12:27 -0700)]
Remove SkPreprocessorSeq.h and SkTypedEnum.h.

These were added to allow the use of typed enums before typed enums were
available on all platforms. Now that typed enums are available, just use
them directly.

Review-Url: https://codereview.chromium.org/2254513002

7 years agoSkPDF: Font names need escaping
halcanary [Tue, 16 Aug 2016 18:54:57 +0000 (11:54 -0700)]
SkPDF: Font names need escaping

NOTRY=true

Review-Url: https://codereview.chromium.org/2250763002

7 years agoSkPDF: eliminate SkPDFCIDfont class
halcanary [Tue, 16 Aug 2016 17:29:38 +0000 (10:29 -0700)]
SkPDF: eliminate SkPDFCIDfont class

get_glyph_widths() and set_glyph_widths() combined.

set_glyph_widths() now takes a SkPDFGlyphSet*.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2244173005

Review-Url: https://codereview.chromium.org/2244173005

7 years agofix fuzz bug
caryclark [Tue, 16 Aug 2016 17:25:29 +0000 (10:25 -0700)]
fix fuzz bug

TBR=reed@google.com
BUG=637968, 638002
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2250573003

Review-Url: https://codereview.chromium.org/2250573003

7 years agoSkPDF: SkPDFFont class changes
halcanary [Tue, 16 Aug 2016 16:36:23 +0000 (09:36 -0700)]
SkPDF:  SkPDFFont class changes

SkPDFFont:
  * inline some one-line methdods.
      - SkPDFFont::typeface()
      - SkPDFFont::fontInfo()
      - SkPDFFont::firstGlyphID()
      - SkPDFFont::lastGlyphID()
      - SkPDFFont::getFontDescriptor()
  * de-virtualize some methods:
      - SkPDFFont::getType()
      - SkPDFFont::multiByteGlyphs()
  * Constructor takes more arguments:
    fontType, multiByteGlyphs
  * re-order fields (pointers before shorts)
  * use sk_sp<T> more, T* less

SkAdvancedTypefaceMetrics:
  * SkAdvancedTypefaceMetrics::fFont now a uint8_t
  * other enumes are sized.
  * SkAdvancedTypefaceMetrics::fStyle now big enough.
  * remove use of SkTBitOr, replaced with fancy templates

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

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

Review-Url: https://codereview.chromium.org/2246903002

7 years agoSkLiteDL: remove freelisting, add reset() and SKLITEDL_PAGE knob.
mtklein [Tue, 16 Aug 2016 16:36:18 +0000 (09:36 -0700)]
SkLiteDL: remove freelisting, add reset() and SKLITEDL_PAGE knob.

We think Android can cache these better than a global freelist allows.
This removes the freelisting but adds reset() to allow reuse.

I took the opportunity to abstract 4096 as a define SKLITEDL_PAGE.

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

Review-Url: https://codereview.chromium.org/2248693004

7 years agoGN: add extra_cflags et al.
mtklein [Tue, 16 Aug 2016 16:31:16 +0000 (09:31 -0700)]
GN: add extra_cflags et al.

Adding flags to the end of cc or cxx is pretty useful, but these always end up
on the command line before the GN generated flags, thus setting defaults that
GN will override.

For full flexibility we want to be able to add flags after the flags GN has
added, so that custom flags can override _it_.

I've updated the Fast bots with an example here: if we said cc="clang -O3 ...",
that '-O3' would be overriden later by the default Release-mode '-Os'.  By
putting it in extra_cflags, we get the last word: our '-O3' overrides the
default '-Os'.

Another good use case is a hypothetical Actually-Shippable-Release mode.  Our
Release mode bundles in tons of debug symbols via '-g'.  libskia.a is about 10x
larger than it needs to be when built that way, but it helps us debug the bot
failures immensely.  To build a libskia.{a,so} that you'd really ship, you can
now set extra_cflags="-g0" to override '-g'.  You could set '-march' flags there
too, '-fomit-frame-pointer', etc.

There are lots of flags that won't matter where they end up in the command line.
To keep everything simple I've put them in extra_cflags with the rest.  This means
the only time we change 'cc' or 'cxx' in our recipes is to prefix 'ccache'.

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

Review-Url: https://codereview.chromium.org/2241263003

7 years agoAdd onDrawBitmapLattice(), avoid unnecessary bitmap->image copy
msarett [Tue, 16 Aug 2016 16:31:08 +0000 (09:31 -0700)]
Add onDrawBitmapLattice(), avoid unnecessary bitmap->image copy

out/Release/nanobench --match Lattice --config gpu --ms 3000
3.42ms -> 17.2us

For reference, a loop over drawBitmapRects (which is what
Android currently does) is about 13us.

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

Review-Url: https://codereview.chromium.org/2205273003

7 years agoUpdate ComputeBlurredRRectParams to compute all the parameters needed for occluded...
robertphillips [Tue, 16 Aug 2016 16:30:03 +0000 (09:30 -0700)]
Update ComputeBlurredRRectParams to compute all the parameters needed for occluded blurred rrect ninepatch draws

This is split out of: https://codereview.chromium.org/2245653002/ (Start using vertex attributes for nine-patch blurred rrect draws)

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

Review-Url: https://codereview.chromium.org/2248533002

7 years ago32-bit fast hash, tidy up murmur3 a bit
mtklein [Tue, 16 Aug 2016 16:29:57 +0000 (09:29 -0700)]
32-bit fast hash, tidy up murmur3 a bit

Nothing too surprising in the new 32-bit x86 hash.  It's about half speed of the 64-bit variant, just as you'd expect.

Using unaligned_load like the others makes the may_alias parts of murmur3 moot.  I've updated some of the terms in the murmur hash to read consistently with the others.

The existing hashes are the same speed and produce the same hashes.  In case this is not obvious, all three hash functions produce different hashes.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2251773002
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/2251773002

7 years agoImprovements for circluar blurs in GPU backend.
bsalomon [Tue, 16 Aug 2016 16:24:57 +0000 (09:24 -0700)]
Improvements for circluar blurs in GPU backend.

Use half plane approximation for small blur of a large circle. This reduces
the number of textures used and also avoids numerical issues with large
circle radii.

Make GrCircleGradientEffect use fixed sized textures.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2242973002

Review-Url: https://codereview.chromium.org/2242973002

7 years agoReducing number of calls to GLSL mix() from two to one reduces frame render time...
fmenozzi [Tue, 16 Aug 2016 16:24:52 +0000 (09:24 -0700)]
Reducing number of calls to GLSL mix() from two to one reduces frame render time by 21%

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

Review-Url: https://codereview.chromium.org/2247113003

7 years agoRemove isOpaque from SkSpecialImage, just use alpha type
brianosman [Tue, 16 Aug 2016 14:09:47 +0000 (07:09 -0700)]
Remove isOpaque from SkSpecialImage, just use alpha type

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

Review-Url: https://codereview.chromium.org/2246193002

7 years agoDisable Nebraska-StateSeal.svg on Win8 bots
fmalita [Tue, 16 Aug 2016 14:08:48 +0000 (07:08 -0700)]
Disable Nebraska-StateSeal.svg on Win8 bots

Temporary suppression, pending bug fix.

BUG=skia:5636
R=robertphillips@google.com,senorblanco@chromium.org
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2249763002

Review-Url: https://codereview.chromium.org/2249763002

7 years agosimplify GrTextureAdjuster given there is only one subclass
reed [Tue, 16 Aug 2016 13:39:39 +0000 (06:39 -0700)]
simplify GrTextureAdjuster given there is only one subclass

Intended as a pre-cl for https://codereview.chromium.org/2241353002#

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

Review-Url: https://codereview.chromium.org/2242373002

7 years agoMoved "drawShadowedPicture" call outside of if cases in onDrawContent.
vjiaoblack [Tue, 16 Aug 2016 12:38:45 +0000 (05:38 -0700)]
Moved "drawShadowedPicture" call outside of if cases in onDrawContent.

Bug description:
If you updated the view without changing frames (such as moving around the
cursor with 'z' (pixel zoom) on) the window would turn gray.

This was because I left the drawShadowedPicture call inside of the "if-updated"
case inside of SampleShadowing's onDrawContent handler.

If nothing changed and onDrawContent is called, we still need to update the
given canvas's fLights (there is no guarantee of whether the canvas (or its
fLights) has been updated or not), and then draw the shadowed picture.

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

Review-Url: https://codereview.chromium.org/2245923002

7 years agoRevert of Add regression test (patchset #2 id:20001 of https://codereview.chromium...
msarett [Tue, 16 Aug 2016 11:54:19 +0000 (04:54 -0700)]
Revert of Add regression test (patchset #2 id:20001 of https://codereview.chromium.org/2243143002/ )

Reason for revert:
Nexus 9 and Nexus Player failures.

Original issue's description:
> Add regression test
>
> Original bug fix was in:
> https://codereview.chromium.org/2230163002
>
> BUG:636268
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2243143002
>
> Committed: https://skia.googlesource.com/skia/+/bcae9d3d15d34a59d279c34e187e6101975500c0

TBR=reed@google.com,gogil@stealien.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/2243403003

7 years agoFix WIC encoder to support kJPEG_Type
msarett [Tue, 16 Aug 2016 01:52:17 +0000 (18:52 -0700)]
Fix WIC encoder to support kJPEG_Type

(1) Add support for kJPEG to WIC
(2) Add encoding test.
(3) Turn on WIC jpeg encoder on Windows and CG jpeg
    encoder on Mac.

A follow-up may make Skia's encoders the default on all
platforms.  But, in order to do that, I think we need
to write better encoding unit tests for CG and WIC.

BUG=skia:3969
BUG=skia:5632
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2245453002

Committed: https://skia.googlesource.com/skia/+/b3a7ef1fc0adc24859d2498aee54d3ec2cbcac3a
Review-Url: https://codereview.chromium.org/2245453002

7 years agoSkPDF: unify drawText and drawPosText
halcanary [Tue, 16 Aug 2016 01:40:07 +0000 (18:40 -0700)]
SkPDF: unify drawText and drawPosText

Motivation: a later CL will add drawTextBlob() (after
https://crrev.com/2084533004 lands).  This CL is designed
with that change in mind.  Also fewer redundant lines of
code.

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

Committed: https://skia.googlesource.com/skia/+/6059dc32fe36358175cb81541c91e74a2a7e771a
Review-Url: https://codereview.chromium.org/2241683005

7 years agoRevert of SkPDF: unify drawText and drawPosText (patchset #2 id:40001 of https:/...
robertphillips [Mon, 15 Aug 2016 22:36:58 +0000 (15:36 -0700)]
Revert of SkPDF: unify drawText and drawPosText (patchset #2 id:40001 of https://codereview.chromium.org/2241683005/ )

Reason for revert:
I believe this is breaking the Google3 roll

Original issue's description:
> SkPDF: unify drawText and drawPosText
>
> Motivation: a later CL will add drawTextBlob() (after
> https://crrev.com/2084533004 lands).  This CL is designed
> with that change in mind.  Also fewer redundant lines of
> code.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2241683005
>
> Committed: https://skia.googlesource.com/skia/+/6059dc32fe36358175cb81541c91e74a2a7e771a

TBR=bungeman@google.com,halcanary@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/2248923002

7 years agoDefined SkDEBUGFAILF on Release builds
hstern [Mon, 15 Aug 2016 22:26:31 +0000 (15:26 -0700)]
Defined SkDEBUGFAILF on Release builds

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

Review-Url: https://codereview.chromium.org/2244253003

7 years agoAttempt to throw away rrect clips of rrects.
bsalomon [Mon, 15 Aug 2016 21:49:10 +0000 (14:49 -0700)]
Attempt to throw away rrect clips of rrects.

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

Review-Url: https://codereview.chromium.org/2241273003

7 years agoFix compile warning on MSVC-vulkan (VkDeviceSize -> size_t)
brianosman [Mon, 15 Aug 2016 21:06:31 +0000 (14:06 -0700)]
Fix compile warning on MSVC-vulkan (VkDeviceSize -> size_t)

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

Review-Url: https://codereview.chromium.org/2246183002

7 years agoRevert of Fix WIC encoder to support kJPEG_Type (patchset #3 id:140001 of https:...
msarett [Mon, 15 Aug 2016 20:52:31 +0000 (13:52 -0700)]
Revert of Fix WIC encoder to support kJPEG_Type (patchset #3 id:140001 of https://codereview.chromium.org/2245453002/ )

Reason for revert:
Broken Windows bot.

Original issue's description:
> Fix WIC encoder to support kJPEG_Type
>
> (1) Add support for kJPEG to WIC
> (2) Add encoding test.
> (3) Turn on WIC jpeg encoder on Windows and CG jpeg
>     encoder on Mac.
>
> A follow-up may make Skia's encoders the default on all
> platforms.  But, in order to do that, I think we need
> to write better encoding unit tests for CG and WIC.
>
> BUG=skia:3969
> BUG=skia:5632
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2245453002
>
> Committed: https://skia.googlesource.com/skia/+/b3a7ef1fc0adc24859d2498aee54d3ec2cbcac3a

TBR=mtklein@google.com,mtklein@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:3969

Review-Url: https://codereview.chromium.org/2246203002

7 years agoPrint error from driver when shader compiler fails
bsalomon [Mon, 15 Aug 2016 20:49:32 +0000 (13:49 -0700)]
Print error from driver when shader compiler fails

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

Review-Url: https://codereview.chromium.org/2248853002

7 years agoFix up infra bot change
fmalita [Mon, 15 Aug 2016 20:38:18 +0000 (13:38 -0700)]
Fix up infra bot change

Follow up to https://codereview.chromium.org/2246943002/.

R=mtklein@google.com,robertphillips@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2247903002

Review-Url: https://codereview.chromium.org/2247903002

7 years agoFix WIC encoder to support kJPEG_Type
msarett [Mon, 15 Aug 2016 20:19:20 +0000 (13:19 -0700)]
Fix WIC encoder to support kJPEG_Type

(1) Add support for kJPEG to WIC
(2) Add encoding test.
(3) Turn on WIC jpeg encoder on Windows and CG jpeg
    encoder on Mac.

A follow-up may make Skia's encoders the default on all
platforms.  But, in order to do that, I think we need
to write better encoding unit tests for CG and WIC.

BUG=skia:3969
BUG=skia:5632
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2245453002

Review-Url: https://codereview.chromium.org/2245453002

7 years agoRevert of add parallel public API for recording SkLiteDL. (patchset #1 id:1 of https...
mtklein [Mon, 15 Aug 2016 19:56:00 +0000 (12:56 -0700)]
Revert of add parallel public API for recording SkLiteDL. (patchset #1 id:1 of https://codereview.chromium.org/2246893002/ )

Reason for revert:
looking like we won't need this

Original issue's description:
> add parallel public API for recording SkLiteDL.
>
> The API is restricted to pretty much just what Derek calls,
> but it's enough that we can switch testing over to use it.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2246893002
>
> Committed: https://skia.googlesource.com/skia/+/ced26a3d6b77d3a6744a8ccb8eff23eda45fc867

TBR=djsollen@google.com,reed@google.com,mtklein@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/2243393002

7 years ago[SVGDom] Add opacity support
fmalita [Mon, 15 Aug 2016 19:45:11 +0000 (12:45 -0700)]
[SVGDom] Add opacity support

Group opacity support.  Unlike the other presentation attributes we
support thus far, group opacity is not inherited.

R=robertphillips@google.com,stephana@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2246943002

Review-Url: https://codereview.chromium.org/2246943002

7 years agoUpdate blurred rrect mask filter creation method to also handle caching
robertphillips [Mon, 15 Aug 2016 19:37:00 +0000 (12:37 -0700)]
Update blurred rrect mask filter creation method to also handle caching

The caching of the mask will also be required for the vertex attribute path so I moved that into the helper. The parameters computed by ComputeBlurredRRectParams will be needed to construct the coverage geometry by the vertex attribute path so I moved that out of the helper.

This is split out of https://codereview.chromium.org/2245653002/ (Start using vertex attributes for nine-patch blurred rrect draws)

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

Review-Url: https://codereview.chromium.org/2249463002

7 years agoadd gm that exercises compose shader allocations
caryclark [Mon, 15 Aug 2016 19:03:33 +0000 (12:03 -0700)]
add gm that exercises compose shader allocations

This gm triggers the assert in SkSmallAllocator.h
commented out by this CL.

PDFium constructs shaders that resemble the GM.

R=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2249703002

Review-Url: https://codereview.chromium.org/2249703002

7 years agoSkPDF: unify drawText and drawPosText
halcanary [Mon, 15 Aug 2016 18:45:36 +0000 (11:45 -0700)]
SkPDF: unify drawText and drawPosText

Motivation: a later CL will add drawTextBlob() (after
https://crrev.com/2084533004 lands).  This CL is designed
with that change in mind.  Also fewer redundant lines of
code.

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

Review-Url: https://codereview.chromium.org/2241683005

7 years agojust add SkLiteDL::empty()
mtklein [Mon, 15 Aug 2016 18:43:35 +0000 (11:43 -0700)]
just add SkLiteDL::empty()

TBR=djsollen@google.com

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

Review-Url: https://codereview.chromium.org/2249713002

7 years agoLightingFP now supports multiple directional lights
dvonbeck [Mon, 15 Aug 2016 18:35:55 +0000 (11:35 -0700)]
LightingFP now supports multiple directional lights

BUG=skia:5518
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2239933004

Review-Url: https://codereview.chromium.org/2239933004

7 years agoConvert GrAppliedClip interface to builder style
csmartdalton [Mon, 15 Aug 2016 18:17:19 +0000 (11:17 -0700)]
Convert GrAppliedClip interface to builder style

GrAppliedClip was about at its limit for how many "make" functions it
could have. Window rectangles would push it over the edge. This change
makes it so GrDrawTarget supplies the original draw bounds to the
constructor, and then GrClip adds the various required clipping
techniques.

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

Review-Url: https://codereview.chromium.org/2246113002

7 years agoFix 4444 on Vulkan devices who don't support RGBA_4444
egdaniel [Mon, 15 Aug 2016 17:59:17 +0000 (10:59 -0700)]
Fix 4444 on Vulkan devices who don't support RGBA_4444

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

Committed: https://skia.googlesource.com/skia/+/637b3bf2b9c10398d823bd015a722842d4f2f971
Review-Url: https://codereview.chromium.org/2238563002

7 years agoIncrease hard and io timeouts for CT builds.
rmistry [Mon, 15 Aug 2016 16:54:56 +0000 (09:54 -0700)]
Increase hard and io timeouts for CT builds.

BUG=skia:5641
TBR=borenet
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2249523004

Review-Url: https://codereview.chromium.org/2249523004

7 years agoAdd regression test
msarett [Mon, 15 Aug 2016 16:41:59 +0000 (09:41 -0700)]
Add regression test

Original bug fix was in:
https://codereview.chromium.org/2230163002

BUG:636268
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2243143002

Review-Url: https://codereview.chromium.org/2243143002

7 years agoPull handling of blurred circles out of GrRRectBlurEffect::Make
robertphillips [Mon, 15 Aug 2016 16:04:45 +0000 (09:04 -0700)]
Pull handling of blurred circles out of GrRRectBlurEffect::Make

GrRRectBlurEffect is going away so this process can't live there anymore.

Split out of: https://codereview.chromium.org/2245653002/ (Start using vertex attributes for nine-patch blurred rrect draws)

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

Review-Url: https://codereview.chromium.org/2243133002

7 years agoRevert of increase small allocator limit to encompass compose shader (patchset #1...
caryclark [Mon, 15 Aug 2016 15:44:46 +0000 (08:44 -0700)]
Revert of increase small allocator limit to encompass compose shader (patchset #1 id:1 of https://codereview.chromium.org/2234423005/ )

Reason for revert:
Increase in stack broke Google3

Original issue's description:
> increase small allocator limit to encompass compose shader
>
> R=reed@google.com
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2234423005
>
> Committed: https://skia.googlesource.com/skia/+/8c200694f8eec5f623b3934b85c31dbb382be12c

TBR=reed@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/2244293002

7 years agoOptimize color xforms when src and dst are matching
msarett [Mon, 15 Aug 2016 15:10:44 +0000 (08:10 -0700)]
Optimize color xforms when src and dst are matching

Useful when:
(1) Client does not realize src and dst match (calls color
    xform anyway).
(2) Client wants half floats, src and dst have matching
    gamuts
(3) Client wants premul (done correctly in linear space),
    src and dst have matching gamuts.

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

Review-Url: https://codereview.chromium.org/2206403003

7 years agoFix copying of data in vulkan testing texture
egdaniel [Mon, 15 Aug 2016 15:06:29 +0000 (08:06 -0700)]
Fix copying of data in vulkan testing texture

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

Review-Url: https://codereview.chromium.org/2248703002

7 years agoadd parallel public API for recording SkLiteDL.
mtklein [Mon, 15 Aug 2016 15:05:39 +0000 (08:05 -0700)]
add parallel public API for recording SkLiteDL.

The API is restricted to pretty much just what Derek calls,
but it's enough that we can switch testing over to use it.

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

Review-Url: https://codereview.chromium.org/2246893002

7 years ago[SVGDom] Deferred SampleApp parsing
fmalita [Mon, 15 Aug 2016 14:48:47 +0000 (07:48 -0700)]
[SVGDom] Deferred SampleApp parsing

Parse SVG files in onOnceBeforeDraw() rather than ctor, to avoid
front-loading a bunch of work when passed a loarge number of SVGs.

R=stephana@google.com,robertphillips@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2245993002

Review-Url: https://codereview.chromium.org/2245993002

7 years agoSkip CompressCheckerboard unit test on N6.
mtklein [Mon, 15 Aug 2016 14:47:57 +0000 (07:47 -0700)]
Skip CompressCheckerboard unit test on N6.

This is at least one of the failures making the bot red.
The particular signal indicates it's probably an alignment problem.

BUG=skia:5637
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2245063002

CQ_INCLUDE_TRYBOTS=master.client.skia.android:Test-Android-GCC-Nexus6-CPU-NEON-Arm7-Debug-Trybot

TBR=robertphillips@google.com

Review-Url: https://codereview.chromium.org/2245063002

7 years agoAdd specialized code for hard stop gradients on GPU
fmenozzi [Mon, 15 Aug 2016 14:03:47 +0000 (07:03 -0700)]
Add specialized code for hard stop gradients on GPU

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

Committed: https://skia.googlesource.com/skia/+/0c63006b88a16e3418d92852a62771615799839d
Committed: https://skia.googlesource.com/skia/+/99818d69372d29a139935cfe5c379e491432931b
Committed: https://skia.googlesource.com/skia/+/2a4959181fc98d5d7ee862e7cd1c7993b3343be6
Review-Url: https://codereview.chromium.org/2223203003

7 years agoDocumentation: Important things on front page
halcanary [Mon, 15 Aug 2016 13:56:18 +0000 (06:56 -0700)]
Documentation:  Important things on front page

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

Review-Url: https://codereview.chromium.org/2112643003

7 years agoincrease small allocator limit to encompass compose shader
caryclark [Mon, 15 Aug 2016 00:26:28 +0000 (17:26 -0700)]
increase small allocator limit to encompass compose shader

R=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2234423005

Review-Url: https://codereview.chromium.org/2234423005

7 years agoWebp has_alpha is a hint only
msarett [Sun, 14 Aug 2016 22:31:28 +0000 (15:31 -0700)]
Webp has_alpha is a hint only

The has_alpha bit on webps is a hint only.  We are correct to always
assume that the image may have alpha.
https://groups.google.com/a/webmproject.org/forum/#!msg/webp-discuss/2rFPKOzxuSM/uabYhmSNJAAJ

TBR=scroggo@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2243153002

Review-Url: https://codereview.chromium.org/2243153002

7 years agoAssert fDeviceClipBounds is always empty when clip is empty
msarett [Sun, 14 Aug 2016 20:51:16 +0000 (13:51 -0700)]
Assert fDeviceClipBounds is always empty when clip is empty

I've fixed a few issues where this assert triggers.  The
nastiest case is when the client sets the clip to a strange
version of an empty rect (Ex: L,T,R,B=0,0,0,10).

I think I've made sufficient fixes so that
fDeviceClipBounds is always empty when clip is empty.

Let's test it though.

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

Review-Url: https://codereview.chromium.org/2246503003

7 years agoPrevent overflows when using gamma_alloc_size
gogil [Sun, 14 Aug 2016 09:12:40 +0000 (02:12 -0700)]
Prevent overflows when using gamma_alloc_size

BUG=636268
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2230163002

Review-Url: https://codereview.chromium.org/2230163002

7 years agoUpdate SKP version
update-skps [Sun, 14 Aug 2016 08:56:40 +0000 (01:56 -0700)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

TBR=
NO_MERGE_BUILDS
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2249443002

Review-Url: https://codereview.chromium.org/2249443002

7 years agoRemove stencil settings param from stencilPath()
csmartdalton [Fri, 12 Aug 2016 22:11:51 +0000 (15:11 -0700)]
Remove stencil settings param from stencilPath()

stencilPath() picks its own user stencil settings. This argument
should not be there.

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

Review-Url: https://codereview.chromium.org/2241873002

7 years ago[SVGDom] SVGPong sample app
fmalita [Fri, 12 Aug 2016 20:17:11 +0000 (13:17 -0700)]
[SVGDom] SVGPong sample app

Shows off SVG dom-based animations.

R=robertphillips@google.com,stephana@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2243853003

Review-Url: https://codereview.chromium.org/2243853003

7 years agoRe-adding analytical GeoProc for rectangles
dvonbeck [Fri, 12 Aug 2016 19:50:36 +0000 (12:50 -0700)]
Re-adding analytical GeoProc for rectangles

Adapted old GeoProc because its knowledge of the geometry is helpful for computing the distance vector: https://skia.googlesource.com/skia/+/6006d0f8c4f19d19a12de20826f731f52ac822a7/src/gpu/GrAARectRenderer.cpp

Added distance vector capabilities to this GeoProc.

Modified GrDrawContext to used this GeoProc when drawing anti-aliased vectors with a shader that requires distance vectors.

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

Review-Url: https://codereview.chromium.org/2230513004

7 years agoRevert of Exact Ganesh Gradients for Special Cases (patchset #9 id:160001 of https...
halcanary [Fri, 12 Aug 2016 19:35:51 +0000 (12:35 -0700)]
Revert of Exact Ganesh Gradients for Special Cases (patchset #9 id:160001 of https://codereview.chromium.org/2223203003/ )

Reason for revert:
specualtive revert to fix valgrind bot
Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind

Original issue's description:
> Remove generalized gradient code
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2223203003
>
> Committed: https://skia.googlesource.com/skia/+/0c63006b88a16e3418d92852a62771615799839d
> Committed: https://skia.googlesource.com/skia/+/99818d69372d29a139935cfe5c379e491432931b
> Committed: https://skia.googlesource.com/skia/+/2a4959181fc98d5d7ee862e7cd1c7993b3343be6

TBR=bsalomon@google.com,fmenozzi@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/2245533005

7 years ago[SVGDom] <polygon> & <polyline> support
fmalita [Fri, 12 Aug 2016 19:15:33 +0000 (12:15 -0700)]
[SVGDom] <polygon> & <polyline> support

R=robertphillips@google.com,stephana@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2235273003

Review-Url: https://codereview.chromium.org/2235273003

7 years agoAllow vulkan to upload data to testing textures with optimal layouts
egdaniel [Fri, 12 Aug 2016 18:58:53 +0000 (11:58 -0700)]
Allow vulkan to upload data to testing textures with optimal layouts

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

Review-Url: https://codereview.chromium.org/2242553002