Commit Graph

7928 Commits

Author SHA1 Message Date
Robert Phillips
8d5ce2d9ed Patch up ref counting of proxies
Bug: skia:
Change-Id: If746283d788368bf7aad6d285f181d8531768e61
Reviewed-on: https://skia-review.googlesource.com/70024
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-11-13 13:22:20 +00:00
Mike Reed
48723156c5 remove legacy code for resolution
Bug: skia:
Change-Id: I6909325d4ee51140ec0edb47682de18617c23cc7
Reviewed-on: https://skia-review.googlesource.com/70100
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2017-11-10 19:59:47 +00:00
Greg Daniel
037d1fc453 Use vulkan prototypes for android framework build
The framework still directly calls vulkan vkGetInstanceProcAddr (and device).

Bug: skia:
Change-Id: Ie20a4fc4f58d0f51f995605dc8464a4e26b76602
Reviewed-on: https://skia-review.googlesource.com/69923
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-11-10 18:31:47 +00:00
Ethan Nicholas
1706f84208 switched GrClipEdge to an enum class
Bug: skia:
Change-Id: Idf41580314a32739c70721530fc3ca48e566b044
Reviewed-on: https://skia-review.googlesource.com/70023
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-11-10 17:42:27 +00:00
Greg Daniel
83bd441480 Set VK_NO_PROTOTYPES for vulkan backend
Bug: skia:
Change-Id: Id740efe6030b70271b0eb3a3bd6a111202f28fd8
Reviewed-on: https://skia-review.googlesource.com/69160
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2017-11-10 15:47:37 +00:00
Mike Reed
77e487dfc0 Revert "Revert "Remove MakeForLocalSpace since picture image is sufficient""
This reverts commit fc45998242.

Reason for revert: google3 updated (I think)

Original change's description:
> Revert "Remove MakeForLocalSpace since picture image is sufficient"
> 
> This reverts commit 0d8766c84c.
> 
> Reason for revert: broke google3
> 
> Original change's description:
> > Remove MakeForLocalSpace since picture image is sufficient
> > 
> > Bug: skia:
> > Change-Id: If38e702c418e93141311490edf447d1f09ed4434
> > Reviewed-on: https://skia-review.googlesource.com/68640
> > Commit-Queue: Mike Reed <reed@google.com>
> > Reviewed-by: Florin Malita <fmalita@chromium.org>
> 
> TBR=robertphillips@google.com,fmalita@chromium.org,reed@google.com
> 
> Change-Id: I3dec3d2c704e02b4db5977c27cc3e6d9f1c68ed5
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/69500
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=robertphillips@google.com,fmalita@chromium.org,reed@google.com

Change-Id: I5751fa637d280f361dea0f248a43c1f7e9bd8bdc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/69661
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-11-09 21:50:27 +00:00
Cary Clark
ba2526bc66 replace some points with vectors to clarify documentation
Some SkIPoint and SkPoint methods become clearer if their
parameters or return value is typed as a vector.

Since SkPoint is identical to SkVector (and SkIPoint is
identical to newly added SkIVector) this has no impact
on compiled code.

Some routines arguably have multiple possible point and
vector combinations which will be included in eventual
documentation; the interface should have the most common
and/or logical choice.

Some of my choices could be argued with as well. Does
SkPoint::Normalize take a SkPoint? Afternative points
of view encouraged.

R=reed@google.com,bsalomon@google.com
Bug: skia:6898
Change-Id: I2429b9d43b20351188d7c6433620a2e221f75bd8
Reviewed-on: https://skia-review.googlesource.com/69680
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Cary Clark <caryclark@skia.org>
2017-11-09 21:37:27 +00:00
Ethan Nicholas
0f3c73220a renamed GrPrimitiveEdgeType / GrProcessorEdgeType to GrClipEdgeType
Bug: skia:
Change-Id: I4a9af0b9b2cfa47875b2ba098098183e8dca29a7
Reviewed-on: https://skia-review.googlesource.com/69601
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-11-09 20:59:27 +00:00
Mike Reed
fc45998242 Revert "Remove MakeForLocalSpace since picture image is sufficient"
This reverts commit 0d8766c84c.

Reason for revert: broke google3

Original change's description:
> Remove MakeForLocalSpace since picture image is sufficient
> 
> Bug: skia:
> Change-Id: If38e702c418e93141311490edf447d1f09ed4434
> Reviewed-on: https://skia-review.googlesource.com/68640
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>

TBR=robertphillips@google.com,fmalita@chromium.org,reed@google.com

Change-Id: I3dec3d2c704e02b4db5977c27cc3e6d9f1c68ed5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/69500
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-11-09 18:44:17 +00:00
Mike Klein
ea000ff330 remove SkFixedMul_arm()
The portable SkFixedMul_longlong (here now renamed SkFixedMul)
generates shorter, equivalent code,

from
   0:   fb81 0200       smull   r0, r2, r1, r0
   4:   ea4f 4010       mov.w   r0, r0, lsr #16
   8:   ea40 4002       orr.w   r0, r0, r2, lsl #16

to
   0:   fb81 0100       smull   r0, r1, r1, r0
   4:   0c00            lsrs    r0, r0, #16
   6:   ea40 4001       orr.w   r0, r0, r1, lsl #16

(Notice, 2 bytes saved.)

Change-Id: Icb0f7e6d4379086fc602f956a4beb1265a9759bc
Reviewed-on: https://skia-review.googlesource.com/69440
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-11-09 18:22:44 +00:00
Ben Wagner
e580649a38 Update doc and example for SkPaint::FontMetrics.
The underline position is actually the top of the underline. Also
clarify that the strike through position is the bottom of the strike
through.

This adds documentation that the values are always y-down in a way that
will end up in the SkPaint header file for those who look for
information there.

Change-Id: I40281c0e47557d23291b6a91474e2d3e3b37f09f
Docs-Preview: https://skia.org/user/api/SkPaint_Reference?cl=69361#FontMetrics
Reviewed-on: https://skia-review.googlesource.com/69361
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-11-09 18:20:14 +00:00
Ben Wagner
31366872a5 Guard VFPv3 ASM with an ifdef.
Change-Id: Id31de8dc0d9d68369896f2686068b29e07135a39
Reviewed-on: https://skia-review.googlesource.com/68641
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-11-09 17:46:44 +00:00
Mike Reed
0d8766c84c Remove MakeForLocalSpace since picture image is sufficient
Bug: skia:
Change-Id: If38e702c418e93141311490edf447d1f09ed4434
Reviewed-on: https://skia-review.googlesource.com/68640
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2017-11-09 16:49:44 +00:00
Robert Phillips
f8e2502819 Prepare to enable explicit gpu resource allocation (take 2)
Change-Id: I3fd78d53e8bea84c0217b9fe6e180eaa9e4ac753
Reviewed-on: https://skia-review.googlesource.com/68920
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-11-08 21:00:37 +00:00
Greg Daniel
065b41dd90 Revert "Prepare to enable explicit gpu resource allocation"
This reverts commit f290376736.

Reason for revert: Changed generated effect instead of FP

Original change's description:
> Prepare to enable explicit gpu resource allocation
> 
> Change-Id: I407e45711c61831febbac3d3d3a88e3fdde92c5f
> Reviewed-on: https://skia-review.googlesource.com/68212
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,robertphillips@google.com

Change-Id: I949500d94c7461b7cf38d615117cfcdc9a791780
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/68900
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-11-08 19:58:58 +00:00
Robert Phillips
f290376736 Prepare to enable explicit gpu resource allocation
Change-Id: I407e45711c61831febbac3d3d3a88e3fdde92c5f
Reviewed-on: https://skia-review.googlesource.com/68212
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-11-08 19:06:17 +00:00
Cary Clark
df429f3bea move parts of SkPoint to SkPointPriv
Move specialized SkPoint methods to SkPointPriv.
Use constexpr and inline initialization where possible.

R=reed@google.com,bsalomon@google.com
Bug: skia: 6898
Change-Id: I01ec5186f010f2dc80c068c70d9cc352f3221338
Reviewed-on: https://skia-review.googlesource.com/68700
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2017-11-08 18:25:17 +00:00
Mike Reed
12f77343ee add surfaceprops param to SkCanvas::MakeRasterDirect
Bug: skia:
Change-Id: I8b69280469cdf34c3c3cb126db9457a712143f88
Reviewed-on: https://skia-review.googlesource.com/68701
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-11-08 16:40:47 +00:00
Brian Salomon
821ef188b3 Allow mock GrContexts to "support" shader derivatives
Change-Id: I0d8dce5e0873a058b59baae9c35903b2444a76fd
Reviewed-on: https://skia-review.googlesource.com/68480
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-11-08 12:46:26 +00:00
Brian Salomon
af59748114 Add GrContextOptions to control distance field thresholds for small sizes and fallback to paths.
Change-Id: Ib57c40b1b50c5afe079b2099d1a83986629ea287
Reviewed-on: https://skia-review.googlesource.com/68217
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-11-08 01:34:06 +00:00
Brian Osman
63bc48d093 Add MakeCrossContextFromPixmap
This operates just like MakeCrossContextFromEncoded, but starting from
raster data. This version is defensive (always uses copies if a raster
image needs to be made).

Bug: skia:
Change-Id: Ibc2b9a235c89a41fbbfd022d943f15ac212d0677
Reviewed-on: https://skia-review.googlesource.com/68205
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-11-07 15:59:38 +00:00
Cary Clark
74f623d161 make point array methods private
Moved method are not used by chromium, google3,
or android.

SkPoint::setRectIFan isn't used or tested at all.

SkPoint::setRectFan and SkPoint::setRectTriStrip
are only used internally.

These routines pretend that a SkPoint is part
of an array of points. Since that's kind of an
odd contract to make public, and because they
aren't used outside of Skia, relegate them to
a priv file.

R=bsalomon@google.com,reed@google.com
Bug: skia: 6898
Change-Id: I5ec2eb47799f6fd4b2994da962b1fa69ce659931
Reviewed-on: https://skia-review.googlesource.com/68121
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2017-11-07 13:10:38 +00:00
Chris Dalton
fddb6c0399 Setup CCPR testing with GrMockContext
Beefs up the mock context to be able to support CCPR, sets up a
framework for testing CCPR with the mock context, and adds a new test.

Bug: skia:
Change-Id: If95f92726f7b1a7f52ad04ca8126551f58ea8032
Reviewed-on: https://skia-review.googlesource.com/67980
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-11-06 20:44:19 +00:00
Chris Dalton
e4aa0c4207 Disable CCPR while we sort out clipping
The current usage of CCPR by clipping code is suboptimal. This is
causing regressions on the bots and projects like Flutter that make
heavy use of clipPath. Disabling CCPR while we fix it up.

Bug: skia:7190
Bug: flutter:12839
Change-Id: I03af5249b53cf2eab5a13d85a5f87708030c8666
Reviewed-on: https://skia-review.googlesource.com/67920
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-11-06 16:40:39 +00:00
Brian Salomon
9f545bc18a Modify fontcache GM to actually spill atlas.
Adds an option to GrDrawOpAtlas to disable multitexturing.

Adds option to GrContextOptions to disable multitexturing for glyph atlases.


Change-Id: If413ab7061538fa0e75628d252be4fd14215b6ba
Reviewed-on: https://skia-review.googlesource.com/67802
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-11-06 16:06:09 +00:00
Leon Scroggins III
0cbc10f94e Make SkImageGeneratorCG apply encoded origin
SkImageGeneratorCG:
- Detect the origin and apply it to the output
- Deprecate NewFromEncodedCG and add MakeFromEncodedCG

SkCodecImageGenerator:
- Move code elsewhere for sharing
- Apply origin for incomplete decodes

SkPixmap.cpp/SkPixmapPriv.h:
- Now has the shared code for generators to apply origin

DMSrcSink.cpp:
- Call MakeFromEncodedCG

SkCGUtils.h:
- Add a version of SkCopyPixelsFromCGImage that takes an SkPixmap

Bug: skia:7138
Bug: skia:3834
Change-Id: Ic6dbc76360c6a84913b67373582f328d3946d637
Reviewed-on: https://skia-review.googlesource.com/63740
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-11-03 15:29:34 +00:00
Cary Clark
60aaeb2b55 create imagepriv and name params
Named all parameters and made the names consistent
for documentation.

Moved SK_IMAGEFILTER_UNFLATTEN_COMMON to private file.

TBR=reed@google.com
Bug: skia:6898
Change-Id: I1343d2b16d4217088fa3bc9c40f1f4177fa32740
Reviewed-on: https://skia-review.googlesource.com/66521
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
2017-11-03 13:56:30 +00:00
Jim Van Verth
6a40abc8c7 Revert "Implement window rectangles in vulkan"
This reverts commit 94c0468b2b.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Implement window rectangles in vulkan
> 
> Bug: skia:
> Change-Id: I32c079b90a5503c797dfc073a093f940cd8c550a
> Reviewed-on: https://skia-review.googlesource.com/65423
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=egdaniel@google.com,bsalomon@google.com,csmartdalton@google.com

Change-Id: I5a90cb57fb5d4bcf8c7e76a5f71a7f16edbaf6be
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/67060
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2017-11-02 16:56:19 +00:00
Mike Reed
88ea5b9c66 add client-context to SkWriteBuffer
Bug: skia:
Change-Id: I56c36060442c4008b09f322fb1d19e81cd75f910
Reviewed-on: https://skia-review.googlesource.com/66860
Reviewed-by: Khusal Sagar <khushalsagar@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-11-02 16:39:51 +00:00
Chris Dalton
94c0468b2b Implement window rectangles in vulkan
Bug: skia:
Change-Id: I32c079b90a5503c797dfc073a093f940cd8c550a
Reviewed-on: https://skia-review.googlesource.com/65423
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-11-02 15:27:21 +00:00
Ethan Nicholas
d1b2eec0d0 API to cache shader binaries between runs of Skia.
This CL does not include an actual implementation of said cache.
Stan is working on the cache implementation on the Android side of
things.

Bug: skia:
Change-Id: Iabe4f19b2dbacaaa1ead8bb3fa68d88c687b9a84
Reviewed-on: https://skia-review.googlesource.com/54780
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-11-02 13:07:41 +00:00
Brian Osman
61b43daa85 Plumb internal helper to enable more GPU GMs w/SkColorSpaceXformCanvas
API change isn't really public.

TBR:bsalomon@google.com
Bug: skia:
Change-Id: I3a1ae5d7ddb562387e8b8e1248b347704f88037b
Reviewed-on: https://skia-review.googlesource.com/66144
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-11-01 15:16:30 +00:00
Robert Phillips
a097173bb1 Add a GM to test out odd matrix draws (take 2)
TBR=bsalomon@google.com
Bug: skia:7075
Change-Id: I87efa058916fe0305b57eb4dd14b479e8a8d2c6d
Reviewed-on: https://skia-review.googlesource.com/65507
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-10-31 16:58:05 +00:00
Robert Phillips
9d15b07dc4 Revert "Add a GM to test out odd matrix draws"
This reverts commit 761f44853f.

Reason for revert: preabandonContext failures

Original change's description:
> Add a GM to test out odd matrix draws
> 
> Bug: skia:7075
> Change-Id: I90c15bf019161abc5dab78e0af20ef15ff1395d9
> Reviewed-on: https://skia-review.googlesource.com/64761
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,robertphillips@google.com

Change-Id: I9ecb2e2dcd74685e2c707c04bb52279e1d5cc55c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7075
Reviewed-on: https://skia-review.googlesource.com/65740
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-10-31 16:13:55 +00:00
Brian Osman
f06ead925c Add support for transfer functions to GrColorSpaceXform
With this change, untagged sources (eg N32) are treated as
sRGB data, which causes a huge number of GMs to render more
correctly in GPU sRGB/F16/etc... configs. Also, because the
sources are treated as having a color space, we actually do
gamut conversion for wide or narrow gamut outputs.

This change also applies the transfer function math to
individual colors in the case of gradient stops and color
shaders. (The CPU backend doesn't do this yet, but I think
we've decided there's no reason not to support it).

Bug: skia:
Change-Id: If76e9e4a268f9f74110ff4bbe4fe189ba5d19d9f
Reviewed-on: https://skia-review.googlesource.com/64100
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-10-31 14:55:14 +00:00
Robert Phillips
761f44853f Add a GM to test out odd matrix draws
Bug: skia:7075
Change-Id: I90c15bf019161abc5dab78e0af20ef15ff1395d9
Reviewed-on: https://skia-review.googlesource.com/64761
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-10-31 14:51:14 +00:00
Greg Daniel
45d6303f6e Have mip status match surface when snapping image from wrapped object
Also fixes some bugs involved with creating mipped SkSurfaces.

Bug: skia:
Change-Id: I6e0109000eadd2bdee4a907d3ee2231104528165
Reviewed-on: https://skia-review.googlesource.com/65063
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-10-30 20:06:53 +00:00
Greg Daniel
65c7f662ba Add mip support to GrAHardwareBufferImageGenerator
Bug: skia:
Change-Id: I482d8f9937c86ed441016afef2d8f924282dd17a
Reviewed-on: https://skia-review.googlesource.com/63861
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-10-30 19:18:03 +00:00
Cary Clark
cc309eb9b1 generated include refresh
The latest, minor changes on includes already
generated, plus four new ones.

TBR=reed@google.com
Bug: skia:6898
Change-Id: If06ae9b9aaa3a0a9fae570aa7a6698ff340c43b8
Reviewed-on: https://skia-review.googlesource.com/62862
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2017-10-30 16:30:49 +00:00
Mike Reed
6566b97b76 add Type enum to SkColorSpace
Bug: 727128
Change-Id: I116de4efd6e64504a4e1892f431f528533b1173a
Reviewed-on: https://skia-review.googlesource.com/64261
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2017-10-27 14:59:02 +00:00
Brian Salomon
4cbb6e6d55 Pass GrRenderTargetContext's GrColorSpaceInfo to SkShader and SkColorFilter.
Also to SkColorTo(Premul|Unpremul)GrColor4f.

This can avoid cache lookups to find GrColorSpaceXforms as the xform pointer is stored in GrColorSpaceInfo after the first lookup.

Also uses GrColorSpaceInfo to construct GrTextUtils::Paint.

Bug: skia:
Change-Id: Idf19d512a60d2269e6921c7fb54d93aee499a70d
Reviewed-on: https://skia-review.googlesource.com/63660
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-10-25 19:32:20 +00:00
Chris Dalton
a045eea29e CCPR: use 16-bit ints for the atlas offset attrib
Bug: skia:
Change-Id: I053e8416ced317b6ebc46cc8189840d60c7f91e8
Reviewed-on: https://skia-review.googlesource.com/62060
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2017-10-25 15:44:05 +00:00
Chris Dalton
51ebd6615f Add vector GrSLTypes for shorts
Bug: skia:
Change-Id: I686950df9f5470b4885823471957c3859cc692ea
Reviewed-on: https://skia-review.googlesource.com/63441
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-10-25 00:05:05 +00:00
Chris Dalton
6dd0d8a265 Revert "Add vector GrSLTypes for shorts"
This reverts commit af37a53a84.

Reason for revert: Compiler errors

Original change's description:
> Add vector GrSLTypes for shorts
> 
> Bug: skia:
> Change-Id: Icb9eb1fcb0f879cd0bfdd27d06459843361c9947
> Reviewed-on: https://skia-review.googlesource.com/62943
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

TBR=egdaniel@google.com,csmartdalton@google.com,ethannicholas@google.com

Change-Id: Ib23b28be92e199459fe1666fb1ec0e46e141a8f7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/63460
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-10-24 19:53:23 +00:00
Chris Dalton
af37a53a84 Add vector GrSLTypes for shorts
Bug: skia:
Change-Id: Icb9eb1fcb0f879cd0bfdd27d06459843361c9947
Reviewed-on: https://skia-review.googlesource.com/62943
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-10-24 19:18:32 +00:00
Greg Daniel
e252f08982 Add hint to SkSurface::MakeRenderTarget that we will use mips
Additionally this changed triggered a cascade of plumbing GrMipMapped
down throughout Ganesh.

Bug: skia:
Change-Id: I4181f44d9046d66139bb491c7abf86703305aaeb
Reviewed-on: https://skia-review.googlesource.com/63000
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-10-23 20:25:59 +00:00
Cary Clark
6d6d603c81 make matrix serialization private
Moves readFromMemory, writeToMemory to private section.
No sign that these are called from google3, android,
chromium, but function names are common enough that
it's hard to know for sure.

These are used inside templates internally and for
testing, so it is not quite as simple as adding alternate
entry points in SkMatrixPriv.

R=reed@google.com
Bug: skia:6898
Change-Id: I1fac142f4bf0f38608ea93438c46f39147606c4d
Reviewed-on: https://skia-review.googlesource.com/62361
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2017-10-20 16:49:57 +00:00
Cary Clark
9480d822f2 make skmatrix getmapproc private
Make SkMatrix MapXYProc MapPtsProc and friends private.
Code search turned up no clients in chromium, google3,
android. Fingers crossed.

R:reed@google.com
Bug: skia:6898
Change-Id: Iee20fe5150499215a09f67cc6f117b685f38f455
Reviewed-on: https://skia-review.googlesource.com/62140
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2017-10-20 15:14:05 +00:00
Florin Malita
5f379a8b11 Avoid 2PtConical gradient flipping
Currently, when startRadius > endRadius conical gradients are inverting their data
(start/end points and radii, colors and positions) to guarantee r0 < r1 at raster time.

But the radii ordering is only mildly interesting to the impl: it controls which of the
two quadratic solutions we select for the inside case, but doesn't fundamentally change
the algorithm.

Furthermore, for the "outside" case, inverting the order is already inconvenient and
needs to be taken into account (both CPU/GPU impls are already tracking this bit of
info).

Instead of transforming the gradient definition, we can detect the inverted case and
adjust the quadratic solution selector.

In practice this means:

  * |edge|    case - no change, the equation is linear
  * |inside|  case - select the smaller root instead of largest
  * |outside| case - [gpu-only] invert the clamp/limiting function

Change-Id: Ie3106464e39a4dd3848dc43671d973f7e1958e63
Reviewed-on: https://skia-review.googlesource.com/61660
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-10-19 19:18:54 +00:00
Ben Wagner
7a0248f738 Compute inverse gamma table at compile time.
This introduces skstd::index_sequence and skstd::make_index_sequence so
that these can be used in C++11. These are mostly equivalent to their
std:: counterparts. This also introduces SkMakeArray<N, C>
which is constexpr and creates a std::array with N elements with each
element being initialized with the value of C(i) where i is the index of
the element.

These are then used to create inverse gamma table at compile time. This
avoids threading issues.

BUG=skia:7187

Change-Id: I61fb10a778898652e546d54c104a08d6e6bf88d3
Reviewed-on: https://skia-review.googlesource.com/61380
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-10-18 19:43:18 +00:00
Leon Scroggins III
b6ab10f34b Move SkCodec::Origin into its own file
It is now used by SkPixmap and will soon be in SkJpegEncoder. No need
for those to depend on SkCodec.

Bug: 768878
TBR=reed@google.com
(reed@ already approved the API change in
https://skia-review.googlesource.com/60721)
Change-Id: If1a6e1d5b60a7a3d8c97818e15a48d28ba804668
Reviewed-on: https://skia-review.googlesource.com/61680
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-10-18 19:08:16 +00:00
Ben Wagner
021e5c7016 Revert "Add an Option for orientation on JPEG encodes"
This reverts commit 5411a60e0d.

Reason for revert: ASAN and Coverage failing: https://chromium-swarm.appspot.com/task?id=394978f3b7d44610
Flutter_Android failing.

Original change's description:
> Add an Option for orientation on JPEG encodes
> 
> Move Origin to its own header so that SkPixmap and SkJpegEncoder need
> not depend on SkCodec.
> 
> Add libexif, which is already used by Android, and use it to write the
> orientation. Write a makefile based on the Android.bp in Android, minus
> warnings. (libexif has an LGPL license.)
> 
> Add a test that verifies all the orientations work.
> 
> Optionally enable writing the orientation (and therefore including
> libexif). Chromium does not currently need it, and Android does not
> expose an API that would allow using it. Disable on Windows, where we
> still have build errors to fix.
> 
> Bug: skia:7138
> Change-Id: Iaeff44c36aebe0e639666979dc00e1b7594bbeb1
> Reviewed-on: https://skia-review.googlesource.com/60721
> Commit-Queue: Leon Scroggins <scroggo@google.com>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Mike Reed <reed@google.com>

TBR=mtklein@chromium.org,mtklein@google.com,scroggo@google.com,reed@google.com

Change-Id: I05b7ae8d1c5bbd1de1642d9ef024943500256273
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7138
Reviewed-on: https://skia-review.googlesource.com/61620
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
2017-10-18 18:09:47 +00:00
Leon Scroggins III
5411a60e0d Add an Option for orientation on JPEG encodes
Move Origin to its own header so that SkPixmap and SkJpegEncoder need
not depend on SkCodec.

Add libexif, which is already used by Android, and use it to write the
orientation. Write a makefile based on the Android.bp in Android, minus
warnings. (libexif has an LGPL license.)

Add a test that verifies all the orientations work.

Optionally enable writing the orientation (and therefore including
libexif). Chromium does not currently need it, and Android does not
expose an API that would allow using it. Disable on Windows, where we
still have build errors to fix.

Bug: skia:7138
Change-Id: Iaeff44c36aebe0e639666979dc00e1b7594bbeb1
Reviewed-on: https://skia-review.googlesource.com/60721
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
2017-10-18 17:38:15 +00:00
Cary Clark
e4442cb0b5 convert mapHomogeneousPoints to SkPoint3
SkMatrix::mapHomogeneousPoints takes an array of SkScalar,
but expects essentially SkPoint3, so make it so.


R: robertphillips@google.com, reed@google.com
Bug: skia:6898
Change-Id: Ibaf8b05c08b7df16c67d6a77d914667ace9a70da
Reviewed-on: https://skia-review.googlesource.com/58380
Commit-Queue: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-10-18 16:09:46 +00:00
Brian Salomon
43f8bf0f78 Move clear-as-draw workaround to GrGLGpu and expose via GrContextOptions.
Bug: skia:7154
Change-Id: I23ffc11dab4a377fbd6b7e4e33722b3fa0793d58
Reviewed-on: https://skia-review.googlesource.com/60681
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-10-18 12:55:06 +00:00
Brian Salomon
57caa660c0 Revert "Revert "Make GPU backend triangulate rects such that they are rendered as tri strips rather than tri fans.""
This reverts commit 62563deb6b.

Reason for revert: change that affected similar set of GMs reverted, relanding now that this is more easily triagable.

Original change's description:
> Revert "Make GPU backend triangulate rects such that they are rendered as tri strips rather than tri fans."
> 
> This reverts commit fa2d604a7d.
> 
> Reason for revert: <INSERT REASONING HERE>
> 
> Original change's description:
> > Make GPU backend triangulate rects such that they are rendered as tri strips rather than tri fans.
> > 
> > Right now when we turn rects into quads we use a vertex order compatible with a tri fan rather than a tri strip.
> > 
> > I wanted it to be the case that the same code could be used to generate a non-indexed mesh for a single rect or indexed using the quad index buffer when batching. Triangle fanning is not available in all APIS (e.g. is emulated in ANGLE and not supported in Metal) so it seems better to use a triangle strip over a fan in the single rect case.
> > 
> > 
> > Change-Id: I31eebd794e7328f4b39e3ec3377bf2ec556360ca
> > Reviewed-on: https://skia-review.googlesource.com/60081
> > Commit-Queue: Brian Salomon <bsalomon@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> 
> TBR=bsalomon@google.com,robertphillips@google.com
> 
> Change-Id: I7c4c23aa418da09c9708b28cce64ab58e282dd3a
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/60683
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,robertphillips@google.com

Change-Id: Iefcd16676a7617d32e89fc84206cd4e88e9a06e1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/61160
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-10-18 12:21:17 +00:00
Ben Wagner
d71c6d1994 Make SkTFitsIn and SkTo constexpr.
Because what can be better than marking things that can be constexpr as
constexpr. Also, I have a change where this would be nice to have.

Change-Id: Ie313b19d1930b98ddcd60cc17a320971625f18e3
Reviewed-on: https://skia-review.googlesource.com/60862
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-10-17 22:48:51 +00:00
Brian Salomon
62563deb6b Revert "Make GPU backend triangulate rects such that they are rendered as tri strips rather than tri fans."
This reverts commit fa2d604a7d.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Make GPU backend triangulate rects such that they are rendered as tri strips rather than tri fans.
> 
> Right now when we turn rects into quads we use a vertex order compatible with a tri fan rather than a tri strip.
> 
> I wanted it to be the case that the same code could be used to generate a non-indexed mesh for a single rect or indexed using the quad index buffer when batching. Triangle fanning is not available in all APIS (e.g. is emulated in ANGLE and not supported in Metal) so it seems better to use a triangle strip over a fan in the single rect case.
> 
> 
> Change-Id: I31eebd794e7328f4b39e3ec3377bf2ec556360ca
> Reviewed-on: https://skia-review.googlesource.com/60081
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

TBR=bsalomon@google.com,robertphillips@google.com

Change-Id: I7c4c23aa418da09c9708b28cce64ab58e282dd3a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/60683
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-10-17 19:14:15 +00:00
Chris Dalton
a2ac30da36 Enable CCPR for volatile paths
Enables for volatile paths and when path mask caching is disabled.

Bug: skia:
Change-Id: I644b17f2a4f77a4ddf85265f520599499c0800cf
Reviewed-on: https://skia-review.googlesource.com/60481
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-10-17 18:48:42 +00:00
Mike Reed
4379869461 Revert[4] "apply codec origin in generator"
This reverts commit dd340146f1.

Reason for revert: ios gn file fixed

Original change's description:
> Revert "Revert "Revert "apply codec origin in generator"""
> 
> This reverts commit 82269abfec.
> 
> Reason for revert: ios build needs include path for SkCodec.h
> 
> Original change's description:
> > Revert "Revert "apply codec origin in generator""
> > 
> > This reverts commit 363dd988a5.
> > 
> > Reason for revert: pdfium fix landed
> > 
> > Original change's description:
> > > Revert "apply codec origin in generator"
> > > 
> > > This reverts commit fa15877f48.
> > > 
> > > Reason for revert: Appears to break PDFium.
> > > 
> > > Original change's description:
> > > > apply codec origin in generator
> > > > 
> > > > Bug: skia:
> > > > Change-Id: I383dacb49b1e3c88467ccdbf3288764bb1bbf01a
> > > > Reviewed-on: https://skia-review.googlesource.com/58600
> > > > Reviewed-by: Leon Scroggins <scroggo@google.com>
> > > > Commit-Queue: Mike Reed <reed@google.com>
> > > 
> > > TBR=scroggo@google.com,reed@google.com
> > > 
> > > Change-Id: Id97137d6ec39ca638c941928bae6510814b1c499
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Bug: skia:
> > > Reviewed-on: https://skia-review.googlesource.com/60041
> > > Reviewed-by: Ben Wagner <benjaminwagner@google.com>
> > > Commit-Queue: Ben Wagner <benjaminwagner@google.com>
> > 
> > TBR=benjaminwagner@google.com,scroggo@google.com,reed@google.com
> > 
> > Change-Id: I1b54a6e6e6cbda07f346ffbbc4977f9db705abcd
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: skia:
> > Reviewed-on: https://skia-review.googlesource.com/60320
> > Reviewed-by: Mike Reed <reed@google.com>
> > Commit-Queue: Mike Reed <reed@google.com>
> 
> TBR=benjaminwagner@google.com,scroggo@google.com,reed@google.com
> 
> Change-Id: I4c2d310521d1a678b407d30b9fe3c261c49d67bc
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/60560
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=benjaminwagner@google.com,scroggo@google.com,reed@google.com

Change-Id: I5c1e53aff3ad174b0d4a806c35b7cdcd194479d7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/60563
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-10-17 18:04:43 +00:00
Brian Salomon
fa2d604a7d Make GPU backend triangulate rects such that they are rendered as tri strips rather than tri fans.
Right now when we turn rects into quads we use a vertex order compatible with a tri fan rather than a tri strip.

I wanted it to be the case that the same code could be used to generate a non-indexed mesh for a single rect or indexed using the quad index buffer when batching. Triangle fanning is not available in all APIS (e.g. is emulated in ANGLE and not supported in Metal) so it seems better to use a triangle strip over a fan in the single rect case.


Change-Id: I31eebd794e7328f4b39e3ec3377bf2ec556360ca
Reviewed-on: https://skia-review.googlesource.com/60081
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-10-17 17:30:12 +00:00
Mike Reed
dd340146f1 Revert "Revert "Revert "apply codec origin in generator"""
This reverts commit 82269abfec.

Reason for revert: ios build needs include path for SkCodec.h

Original change's description:
> Revert "Revert "apply codec origin in generator""
> 
> This reverts commit 363dd988a5.
> 
> Reason for revert: pdfium fix landed
> 
> Original change's description:
> > Revert "apply codec origin in generator"
> > 
> > This reverts commit fa15877f48.
> > 
> > Reason for revert: Appears to break PDFium.
> > 
> > Original change's description:
> > > apply codec origin in generator
> > > 
> > > Bug: skia:
> > > Change-Id: I383dacb49b1e3c88467ccdbf3288764bb1bbf01a
> > > Reviewed-on: https://skia-review.googlesource.com/58600
> > > Reviewed-by: Leon Scroggins <scroggo@google.com>
> > > Commit-Queue: Mike Reed <reed@google.com>
> > 
> > TBR=scroggo@google.com,reed@google.com
> > 
> > Change-Id: Id97137d6ec39ca638c941928bae6510814b1c499
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: skia:
> > Reviewed-on: https://skia-review.googlesource.com/60041
> > Reviewed-by: Ben Wagner <benjaminwagner@google.com>
> > Commit-Queue: Ben Wagner <benjaminwagner@google.com>
> 
> TBR=benjaminwagner@google.com,scroggo@google.com,reed@google.com
> 
> Change-Id: I1b54a6e6e6cbda07f346ffbbc4977f9db705abcd
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/60320
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=benjaminwagner@google.com,scroggo@google.com,reed@google.com

Change-Id: I4c2d310521d1a678b407d30b9fe3c261c49d67bc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/60560
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-10-17 14:29:43 +00:00
Mike Reed
82269abfec Revert "Revert "apply codec origin in generator""
This reverts commit 363dd988a5.

Reason for revert: pdfium fix landed

Original change's description:
> Revert "apply codec origin in generator"
> 
> This reverts commit fa15877f48.
> 
> Reason for revert: Appears to break PDFium.
> 
> Original change's description:
> > apply codec origin in generator
> > 
> > Bug: skia:
> > Change-Id: I383dacb49b1e3c88467ccdbf3288764bb1bbf01a
> > Reviewed-on: https://skia-review.googlesource.com/58600
> > Reviewed-by: Leon Scroggins <scroggo@google.com>
> > Commit-Queue: Mike Reed <reed@google.com>
> 
> TBR=scroggo@google.com,reed@google.com
> 
> Change-Id: Id97137d6ec39ca638c941928bae6510814b1c499
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/60041
> Reviewed-by: Ben Wagner <benjaminwagner@google.com>
> Commit-Queue: Ben Wagner <benjaminwagner@google.com>

TBR=benjaminwagner@google.com,scroggo@google.com,reed@google.com

Change-Id: I1b54a6e6e6cbda07f346ffbbc4977f9db705abcd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/60320
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-10-16 18:57:02 +00:00
Ben Wagner
363dd988a5 Revert "apply codec origin in generator"
This reverts commit fa15877f48.

Reason for revert: Appears to break PDFium.

Original change's description:
> apply codec origin in generator
> 
> Bug: skia:
> Change-Id: I383dacb49b1e3c88467ccdbf3288764bb1bbf01a
> Reviewed-on: https://skia-review.googlesource.com/58600
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=scroggo@google.com,reed@google.com

Change-Id: Id97137d6ec39ca638c941928bae6510814b1c499
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/60041
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
2017-10-16 18:07:42 +00:00
Mike Reed
fa15877f48 apply codec origin in generator
Bug: skia:
Change-Id: I383dacb49b1e3c88467ccdbf3288764bb1bbf01a
Reviewed-on: https://skia-review.googlesource.com/58600
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-10-16 17:33:22 +00:00
Derek Sollenberger
1bd76c468c Cleanup references to AHardwareBuffer to match NDK declarations.
Change-Id: Iaf796be04a5ac04873d420960238ea06294518f7
Reviewed-on: https://skia-review.googlesource.com/60240
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2017-10-16 17:17:11 +00:00
Cary Clark
71ff4b94e5 remove unused SkMatrix setIDiv
Unused setIDiv, untested internally.
Unused by google3, android, chromium.

R: reed@google.com
Bug: skia: 6898
Change-Id: I57101b147272ed198746afc298cc0f5a6434abe0
Reviewed-on: https://skia-review.googlesource.com/59960
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-10-16 14:30:44 +00:00
Ben Wagner
d40b3b0af1 Make SkTypeface::Style and FromOldStyle private.
These are no longer used outside of Skia, so make them private.

Change-Id: I735bb39c10553885cc6051aebddeff150ba4caa9
Reviewed-on: https://skia-review.googlesource.com/59180
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-10-13 15:49:18 +00:00
Mike Reed
3bd0fece5f remove dead code for getSize, getSafeSize, etc.
Bug: skia:
Change-Id: I7dcdfaa539040b95e5b62174ccd22a94212980e0
Reviewed-on: https://skia-review.googlesource.com/59442
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-10-13 14:03:07 +00:00
Mike Reed
f0cb7a09ab Revert "move SkMatrix anonymous affine enum to private"
This reverts commit 708ec81d7a.

Reason for revert: broke android

frameworks/base/core/jni/android/graphics/pdf/PdfEditor.cpp
frameworks/base/core/jni/android/graphics/pdf/PdfEditor.cpp:153:54: error: no member named 'kAScaleX' in 'SkMatrix'; did you mean 'kMScaleX'?
    FS_MATRIX transform = {transformValues[SkMatrix::kAScaleX], transformValues[SkMatrix::kASkewY],
                                           ~~~~~~~~~~^~~~~~~~


Original change's description:
> move SkMatrix anonymous affine enum to private
> 
> enum members aren't used by SkMatrix.h or by
> clients outside of Skia.
> 
> R: reed@google.com, bungeman@google.com
> Bug: skia:6898
> Change-Id: I6873b4106e5ffe354caf5ec18cc613910304fa13
> Reviewed-on: https://skia-review.googlesource.com/59160
> Reviewed-by: Mike Reed <reed@google.com>
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Cary Clark <caryclark@skia.org>

TBR=bungeman@google.com,reed@google.com,caryclark@skia.org

Change-Id: I7fe80879e8b851c9036fc910a314129c299d82d2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:6898
Reviewed-on: https://skia-review.googlesource.com/59460
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-10-13 13:26:08 +00:00
Eric Karl
914a36b248 MakeBackendTextureFromSkImage
Creates a static function on SkImage which converts the SkImage to a
GrBackendTexture. The texture is unowned by Skia, and must be deleted
by the caller. Allows for a no-copy / no-conversion fast path if the
provided image is unowned (unique()) and texture backed.

Change-Id: I8a48f9cc39de792725cd72057d98cd1c4594daab
Reviewed-on: https://skia-review.googlesource.com/52440
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Eric Karl <ericrk@chromium.org>
2017-10-12 20:05:31 +00:00
Cary Clark
708ec81d7a move SkMatrix anonymous affine enum to private
enum members aren't used by SkMatrix.h or by
clients outside of Skia.

R: reed@google.com, bungeman@google.com
Bug: skia:6898
Change-Id: I6873b4106e5ffe354caf5ec18cc613910304fa13
Reviewed-on: https://skia-review.googlesource.com/59160
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Cary Clark <caryclark@skia.org>
2017-10-12 19:56:31 +00:00
Mike Reed
9b64f97776 remove dead flag
no client still defines this

Bug: skia:
Change-Id: If55dade4207108241bbb1e3d6f7515ad12d36acc
Reviewed-on: https://skia-review.googlesource.com/59083
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-10-12 19:23:16 +00:00
Greg Daniel
177e695589 Add flag on GrBackendTexture to say whether texture is mipped or not
Bug: skia:
Change-Id: Ia684e3daf779ec2feaaec64c04dabf5cb03cd07a
Reviewed-on: https://skia-review.googlesource.com/57821
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-10-12 17:02:41 +00:00
Greg Daniel
0fc4d2d269 Use enum to track MipMapsStatus throughout Texture creation
Bug: skia:
Change-Id: I1de1105d74b45f7b02ff52e6b8333801d98ef1ce
Reviewed-on: https://skia-review.googlesource.com/58501
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-10-12 16:12:42 +00:00
Florin Malita
1ba5b6baa8 Plumb more SkPaintFilterCanvas virtuals
SkNWayCanvas cannot support virtuals which imply one-to-one proxying,
but SkPaintFilterCanvas can (and should).

Change-Id: If966aa4ec3fcc79e6355a82cc299fd1877e4cf53
Reviewed-on: https://skia-review.googlesource.com/58842
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-10-12 15:32:11 +00:00
Mike Klein
20d479c088 abort SkRRect::transform() before dst->scaleRadii() asserts
If we've got a crazy matrix, we can make dst arbitrarily crazy.

This should fix several of Kevin's fuzzes, e.g.
Bug: skia:7090

I don't see any uses of SkRRect::transform() that care about
the output rrect in case of failure, so I've just removed the
guarantee that we don't modify it when failing.

Change-Id: I4c81af59a093a984f0a02a0d3dc4bbbb1fb935f2
Reviewed-on: https://skia-review.googlesource.com/58620
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-10-12 15:29:11 +00:00
Heather Miller
298143ebdf Update Skia milestone to 64
Bug: skia:
Change-Id: I381323606f92a5388b3fd76c232e35c492a23dc4
Reviewed-on: https://skia-review.googlesource.com/58840
Reviewed-by: Heather Miller <hcm@google.com>
Commit-Queue: Heather Miller <hcm@google.com>
2017-10-12 14:57:31 +00:00
Stan Iliev
cd975d5aa5 Implement getGrContext in SkPaintFilterCanvas
Implement getGrContext to return the context from the original
canvas.

Bug: b/66988832
Test: Ran Android HWUI on a non overlapping View with alpha,
Change-Id: I44ad48e3257004cc5c45c86529b167139f30621a
which is using SkPaintFilterCanvas to draw.
Reviewed-on: https://skia-review.googlesource.com/58841
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Stan Iliev <stani@google.com>
2017-10-12 14:42:41 +00:00
Brian Salomon
0b4d8aa108 Add benchmark for comparing multitexturing to non-multitexturing image draws.
Allows benchmarks to override GrContextOptions.

Removes the ability to use the same GrContext for all benchmarks in a config.

Change-Id: I5ab9f6e81055451ac912a66537843d1a49f3b479
Reviewed-on: https://skia-review.googlesource.com/34080
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-10-11 20:32:49 +00:00
Greg Daniel
f88c12ea20 Add api for passing mipped hint into ImageGenerator onGenerateTexture
This does not actually add any additional functionality to the generators.
Once this lands I will enable the generators one at a time to more easily
monitor the effects of each one.

Bug: skia:
Change-Id: I382a1acfaebcbf9ad44c9873b87cdbbe02a13602
Reviewed-on: https://skia-review.googlesource.com/57083
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-10-11 17:11:07 +00:00
Mike Reed
3758c755d4 remove dead code for returning 0 on overflow
Bug: skia:
Change-Id: I6e7aae1b09cf3a1c9728bdaaa4dbf4df4b2ec16d
Reviewed-on: https://skia-review.googlesource.com/58341
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-10-11 15:54:37 +00:00
Mike Reed
4815db5938 removed dead code behind legacy fontmgr api flag
Bug: skia:
Change-Id: I7766b10947df384b0e94a32642d5b4321f2e53bd
Reviewed-on: https://skia-review.googlesource.com/58241
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-10-11 15:18:57 +00:00
Mike Reed
e07622386b clone saturating cast code for doubles
Bug: skia:
Change-Id: I4f35413995cf73c6f130476d6b36e530120aa7ed
Reviewed-on: https://skia-review.googlesource.com/57901
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-10-10 19:58:13 +00:00
Greg Daniel
834f12076f Set correct mip map status on GrTexture since we no longer require all mip data
Bug: skia:
Change-Id: I5074028f307187eef3201523cbd1ddc7d9bf9013
Reviewed-on: https://skia-review.googlesource.com/54102
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-10-10 16:45:43 +00:00
Robert Phillips
a108c92ae5 Fix drawSpecialImage
W/o this fix the strict constraint on the specialImage draws can sometimes be removed. This CL ensures that the temporary SkImage always has the actual dimensions of the special Image.

Note: the replacement of full screen clears w/ draws revealed this bug b.c. the image filters were only drawing a rect for the content area of the special images. Thus when the final DAG result was drawn to the canvas some of the bleed through (from the removal of the strict constraint) was showing.

Bug: 755871, 768134
skbug.com/7122

Change-Id: Id67b7143225c24b716e260c973f3bbf68f20188a
Reviewed-on: https://skia-review.googlesource.com/57660
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-10-10 15:41:42 +00:00
Ben Wagner
1c35e571c3 Revert "Revert "Fix a couple float-cast-overflow in SkScan*.""
This reverts commit b6abb9b4e0.

Reason for revert: It doesn't make sense that this CL would affect the tests implicated in the perf regression in skia:7143, and the revert had no effect on the perf of those tests. Seems like the perf alert was either noise or due to a different CL.

Original change's description:
> Revert "Fix a couple float-cast-overflow in SkScan*."
> 
> This reverts commit 3cd0bef0fd.
> 
> Reason for revert: https://bugs.chromium.org/p/skia/issues/detail?id=7143
> 
> Original change's description:
> > Fix a couple float-cast-overflow in SkScan*.
> > 
> > Bug: skia:5060
> > Change-Id: I60a48993c77631aaad9354bb86b13204dc618bf4
> > Reviewed-on: https://skia-review.googlesource.com/47422
> > Commit-Queue: Ben Wagner <benjaminwagner@google.com>
> > Reviewed-by: Mike Reed <reed@google.com>
> 
> TBR=benjaminwagner@google.com,reed@google.com
> 
> # Not skipping CQ checks because original CL landed > 1 day ago.
> 
> Bug: skia:7143
> Change-Id: I0f19720a7d8344789a375bbb6b9e28bf4f4e55ae
> Reviewed-on: https://skia-review.googlesource.com/57240
> Commit-Queue: Ben Wagner <benjaminwagner@google.com>
> Reviewed-by: Ben Wagner <benjaminwagner@google.com>

TBR=benjaminwagner@google.com,reed@google.com

Change-Id: I29ac47d6665e2e52ee2a6500488dc407c8d2af1c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7143
Reviewed-on: https://skia-review.googlesource.com/57440
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
2017-10-09 22:59:06 +00:00
Ben Wagner
63fd760a37 Remove trailing whitespace.
Also adds a presubmit to prevent adding trailing whitespace to source
code in the future.

Change-Id: I41a4df81487f6f00aa19b188f0cac6a3377efde6
Reviewed-on: https://skia-review.googlesource.com/57380
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-10-09 21:20:34 +00:00
Chris Dalton
4ba211f68f Revert "Enable coverage counting path rendering except on Android framework"
This reverts commit 196efbf71c.

Reason for revert: 1k SKPs GPU bot fails, perf regressions to look into.

Original change's description:
> Enable coverage counting path rendering except on Android framework
> 
> Android framework will come after collecting a bit more data.
> 
> Bug: skia:
> Change-Id: I6f4738e457f09c976b8bf282153ca75160a1d91c
> Reviewed-on: https://skia-review.googlesource.com/55563
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,csmartdalton@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: skia:
Change-Id: I3f1a7022414ccec80541772d9912065fa4efd74e
Reviewed-on: https://skia-review.googlesource.com/57300
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-10-09 18:41:44 +00:00
Ben Wagner
b6abb9b4e0 Revert "Fix a couple float-cast-overflow in SkScan*."
This reverts commit 3cd0bef0fd.

Reason for revert: https://bugs.chromium.org/p/skia/issues/detail?id=7143

Original change's description:
> Fix a couple float-cast-overflow in SkScan*.
> 
> Bug: skia:5060
> Change-Id: I60a48993c77631aaad9354bb86b13204dc618bf4
> Reviewed-on: https://skia-review.googlesource.com/47422
> Commit-Queue: Ben Wagner <benjaminwagner@google.com>
> Reviewed-by: Mike Reed <reed@google.com>

TBR=benjaminwagner@google.com,reed@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: skia:7143
Change-Id: I0f19720a7d8344789a375bbb6b9e28bf4f4e55ae
Reviewed-on: https://skia-review.googlesource.com/57240
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
2017-10-09 16:48:04 +00:00
Mike Reed
7281801849 Revert "Revert "change computeByteSize to return max_size_t on overflow""
This reverts commit 384f0a7d66.

Bug: skia:
Change-Id: I392ef5c1a5172181caf81ae270befeba6e778241
Reviewed-on: https://skia-review.googlesource.com/57084
Commit-Queue: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2017-10-09 16:05:34 +00:00
Mike Reed
c5eb97dd88 add helper to check for overflow
pre-CL to aid in changing the convention for when we overflow

Bug: skia:
Change-Id: I1e34a18fefb80187787a1c0c8ed7ee3516744d24
Reviewed-on: https://skia-review.googlesource.com/57103
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-10-09 15:04:34 +00:00
Ben Wagner
67ef5d7640 Remove SkTypeface::Style use in API.
All known callers of SkTypeface::MakeDefault call it with kNormal and
the only users specifying kNormal explicitly are in Skia, so remove the
parameter. There appear to be no users of SkTypeface::MakeFromTypeface,
so remove it. The current alternative is SkFontMgr::matchFaceStyle which
can do a better job anyway.

Change-Id: I89d94c77f9593407b0a319786848a8b823fcbae4
Reviewed-on: https://skia-review.googlesource.com/56762
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-10-09 03:13:33 +00:00
Ben Wagner
3cd0bef0fd Fix a couple float-cast-overflow in SkScan*.
Bug: skia:5060
Change-Id: I60a48993c77631aaad9354bb86b13204dc618bf4
Reviewed-on: https://skia-review.googlesource.com/47422
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-10-07 18:26:51 +00:00
Chris Dalton
196efbf71c Enable coverage counting path rendering except on Android framework
Android framework will come after collecting a bit more data.

Bug: skia:
Change-Id: I6f4738e457f09c976b8bf282153ca75160a1d91c
Reviewed-on: https://skia-review.googlesource.com/55563
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-10-07 07:34:20 +00:00
Mike Reed
384f0a7d66 Revert "change computeByteSize to return max_size_t on overflow"
This reverts commit 2429546272.

Reason for revert: broke running dm on google3

Original change's description:
> change computeByteSize to return max_size_t on overflow
> 
> Bug: skia:7132
> Change-Id: I41045640ee62b2c988a84370ead5034bbccc6daf
> Reviewed-on: https://skia-review.googlesource.com/56620
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=bungeman@google.com,herb@google.com,reed@google.com

Change-Id: I5f58ec37241d2fae3ebdb7a3d6b41f9fd6d3c2ee
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7132
Reviewed-on: https://skia-review.googlesource.com/56880
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-10-06 21:24:10 +00:00
Greg Daniel
e1da1d9a7d Add option to create a deferred render target context with mips
We need this since we have texture generators that draw the base level
but nothing more. Thus we want them to be able to directly draw into
a pre allocated mipped target instead of doing a copy later.

TBR: bsalomon@google.com
Bug: skia:
Change-Id: I1dfae0da7153b21b30fdfa51a7061fc255739a1e
Reviewed-on: https://skia-review.googlesource.com/54100
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-10-06 20:28:00 +00:00
Mike Reed
2429546272 change computeByteSize to return max_size_t on overflow
Bug: skia:7132
Change-Id: I41045640ee62b2c988a84370ead5034bbccc6daf
Reviewed-on: https://skia-review.googlesource.com/56620
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-10-06 19:36:17 +00:00
Chris Dalton
f1b47bb299 Add a cap for geometry shader invocations
Bug: skia:7116
Change-Id: I3cc2ce7b2e5123c9adfd9781b2a5a8553747dfa5
Reviewed-on: https://skia-review.googlesource.com/56000
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-10-06 18:43:06 +00:00
Ben Wagner
eccda1ceca Clean up SkString reference counting a bit.
This reverts commit 01f8e41c13, and then
works around whatever issues were seen on Ubuntu 14 by continuing the
clean up.

Change-Id: I3523b12c83e4efef01a8142c00cde4e3e12189fa
Reviewed-on: https://skia-review.googlesource.com/55761
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-10-05 18:15:44 +00:00
Cary Clark
583dd2bbc0 add constexpr to SkRect, SkIRect Make functions
Also, doing so exposed a couple of unused
variables in tests.

R: bsalomon@google.com
Bug: skia: 6898
Change-Id: I7b065e26a838fe55a1d772bcefaef5325e1baa61
Reviewed-on: https://skia-review.googlesource.com/55680
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
2017-10-05 16:55:34 +00:00
Robert Phillips
01f8e41c13 Revert "Clean up SkString reference counting a bit."
This reverts commit a910c847e9.

Reason for revert: Compilation failure on Ubuntu14 bots

../../../../../work/skia/src/core/SkString.cpp:200:55: error: could not convert ‘{0, {0}, 0}’ from ‘<brace-enclosed initializer list>’ to ‘const SkString::Rec’
 const SkString::Rec SkString::gEmptyRec = { 0, {0}, 0 };

Original change's description:
> Clean up SkString reference counting a bit.
> 
> BUG=skia:7107
> 
> Change-Id: I47072bf31b902c79dbb850179ff6d35940de3e63
> Reviewed-on: https://skia-review.googlesource.com/54720
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>

TBR=mtklein@google.com,bungeman@google.com,reed@google.com

Change-Id: I6ec327511e8e1c1fd7e4c1bd5839c0547d4ab609
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7107
Reviewed-on: https://skia-review.googlesource.com/55640
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-10-05 11:28:35 +00:00
Ben Wagner
a910c847e9 Clean up SkString reference counting a bit.
BUG=skia:7107

Change-Id: I47072bf31b902c79dbb850179ff6d35940de3e63
Reviewed-on: https://skia-review.googlesource.com/54720
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-10-04 21:38:33 +00:00
Cary Clark
490847e209 add missing params
SkBitmap is missing a couple of parameter names.
Parameter names make doxygen easier.

Also qualify hasHardwareMipMap and
setHasHardwareMipMap to Android framework.

R=djsollen@google.com
Bug: skia:6898
Change-Id: I502da35dc5761d73195b6a21dd4310cb001a6924
Reviewed-on: https://skia-review.googlesource.com/55161
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2017-10-04 15:33:23 +00:00
Mike Reed
f0ffb8943b Revert[4] "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap"
This reverts commit 5a2e50edc5.

Bug: skia:
Change-Id: I8d28b5c07d90130e5a1653923740eaf189ecb954
Reviewed-on: https://skia-review.googlesource.com/53900
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-10-03 20:03:35 +00:00
Ben Wagner
af89366cb8 Make SkString reference counting thread/TSAN safe.
BUG=skia:7107

Change-Id: I8ead98f7694faaed8e6f6f29b1fcd88501d36b66
Reviewed-on: https://skia-review.googlesource.com/54400
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-10-03 18:34:35 +00:00
Brian Osman
099fa0fb98 Revert^6 "Make threaded proxy generation MDB-friendly, and defer instantiation"
ANGLE bots were getting lots of corrupted GMs - we set fPreferVRAMUseOverFlushes
to false. In that case, multiple deferred proxies were instantiating to the same
scratch resource. Any proxy that we're going to fill with an ASAP upload needs
to have no pending IO - we hoist all those loads to the front of the flush, so
normal IO tracking doesn't really help.

Bug: skia:
Change-Id: Id36fd8700e522db412a3c992b93c778e2ebb1188
Reviewed-on: https://skia-review.googlesource.com/53940
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-10-02 21:04:08 +00:00
Brian Osman
9b1f4bd176 Revert "Revert "Revert "Revert "Revert "Make threaded proxy generation MDB-friendly, and defer instantiation"""""
This reverts commit fdd2cb52b7.

Reason for revert: ANGLE gold failures

Original change's description:
> Revert "Revert "Revert "Revert "Make threaded proxy generation MDB-friendly, and defer instantiation""""
> 
> This reverts commit 9f8d4d36b5.
> 
> Bug: skia:
> Change-Id: I8d7c1df24d8b13b94404f3d9ba69a1ab55ee00c0
> Reviewed-on: https://skia-review.googlesource.com/52920
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

TBR=egdaniel@google.com,robertphillips@google.com,brianosman@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: skia:
Change-Id: Ie461de167fbd37323cabd4adf064f99204ba4878
Reviewed-on: https://skia-review.googlesource.com/53801
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-10-02 14:00:07 +00:00
Mike Reed
5a2e50edc5 Revert "Revert "Revert "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap"""
This reverts commit cd284c5323.

Reason for revert:

assert fired in SkMallocPixelRef.cpp:61: fatal error: "assert(info.computeByteSize(rowBytes) == info.getSafeSize(rowBytes))"

google3 thinks it was from surface_rowbytes

Original change's description:
> Revert "Revert "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap""
> 
> This reverts commit 809cbedd4b.
> 
> Bug: skia:
> Change-Id: I680d8daeeeeb15526b44c1305d8fb0c6bfa38e1d
> Reviewed-on: https://skia-review.googlesource.com/52665
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>

TBR=fmalita@chromium.org,reed@google.com

Change-Id: I41e3f7a3f791cc8183291847e783ed8a53bc91d2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/53802
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-10-02 13:44:18 +00:00
Mike Reed
cd284c5323 Revert "Revert "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap""
This reverts commit 809cbedd4b.

Bug: skia:
Change-Id: I680d8daeeeeb15526b44c1305d8fb0c6bfa38e1d
Reviewed-on: https://skia-review.googlesource.com/52665
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2017-10-02 12:55:37 +00:00
Chris Dalton
e4679fa06a CCPR: Blacklist Mali GPUs and Vulkan while we work through issues
Bug: skia:
Change-Id: I59dfb1c839a66a6aa6c954e4a544930fc1376a22
Reviewed-on: https://skia-review.googlesource.com/53560
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-09-29 20:25:34 +00:00
Greg Daniel
bb76ace72b Fall back to non mipped Texture when we can't copy base to mipped texture
TBR: bsalomon@google.com
Bug: skia:7094
Change-Id: I9d2ba78c4d4332a22e2357cde0598de51299067d
Reviewed-on: https://skia-review.googlesource.com/53541
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-09-29 20:19:14 +00:00
Jim Van Verth
f57c6de784 Revert "Enable coverage counting path rendering on non-Android"
This reverts commit c739b7260a.

Reason for revert: Turning tree red.
Original change's description:
> Enable coverage counting path rendering on non-Android
> 
> Bug: skia:
> Change-Id: Ife4c4378bf4323fb4a58fecfade09320ebc28026
> Reviewed-on: https://skia-review.googlesource.com/53000
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

TBR=djsollen@google.com,csmartdalton@google.com,reed@google.com

Change-Id: I89ef472a95320ff21684ca697295cd8b3939322e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/53522
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2017-09-29 18:42:25 +00:00
Mike Reed
e74dafc74d Just add new safe size apis
Update skia (and then hide the older versions) to come later
Inspired by https://skia-review.googlesource.com/c/skia/+/52665

Bug: skia:
Change-Id: I15c7395557fb49c4163cb3b323b5428abd2c752d
Reviewed-on: https://skia-review.googlesource.com/53520
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-09-29 18:20:14 +00:00
Chris Dalton
c739b7260a Enable coverage counting path rendering on non-Android
Bug: skia:
Change-Id: Ife4c4378bf4323fb4a58fecfade09320ebc28026
Reviewed-on: https://skia-review.googlesource.com/53000
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-09-29 16:36:24 +00:00
Yuqian Li
6e3d9950e3 Add width and height option to SampleApp
So we can benchmark with given width/height dimensions.

Bug: skia:
Change-Id: I881c9f054cdcecc3e0b2bfb600afd778e1c57d95
Reviewed-on: https://skia-review.googlesource.com/51246
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2017-09-29 14:21:04 +00:00
Mike Klein
37bbfe3ea4 Make SkASSERT and co. constexpr compatible.
One of the nice bits of constexpr is that an expression is constexpr if
there exists any set of argument values that make it constant.  It
doesn't have to be constant for _all_ argument values.

This means that this expression is constexpr:

   condition ? constexpr_value
             : []{ arbitrary non-constexpr code; }();

... it's constant when condition is true.

We can use this to rewrite SkASSERT(condition) as

    ( (condition) ? (void)0
                  : []{ SK_ABORT(#condition); }() )

Both sides of the ?: are void, and when condition is true at compile
time the right hand side disappears completely.  In C++11 constexpr
functions we just have to use the comma operator to jam SkASSERT()
into the order of evaluation:

    constexpr uint32_t foo(int x, int y) {
        return SkASSERT(x > y),
               x - y;
    }

Change-Id: I21878d14fb2af76d93591d2ae229460ee825cfde
Reviewed-on: https://skia-review.googlesource.com/52663
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Trent Apted <tapted@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-09-29 13:49:04 +00:00
Brian Osman
fdd2cb52b7 Revert "Revert "Revert "Revert "Make threaded proxy generation MDB-friendly, and defer instantiation""""
This reverts commit 9f8d4d36b5.

Bug: skia:
Change-Id: I8d7c1df24d8b13b94404f3d9ba69a1ab55ee00c0
Reviewed-on: https://skia-review.googlesource.com/52920
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-09-29 13:48:54 +00:00
Brian Osman
9f8d4d36b5 Revert "Revert "Revert "Make threaded proxy generation MDB-friendly, and defer instantiation"""
This reverts commit e8b8397664.

Reason for revert: More crashing.

Original change's description:
> Revert "Revert "Make threaded proxy generation MDB-friendly, and defer instantiation""
> 
> This reverts commit 837c6c7c0c.
> 
> Bug: skia:
> Change-Id: I1821f1b2b772c67f1b749692b398eb757d8073c9
> Reviewed-on: https://skia-review.googlesource.com/52744
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

TBR=egdaniel@google.com,robertphillips@google.com,brianosman@google.com

Change-Id: I1c8a81ed1000446c298d646d2cd5e7ebd212f18c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/52860
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-09-28 17:45:32 +00:00
Brian Osman
e8b8397664 Revert "Revert "Make threaded proxy generation MDB-friendly, and defer instantiation""
This reverts commit 837c6c7c0c.

Bug: skia:
Change-Id: I1821f1b2b772c67f1b749692b398eb757d8073c9
Reviewed-on: https://skia-review.googlesource.com/52744
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-09-28 17:19:58 +00:00
Brian Osman
837c6c7c0c Revert "Make threaded proxy generation MDB-friendly, and defer instantiation"
This reverts commit 742f3d02a1.

Reason for revert: Aaah!

Original change's description:
> Make threaded proxy generation MDB-friendly, and defer instantiation
> 
> Replaces GrPrepareCallback with GrDeferredProxyUploader, stored directly
> on GrTextureProxy. Op lists now store a list of referenced proxies that
> are being generated by worker threads. At flush time, iterate over those
> proxies, and invoke their uploader.
> 
> Lifetime of the uploader object is now tied to the proxy, but the ASAP
> upload function will free the proxy's uploader, if it's called.
> 
> Bug: skia:
> Change-Id: Ieb2c6a805d19990012839a8e103c3ca5b8d3dfc6
> Reviewed-on: https://skia-review.googlesource.com/49904
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

TBR=egdaniel@google.com,robertphillips@google.com,brianosman@google.com

Change-Id: I8f76a67044dc4159f903097d8b1ef19ffb48c730
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/52760
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-09-28 15:14:40 +00:00
Brian Osman
742f3d02a1 Make threaded proxy generation MDB-friendly, and defer instantiation
Replaces GrPrepareCallback with GrDeferredProxyUploader, stored directly
on GrTextureProxy. Op lists now store a list of referenced proxies that
are being generated by worker threads. At flush time, iterate over those
proxies, and invoke their uploader.

Lifetime of the uploader object is now tied to the proxy, but the ASAP
upload function will free the proxy's uploader, if it's called.

Bug: skia:
Change-Id: Ieb2c6a805d19990012839a8e103c3ca5b8d3dfc6
Reviewed-on: https://skia-review.googlesource.com/49904
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-09-28 14:46:07 +00:00
Robert Phillips
420c4cfcd7 Add GrTextureProxyPriv
Several upcoming additions should go in here

Change-Id: I642f3c7cc36b1e6512ee0170640449e88a666d2c
Reviewed-on: https://skia-review.googlesource.com/52661
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-09-28 13:23:37 +00:00
Brian Osman
36dcd7f25d Enable caching of path mask textures by default
TBR=bsalomon@google.com
Bug: skia:
Change-Id: If12c3b44de76a2fed24dd527cb774fe5be270e8e
Reviewed-on: https://skia-review.googlesource.com/52260
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-09-28 13:06:57 +00:00
Mike Klein
b9b5de5c66 make SkPath::fConvexity atomic
The TSAN bots fail regularly with races on fConvexity.  Very annoying.

We used to have this very same problem with SkPath::fFirstDirection
until we made it atomic.  This does the same to fConvexity.

This makes the field as lightly atomic as possible, with all operations
using a relaxed memory order.  The value of fConvexity isn't guarding
any other non-atomic memory or implying any other writes have happened
so I don't think we need anything beyond relaxed here.

Change-Id: I0da1f892dc2b7072d692ce8b460fb1862aebef77
Reviewed-on: https://skia-review.googlesource.com/52180
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-09-28 01:59:06 +00:00
Jim Van Verth
809cbedd4b Revert "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap"
This reverts commit 88757dacd4.

Reason for revert: Still seems to be failing Chromium "telemetry_perf_unittests (with patch) on Android" on android_n5x_swarming_rel.

Original change's description:
> guard old apis for querying byte-size of a bitmap/imageinfo/pixmap
> 
> Now with legacy behavior for allocpixels
> 
> This was reverted, so the current CL is a "fix" on top of ...
> https://skia-review.googlesource.com/c/skia/+/50980
> 
> Related update to Chrome (in preparation for this change)
> https://chromium-review.googlesource.com/c/chromium/src/+/685719
> 
> Bug: skia:
> Change-Id: I4b370ee7e95083ab27421f008132219c9c7b86e9
> Reviewed-on: https://skia-review.googlesource.com/51341
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=fmalita@chromium.org,reed@google.com

Change-Id: I827a0ca1d1e3909e648fde3342cdb8601d34da8d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/52381
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2017-09-27 23:15:07 +00:00
Mike Reed
88757dacd4 guard old apis for querying byte-size of a bitmap/imageinfo/pixmap
Now with legacy behavior for allocpixels

This was reverted, so the current CL is a "fix" on top of ...
https://skia-review.googlesource.com/c/skia/+/50980

Related update to Chrome (in preparation for this change)
https://chromium-review.googlesource.com/c/chromium/src/+/685719

Bug: skia:
Change-Id: I4b370ee7e95083ab27421f008132219c9c7b86e9
Reviewed-on: https://skia-review.googlesource.com/51341
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-09-27 14:36:07 +00:00
Ethan Nicholas
fa7ee2447e changed vertex attribute precisions to be actual types
Bug: skia:
Change-Id: Ic5555d9f1be7f24655bdea9f2a3677bfb128ef70
Reviewed-on: https://skia-review.googlesource.com/50221
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-09-27 14:04:17 +00:00
Greg Daniel
f46633f8af Revert "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap"
This reverts commit 98a6216b18.

Reason for revert: breaking the chrome roll. Looks like they may be writing data to create an image across all the row bytes and thus writing to unalloced data on the last row. Link to example failing bot:
 https://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/539960

Original change's description:
> guard old apis for querying byte-size of a bitmap/imageinfo/pixmap
> 
> Previously we had size_t and uint64_t variations.
> 
> The new (simpler) API always..
> - returns size_t, or 0 if the calculation overflowed
> - returns the trimmed size (does not include rowBytes padding for the last row)
> 
> Bug: skia:
> Change-Id: I05173e877918327c7b207d2f7f1ab0db36892e2e
> Reviewed-on: https://skia-review.googlesource.com/50980
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Reviewed-by: Leon Scroggins <scroggo@google.com>

TBR=mtklein@google.com,herb@google.com,scroggo@google.com,fmalita@chromium.org,reed@google.com

Change-Id: I726f6ab1b36b14979ba6f37105e0a469b3f0dbc0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/51262
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-09-26 20:08:07 +00:00
Greg Daniel
e2d76d5ffe Remove fIsMipMapped from GrSurfaceDesc
Part 3 of 3 for relanding of https://skia-review.googlesource.com/c/skia/+/42083

Bug: skia:
Change-Id: I98c5406015213df5d11a0101df8722da6845157e
Reviewed-on: https://skia-review.googlesource.com/44464
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-09-26 18:17:37 +00:00
Mike Reed
98a6216b18 guard old apis for querying byte-size of a bitmap/imageinfo/pixmap
Previously we had size_t and uint64_t variations.

The new (simpler) API always..
- returns size_t, or 0 if the calculation overflowed
- returns the trimmed size (does not include rowBytes padding for the last row)

Bug: skia:
Change-Id: I05173e877918327c7b207d2f7f1ab0db36892e2e
Reviewed-on: https://skia-review.googlesource.com/50980
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2017-09-26 17:07:16 +00:00
Mike Reed
592273965a Revert "Revert "migrate to sk_sp for SkFontMgr API""
This reverts commit f40ae1a4b5.

Bug: skia:
Change-Id: I752606de92ea405d6e50219c98030409b00a2841
Reviewed-on: https://skia-review.googlesource.com/51160
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-09-26 14:05:18 +00:00
Mike Reed
f40ae1a4b5 Revert "migrate to sk_sp for SkFontMgr API"
This reverts commit 4bf296be28.

Reason for revert: need guard for flutter

Original change's description:
> migrate to sk_sp for SkFontMgr API
> 
> Bug: skia:
> Change-Id: I1bf2a13537f67938cdc9956080065d10ea0bd1d8
> Reviewed-on: https://skia-review.googlesource.com/48740
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Reviewed-by: Ben Wagner <bungeman@google.com>

TBR=bungeman@google.com,reed@google.com

Change-Id: Ib0b2d00fcbcdb6131444f94d1046df6dae24f551
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/50940
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-09-25 20:00:41 +00:00
Mike Reed
4bf296be28 migrate to sk_sp for SkFontMgr API
Bug: skia:
Change-Id: I1bf2a13537f67938cdc9956080065d10ea0bd1d8
Reviewed-on: https://skia-review.googlesource.com/48740
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2017-09-25 19:45:09 +00:00
Xianzhu Wang
b449666fa2 Reland "Fix SkImageSource::filterBounds()" again
This relands commit cb4d587666
which was reverted by commit b6d2be1330
because the original CL broke some blink layout tests, and the first
reland was reverted by commit because it broke filterfastbounds gm.

This reland let SkImageSource::onFilterNodeBounds() return the dst rect
with ctm applied when mapping forward or otherwise the default value.

Original description:

> Previously SkImageSource::filterBounds() uses the default
> SkImageFilter::onFilterNodeBounds() which returns the input rect.
>
> Now override onFilterNodeBounds() in SkImageSource to return src
> or dst rect (with transform applied).

Change-Id: I4548981142b9a96beda8339d394cf9943c9f4c0f
Reviewed-on: https://skia-review.googlesource.com/50420
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-09-25 19:05:20 +00:00
Brian Osman
acbdb5d990 Remove unused function with an incorrect assert
Bug: skia:
Change-Id: I4003085fbb1cadc4aeb2e950f1a9f44f96d03a93
Reviewed-on: https://skia-review.googlesource.com/50240
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-09-22 19:50:19 +00:00
Florin Malita
adaeaedc28 Add missing onDrawDrawable() overrides to utility canvases
Change-Id: Ia5a7c523263e2c4744e0f3a743c6a4433760a4be
Reviewed-on: https://skia-review.googlesource.com/49770
Reviewed-by: Stan Iliev <stani@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-09-22 14:01:27 +00:00
Ethan Nicholas
8aa4569c13 switched SkSL's temporary 'highfloat' type back to 'float'
Bug: skia:
Change-Id: If0debae7318b6b5b4a7cb85d458996a09931127e
Reviewed-on: https://skia-review.googlesource.com/48760
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-09-22 13:54:38 +00:00
Brian Salomon
b7d42e3c11 Don't deserialize pathref oval/rrect bits
Change-Id: Id891329ee789347fb269d41bef9991f85233e031
Reviewed-on: https://skia-review.googlesource.com/49771
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-09-22 13:03:07 +00:00
Mike Klein
5e996b85db no_sanitize is Clang 3.7+
Change-Id: Ifa67c3e5cc188db71fab389f20f55e7cbfc6de8d
Reviewed-on: https://skia-review.googlesource.com/49747
Commit-Queue: Mike Klein <mtklein@chromium.org>
Commit-Queue: Yuqian Li <liyuqian@google.com>
Reviewed-by: Yuqian Li <liyuqian@google.com>
2017-09-21 18:23:03 +00:00
Brian Salomon
1e3b79e0c6 Serialize rrect/oval paths as rrects rather than points and verbs.
This is a step towards not trusting deserialized isoval/isrrect for general paths without losing the performance advantages of knowing that a path is a rrect/oval.

Change-Id: I1a8c0608c0f29f4bf7a118dfa1d475e2ab5802ea
Reviewed-on: https://skia-review.googlesource.com/49761
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-09-21 18:16:13 +00:00
Derek Sollenberger
2fbf1bc8c9 Add SK_API to APIs used by the android framework.
This CL enables us to set the default visibility of the symbols
on Android to hidden.  It is the intent that all of he SK_APIs
that have been added to /src directies should be removed as soon
as we can remove their callers within Android.

Bug: b/31971097
Change-Id: Ic787f94df0fb0c2b8d941aa7095a12b317c4b5de
Reviewed-on: https://skia-review.googlesource.com/49501
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2017-09-21 18:14:36 +00:00
Mike Klein
3b7658a475 Teach TSAN directly about semaphore_t.
Instead of teaching TSAN than SkMutex is a lock to get around it not
understanding Mach semaphore_t routines, teach it that there is a
happens-before relationship between semaphore_signal() and
semaphore_wait().

This reverts commit e395bf2d18.
New changes are entirely restricted to SkSemaphore.cpp.

Change-Id: I27f647b93c48e81e8327db849881d669c4cd3d04
Reviewed-on: https://skia-review.googlesource.com/49180
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-09-21 17:09:40 +00:00
Cary Clark
d74d775cff add missing param names to SkBitmap.h
added names allow doxygen to reference
something

TBR=reed@google.com
Bug: skia:
Change-Id: I816f8e73ba4821356900ceb099404edee390d5b1
Reviewed-on: https://skia-review.googlesource.com/49741
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
2017-09-21 17:03:00 +00:00
Cary Clark
8a02b0bca0 regenerate includes
Fresh off the griddle versions of:
SkPaint.h, SkCanvas.h, SkPath.h, and SkPixmap.h.

TBR=reed@google.com
Bug: skia: 9868
Change-Id: If3f0c1cd7973c53482772c2478b12f1070c9fc4d
Reviewed-on: https://skia-review.googlesource.com/46587
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Cary Clark <caryclark@skia.org>
2017-09-21 16:49:10 +00:00
Robert Phillips
ae7d3f3992 Add native caching of uniquely keyed GrTextureProxies (take 2)
TBR=bsalomon@google.com

Change-Id: I590dcdc85fb60706c7eb06277694791dc04c9141
Reviewed-on: https://skia-review.googlesource.com/49543
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-09-21 13:52:10 +00:00
Robert Phillips
76d640d14e Revert "Add native caching of uniquely keyed GrTextureProxies"
This reverts commit d4f100dad9.

Reason for revert: ASAN

Original change's description:
> Add native caching of uniquely keyed GrTextureProxies
> 
> Change-Id: I303fe025b7856b8d681a2d35b416c015bd468e1d
> Reviewed-on: https://skia-review.googlesource.com/48300
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com

Change-Id: I7bbf549d4855ce6d985867c3880eef80080bd3d1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/49442
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-09-20 20:50:50 +00:00
Mike Reed
0ca21466da remove dead code for STREAM_API
Bug: skia:
Change-Id: I5c5a65710af443c60a3d13fb309ce31309be7f74
Reviewed-on: https://skia-review.googlesource.com/49460
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-09-20 20:43:50 +00:00
Robert Phillips
d4f100dad9 Add native caching of uniquely keyed GrTextureProxies
Change-Id: I303fe025b7856b8d681a2d35b416c015bd468e1d
Reviewed-on: https://skia-review.googlesource.com/48300
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-09-20 20:21:50 +00:00
Brian Salomon
fb6a789191 Extra safety for SkRRect.
This moves closer to ensuring that all SkRRects are valid. It also checks for validity of deserialized SkRRects and sets the SkRRect to empty if the serialized data is invalid rather than asserting.

It is still possible to use mutators to create invalid SkRRects (e.g. outset() by large number, translate() so that type changes due to fp precision).


Bug: skia:
Change-Id: Ice5f73a020e99739ef4b3ce362181d3dbb35701c
Reviewed-on: https://skia-review.googlesource.com/49220
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-09-20 15:24:43 +00:00
Brian Osman
9a725dd948 Use shader based blending to clamp kPlus mode w/F16
Bug: skia:6173
Change-Id: I21042d484d9a7b3eee04aa3301d9793d00ad6908
Reviewed-on: https://skia-review.googlesource.com/48183
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-09-20 14:28:03 +00:00
Florin Malita
99822ac288 Add a SkWStream-based SkSVGCanvas factory
BUG=skia:7047

Change-Id: I729ec3bf7cb1bbdcef1e527ac63dbc1b1857bfa1
Reviewed-on: https://skia-review.googlesource.com/48520
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
2017-09-19 20:33:19 +00:00
Mike Klein
e395bf2d18 Mac TSAN support: annotate Sk[Base]Mutex as a mutex.
TSAN does not intercept Mach semaphore_t calls used to implement
SkBaseMutex's fSemaphore (its OSSemaphore field).  We can teach
it that Sk[Base]Mutex is a mutex anyway with the same annotations
we use for SkSharedMutex.

Change-Id: Ib91928bb9fcfa94f5cea985b46dea31ff2b56963
Reviewed-on: https://skia-review.googlesource.com/48580
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
2017-09-19 18:05:50 +00:00
Cary Clark
721aed27ac minor changes to SkMatrix.h and SkRect.h
Add missing param names so doxygen comments have
something to reference.

Add commas for all members in enums for
consistency across includes.

TBR=reed@google.com
Bug: skia: 6898
Change-Id: Ida92ed6144430072d52846001b2f618043b5b480
Reviewed-on: https://skia-review.googlesource.com/48046
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2017-09-19 13:54:59 +00:00
Cary Clark
00a24999ef add back SkPacked16toX32 to SkColorPriv
Android vendor requires this interface
so moving it back to public for now.

TBR=reed@google.com
Bug: skia: 6898
Change-Id: I4eb6da0b929227fcf327dac0626e9efd8f9a2705
Reviewed-on: https://skia-review.googlesource.com/48420
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
2017-09-19 13:12:39 +00:00
Florin Malita
2ad0908b67 Revert "Reland "Fix SkImageSource::filterBounds()""
This reverts commit bf12c07970.

Reason for revert: broke the filterfastbounds GM (2nd column, 5th & 7th rows)

Original change's description:
> Reland "Fix SkImageSource::filterBounds()"
> 
> This relands commit cb4d587666
> which was reverted by commit b6d2be1330
> because the original CL broke some blink layout tests.
> 
> This reland let SkImageSource::filterBounds() return the dst rect with
> ctm applied regardless of direction.
> 
> Original description:
> 
> > Previously SkImageSource::filterBounds() uses the default
> > SkImageFilter::onFilterNodeBounds() which returns the input rect.
> >
> > Now override onFilterNodeBounds() in SkImageSource to return src
> > or dst rect (with transform applied).
> 
> Change-Id: I915b7889ff59829ddbc4479cd66d75a0bb581e54
> Reviewed-on: https://skia-review.googlesource.com/47501
> Commit-Queue: Stephen White <senorblanco@chromium.org>
> Reviewed-by: Stephen White <senorblanco@chromium.org>

TBR=senorblanco@chromium.org,reed@google.com,wangxianzhu@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I698433de66cf3de145b9319e09cb9ec9e30d2fa9
Reviewed-on: https://skia-review.googlesource.com/48160
Reviewed-by: Florin Malita <fmalita@chromium.org>
2017-09-18 20:52:21 +00:00
Ethan Nicholas
f7b8820dc8 re-land of new SkSL precisions
Bug: skia:
Change-Id: Ic1deb3db2cbda6ca45f93dee99832971a36a2119
Reviewed-on: https://skia-review.googlesource.com/47841
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2017-09-18 18:32:13 +00:00
Ben Wagner
47a540f503 Change SkScalarTruncToInt to saturate.
This is the same behavior as SkScalarFloorToInt, SkScalarCeilToInt, and SkScalarRoundToInt.

Bug: skia:4632
Change-Id: Iec454e841b05c5b10f335b5b089718db56740323
Reviewed-on: https://skia-review.googlesource.com/47400
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
2017-09-18 18:26:13 +00:00
Ben Wagner
a9712a5113 Suppress float-cast-overflow for double-to-float in SkMatrix{,44}
No API change.

Bug: skia:4632
Change-Id: Ic9cb9de7cce8aca43f0ce8066abcc44a0b04ca84
Reviewed-on: https://skia-review.googlesource.com/47681
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-09-18 17:23:39 +00:00
Mike Klein
7791b94dcd expand on sk_double_to_float() comment
I want to make sure we've got our reasoning straight
as we start to use this more.

Change-Id: I64b8351549a59e118f564e8505d42a0a620449c1
Reviewed-on: https://skia-review.googlesource.com/47840
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
2017-09-18 15:03:29 +00:00
Cary Clark
fb0fcb2579 add back missing dependencies in SkColorPriv.h
SkColorPriv.h depends on SkColor.h and SK_RGBA_x32_SHIFT

TBR=reed@google.com
Bug: skia: 6898
Change-Id: I3f7bbaff306298e89bfb0bb571b19d6d223147e5
Reviewed-on: https://skia-review.googlesource.com/47861
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
2017-09-18 14:27:59 +00:00
Ethan Nicholas
27185a9b97 Revert "Revert "Revert "Switched highp float to highfloat and mediump float to half."""
This reverts commit 05d5a13fea.

Reason for revert: looks like it broke filterfastbounds

Original change's description:
> Revert "Revert "Switched highp float to highfloat and mediump float to half.""
> 
> This reverts commit 1d816b92bb.
> 
> Bug: skia:
> Change-Id: I388b5e5e9bf619db48297a80c9a80c039f26c9f1
> Reviewed-on: https://skia-review.googlesource.com/46464
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

TBR=bsalomon@google.com,ethannicholas@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: skia:
Change-Id: Iddf6aef2ab084aa73da7ceebdfc303a1d2b80cde
Reviewed-on: https://skia-review.googlesource.com/47441
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-09-18 03:01:47 +00:00
Ben Wagner
05c474b309 Suppress float-cast-overflow in SkPoint::Length.
Bug: skia:4632
Change-Id: I0f8a7d7a11fc76fcb315c3f0183577c3f0958926
Reviewed-on: https://skia-review.googlesource.com/47421
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
2017-09-16 22:44:33 +00:00
Xianzhu Wang
bf12c07970 Reland "Fix SkImageSource::filterBounds()"
This relands commit cb4d587666
which was reverted by commit b6d2be1330
because the original CL broke some blink layout tests.

This reland let SkImageSource::filterBounds() return the dst rect with
ctm applied regardless of direction.

Original description:

> Previously SkImageSource::filterBounds() uses the default
> SkImageFilter::onFilterNodeBounds() which returns the input rect.
>
> Now override onFilterNodeBounds() in SkImageSource to return src
> or dst rect (with transform applied).

Change-Id: I915b7889ff59829ddbc4479cd66d75a0bb581e54
Reviewed-on: https://skia-review.googlesource.com/47501
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2017-09-16 18:55:53 +00:00
Mike Reed
98c5d92ee6 Revert "Revert "use unique_ptr for stream api""
This reverts commit 7031b247c9.

Bug: skia:
Change-Id: I24c34bbee703f02994be8e206bcb9c10b5427d84
Reviewed-on: https://skia-review.googlesource.com/47541
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-09-16 02:04:23 +00:00
Mike Reed
7031b247c9 Revert "use unique_ptr for stream api"
This reverts commit 49f1f34438.

Reason for revert: broke win-chrome

../../third_party/skia/src/ports/SkFontMgr_win_dw.cpp(89): error C2228: left of '.release' must have class/struct/union
../../third_party/skia/src/ports/SkFontMgr_win_dw.cpp(89): note: type is 'SkStreamAsset *'
../../third_party/skia/src/ports/SkFontMgr_win_dw.cpp(89): note: did you intend to use '->' instead?


Original change's description:
> use unique_ptr for stream api
> 
> Bug: skia:6888
> Change-Id: I3459b4913982a7cae1c0061697c82cc65ad9a2d8
> Reviewed-on: https://skia-review.googlesource.com/26740
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=mtklein@chromium.org,mtklein@google.com,bungeman@google.com,reed@google.com

Change-Id: Ic1e4af557317abd06b7f6b7f5056645df7e469f0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:6888
Reviewed-on: https://skia-review.googlesource.com/47440
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-09-15 21:04:07 +00:00
Mike Reed
b6d2be1330 Revert "Fix SkImageSource::filterBounds()"
This reverts commit cb4d587666.

Reason for revert: speculative fix for broken layout tests

https://storage.googleapis.com/chromium-layout-test-archives/linux_chromium_rel_ng/547101/layout-test-results/results.html

+fast/css/transformed-mask.html		images diff	image	pass
+svg/W3C-SVG-1.1-SE/filters-image-03-f.svg		images diff	image	pass
+svg/W3C-SVG-1.1-SE/filters-image-05-f.svg		images diff	image	pass
+svg/W3C-SVG-1.1/filters-displace-01-f.svg		images diff	image	pass
+svg/filters/feImage-preserveAspectRatio-all.svg		images diff	image	pass
+svg/filters/feImage-preserveAspectratio.svg		images diff	image	pass

Original change's description:
> Fix SkImageSource::filterBounds()
> 
> Previously SkImageSource::filterBounds() uses the default
> SkImageFilter::onFilterNodeBounds() which returns the input rect.
> 
> Now override onFilterNodeBounds() in SkImageSource to return src
> or dst rect (with transform applied).
> 
> Change-Id: I6681e1ba97affb09ef1ca5bc03b3d0f66c10f149
> Reviewed-on: https://skia-review.googlesource.com/46741
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Mike Reed <reed@google.com>

TBR=senorblanco@chromium.org,reed@google.com,wangxianzhu@chromium.org

Change-Id: Ib335f8e2ccbadc2335d23bc5f122fc5de53a8740
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/47342
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-09-15 20:30:36 +00:00
Ethan Nicholas
05d5a13fea Revert "Revert "Switched highp float to highfloat and mediump float to half.""
This reverts commit 1d816b92bb.

Bug: skia:
Change-Id: I388b5e5e9bf619db48297a80c9a80c039f26c9f1
Reviewed-on: https://skia-review.googlesource.com/46464
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-09-15 18:50:54 +00:00
Mike Reed
49f1f34438 use unique_ptr for stream api
Bug: skia:6888
Change-Id: I3459b4913982a7cae1c0061697c82cc65ad9a2d8
Reviewed-on: https://skia-review.googlesource.com/26740
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-09-15 18:46:45 +00:00
Cary Clark
dbdc57cb40 fix google3 colorpriv use
older versions of webkit
use more of colorpriv than
contemporary chrome

TBR=reed@google.com
Bug: skia: 6898
Change-Id: I4adcc7d04e2cdd7bf3a85e7d591337144105ab48
Reviewed-on: https://skia-review.googlesource.com/47180
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
2017-09-15 18:28:33 +00:00
Xianzhu Wang
cb4d587666 Fix SkImageSource::filterBounds()
Previously SkImageSource::filterBounds() uses the default
SkImageFilter::onFilterNodeBounds() which returns the input rect.

Now override onFilterNodeBounds() in SkImageSource to return src
or dst rect (with transform applied).

Change-Id: I6681e1ba97affb09ef1ca5bc03b3d0f66c10f149
Reviewed-on: https://skia-review.googlesource.com/46741
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-09-15 17:15:54 +00:00
Brian Salomon
4127456bd6 Disable flat interpolation in TextureOp on Qualcomm
Change-Id: I335fa9731cbf449989242f7e81096248abc90e90
Reviewed-on: https://skia-review.googlesource.com/46980
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-09-15 17:07:33 +00:00
Cary Clark
03721621c8 fix flutter and pdfium
missed a couple of users
of SkColorPriv.h; restored
those functions

TBR=reed@google.com
NOTRY=true
Bug: skia: 6898
Change-Id: I64fc62905be0627c4ecdc39595bd0aaf1f60c5ac
Reviewed-on: https://skia-review.googlesource.com/47081
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2017-09-15 16:59:34 +00:00
Cary Clark
a4083c97d4 make most of SkColorPriv.h private
created new file src/core/SkColorData.h for
internal consumption. Note that many of the
functions there are unused as well.

Bug: skia: 6898
R: reed@google.com
Change-Id: I25bfd5a9c21f53558c4ca65a77eb5d322d897c6d
Reviewed-on: https://skia-review.googlesource.com/46848
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-09-15 16:31:35 +00:00
Cary Clark
b20154499a make kPathRefGenIDBitCnt private
kPathRefGenIDBitCnt is used only by SkPath.cpp and SkPathRef.cpp.
Curiously, there's no existing private declarations shared by
SkPath and SkPathRef, so I added kPathRefGenIDBitCnt to
SkPathPriv.h as the go-between. If there's an existing convention
I overlooked, please let me know.

R=reed@google.com,djsollen@google.com
Bug: skia: 6898
Change-Id: I929d780c3b4a10e5cf78e7176a7516abf912508e
Reviewed-on: https://skia-review.googlesource.com/46560
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Cary Clark <caryclark@skia.org>
2017-09-14 17:32:41 +00:00
Cary Clark
ed294b4e00 name SkPixmap missing params
a couple of missing names
trip up bookmaker

TBR=reed@google.com
Bug: skia: 6898
Change-Id: I224f3a0422474cb6d4d3558abb3e800d5abedd12
Reviewed-on: https://skia-review.googlesource.com/46580
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2017-09-14 14:58:51 +00:00
Greg Daniel
21918231b2 Revert "Remove isMipMapped from GrSurfaceDesc" and follow up find exact scratch CL
This reverts commit 52cb5fe23b.
This reverts commit e1fbf17058.

TBR:bsalomon@googole.com

Bug: chromium:763333
Change-Id: Ie94e00c3c7231e32f009b9dc7bb51ebb53baf7b1
Reviewed-on: https://skia-review.googlesource.com/44400
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-09-08 19:58:18 +00:00
Mike Klein
1170a553be Don't allow iteration through non-finite points.
Added a unit test too.

BUG=chromium:756563

Change-Id: Ic77a89b4a98d1a553877af9807a3d3bdcd077bb9
Reviewed-on: https://skia-review.googlesource.com/44420
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
2017-09-08 19:56:38 +00:00
Brian Salomon
2bbdcc44c6 Rework GrSamplerParams to be more compact and use its own wrap mode enum.
The main change is to make GrSamplerParams smaller by making its enums have byte-sized underlying types. The rest is cosmetic.

Change-Id: Ib71ea50612d24619a85e463826c6b8dfb9b445e3
Reviewed-on: https://skia-review.googlesource.com/43200
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-09-07 16:58:31 +00:00
Cary Clark
643627e242 remove useless reset
void reset(const SkImageInfo& info)
is not useful because it sets
rowBytes to zero while leaving
width alone.

This form of reset also doesn't
appear to have a caller.

TBR=reed@google.com
Bug: skia: 6898
Change-Id: I87019420ddc59107aefe0cac27a6b969976f1bf6
Reviewed-on: https://skia-review.googlesource.com/43480
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
2017-09-07 12:48:51 +00:00
Greg Daniel
52cb5fe23b Remove isMipMapped from GrSurfaceDesc
Bug: skia:
Change-Id: Id3864aad7ff9636362c9c54ef411a02af9c83fbf
Reviewed-on: https://skia-review.googlesource.com/42083
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-09-06 14:41:18 +00:00
Cary Clark
ec2455bcc9 name parameters for docs
SkPixmap.h is missing a couple
of parameter names. Named parameters
helps bookmaker generate markdown
and doxygen that describe methods
and functions.

TBR=reed@google.com
Bug: skia:6898
Change-Id: I8f9e1acd677e57e71c26c34759ce4647a5db0548
Reviewed-on: https://skia-review.googlesource.com/42380
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2017-09-05 15:24:44 +00:00
Leon Scroggins III
de7f91b29f Remove SK_LEGACY_FRAME_INFO_ALPHA_TYPE
With https://chromium-review.googlesource.com/c/621815, Chromium no
longer references this. Delete it.

TBR=reed@google.com
Bug: skia:6839
Change-Id: Icd3d394858859e6732b1429394c7c04bb22b9dea
Reviewed-on: https://skia-review.googlesource.com/36581
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2017-09-01 20:18:49 +00:00
Cary Clark
b7da7239f7 generated SkCanvas.h
SkCanvas.h generated from docs/SkCanvas.bmh using bookmaker.

Also added corrections to SkPaint.h, and generated SkPath.h.

Once these are functionally correct (e.g., they don't break
anything) I plan to check them in -- feel free to continue
to review them before and after the check in event.

R=brianosman@google.com
TBR=reed@google.com
Bug: skia:6898
Change-Id: I6d01e9eee422304e5ab871b3870a7ed710efd645
Reviewed-on: https://skia-review.googlesource.com/30460
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
Reviewed-by: Yuqian Li <liyuqian@google.com>
2017-09-01 19:59:19 +00:00
Robert Phillips
bdda0ba155 Cosmetic changes to GrDrawOpAtlas
It looks like we won't be going in the direction of:

https://skia-review.googlesource.com/c/skia/+/35962 (Allow GrDrawOpAtlas to grow & shrink)

Pull out what is worth keeping.

TBR=bsalomon@google.com

Change-Id: Ia14c3c621e7b1d2d7f303a455a3e4d9660af5f6e
Reviewed-on: https://skia-review.googlesource.com/41362
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2017-09-01 16:24:48 +00:00
Mike Klein
022cfa258d Add FIFO thread pool, use it for most things.
We like a LIFO default thread pool in tools like DM for better
memory/time locality... the bots use less memory this way, and
generally run faster.

But most use cases want a FIFO queue, so that they can get going
on the next parts of early work while later work is still running.

This splits the implementation into one using SkTArray and pop_back
for LIFO, and a new one using std::deque and pop_front for FIFO.

Change-Id: Ief203b6869a00f1f8084019431a781d15fc63750
Reviewed-on: https://skia-review.googlesource.com/41849
Commit-Queue: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Yuqian Li <liyuqian@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-09-01 16:19:47 +00:00
Brian Salomon
f43d0001e4 Revert "Revert "Revert "Revert "Remove GrBackendRenderTargetDesc in favor of GrBackendRenderTarget.""""
This reverts commit 6df4d6be0d.

Reason for revert: Google3 fix landed

Original change's description:
> Revert "Revert "Revert "Remove GrBackendRenderTargetDesc in favor of GrBackendRenderTarget."""
> 
> This reverts commit 71554bc256.
> 
> Reason for revert: Google3
> 
> Original change's description:
> > Revert "Revert "Remove GrBackendRenderTargetDesc in favor of GrBackendRenderTarget.""
> > 
> > This reverts commit 807371c15b.
> > 
> > Docs-Preview: https://skia.org/?cl=40260
> > Change-Id: I28e0434c455155ff39a5aaa4141abdf442474e87
> > Reviewed-on: https://skia-review.googlesource.com/40260
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > Commit-Queue: Brian Salomon <bsalomon@google.com>
> 
> TBR=egdaniel@google.com,bsalomon@google.com
> 
> Change-Id: Ifdfa896a70db69935473276d12dce54de5c6b6f7
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/41500
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=egdaniel@google.com,bsalomon@google.com

Change-Id: I827419bb19972c3644929a8c984bb9534baab0ba
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/41700
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-08-31 20:04:12 +00:00
Brian Salomon
6df4d6be0d Revert "Revert "Revert "Remove GrBackendRenderTargetDesc in favor of GrBackendRenderTarget."""
This reverts commit 71554bc256.

Reason for revert: Google3

Original change's description:
> Revert "Revert "Remove GrBackendRenderTargetDesc in favor of GrBackendRenderTarget.""
> 
> This reverts commit 807371c15b.
> 
> Docs-Preview: https://skia.org/?cl=40260
> Change-Id: I28e0434c455155ff39a5aaa4141abdf442474e87
> Reviewed-on: https://skia-review.googlesource.com/40260
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=egdaniel@google.com,bsalomon@google.com

Change-Id: Ifdfa896a70db69935473276d12dce54de5c6b6f7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/41500
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-08-31 15:57:42 +00:00
Heather Miller
9d2de4a05f Update Skia milestone to 63
TBR: reed

Change-Id: I0ae2640539d640227ede9b818793f220f2328832
Reviewed-on: https://skia-review.googlesource.com/41361
Reviewed-by: Heather Miller <hcm@google.com>
Commit-Queue: Heather Miller <hcm@google.com>
2017-08-31 13:34:51 +00:00
Robert Phillips
cb2e235e6f Reduce stencil buffer clearing
TBR=bsalomon@google.com
Bug: skia:6953
Change-Id: I079f90711297ee290f2d4011cfcb18b764554deb
Reviewed-on: https://skia-review.googlesource.com/40691
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-08-30 21:17:36 +00:00
Brian Osman
195c05b6d5 Move several GrContextOptions fields behind GR_TEST_UTILS
Bug: skia:
Change-Id: I35bc08ad72fb94d8e47fe342d314c4496b954226
Reviewed-on: https://skia-review.googlesource.com/40881
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-08-30 19:35:27 +00:00
Robert Phillips
ad8a43f769 DeferredDisplayList API proposal
Chrome would like to perform cpu-side preprocessing for gpu draws in parallel. 
They do not want to go through a picture (since they have their own display list format).


The general idea is that we add a new SkDeferredDisplayListRecorder class to
perform all of Ganesh's cpu-side preprocessing ahead of time and in parallel.

The SkDDLRecorder operates like SkPictureRecorder. The user can get an SkCanvas
from the SkDDLRecorder and feed it draw operations. Once finished, the user
calls 'detach' to get an SkDeferredDisplayList. All the work up to and 
including the 'detach' call can be done in parallel and will not touch
the GPU. To actually get pixels the client must call SkSurface::draw(SkDDL)
on an SkSurface that is "compatible" with the surface characterization
initially given to the SkDDLMaker.

The surface characterization contains the minimum amount of information Ganesh needs 
to know about the ultimate destination in order to perform its cpu-side work
(i.e., caps, width, height, config).



Change-Id: I75faa483ab5a6b779c8de56ea56b9d90b990f43a
Reviewed-on: https://skia-review.googlesource.com/30140
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-08-30 19:25:47 +00:00
Brian Osman
c0e66273f8 Make AA hairline renderer non-optional
Change-Id: I0d4166a4e9ea894f479755f9f7137c5941cf8a22
Reviewed-on: https://skia-review.googlesource.com/41081
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-08-30 19:05:27 +00:00
Brian Salomon
71554bc256 Revert "Revert "Remove GrBackendRenderTargetDesc in favor of GrBackendRenderTarget.""
This reverts commit 807371c15b.

Docs-Preview: https://skia.org/?cl=40260
Change-Id: I28e0434c455155ff39a5aaa4141abdf442474e87
Reviewed-on: https://skia-review.googlesource.com/40260
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-08-30 17:59:46 +00:00
Robert Phillips
fb4a20c7f5 Remove kDefault_GrSurfaceOrigin
Change-Id: Ic55d488287add32e5a32b5a77415e16cebf4c1ee
Reviewed-on: https://skia-review.googlesource.com/29120
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-08-30 11:30:32 +00:00
Cary Clark
73fa972d0b work on path
Work on SkPath.h documentation; fixed self-consistency
bugs identified by bookmaker. Fixed a couple of
minor typos in SkPath.h itself.

Also brought SkPaint and SkCanvas docs up to date.

TBR=reed@google.com
Docs-Preview: https://skia.org/?cl=39040
Bug: skia: 6898
Change-Id: Id89d4e2fa7fb6ee2e3cbec7ea762e06308b67d8b
Reviewed-on: https://skia-review.googlesource.com/39040
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Cary Clark <caryclark@skia.org>
2017-08-30 11:06:02 +00:00
Brian Osman
b350ae24d5 Add GrContextOption to disable distance field path renderer
We're going to hide the path renderer bitfield behind a testing-only flag,
but clients may want to suppress this path renderer in particular, so a
dedicated flag makes sense.

Bug: skia:
Change-Id: I6cc4049243b5d3c129a824dfe7c1a65a70a05ccd
Reviewed-on: https://skia-review.googlesource.com/40083
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-08-29 20:41:01 +00:00
Brian Osman
8b0f265f70 Always include the default path renderer in the chain
This (plus SW) ensures that we can always draw any path. Changed the path
renderer command line flags so that 'default' means everything but CCPR,
and 'All' really means 'every path renderer'.

Bug: skia:
Change-Id: I2801d1c50ab939f23efb4600e0f90e6add2891b7
Reviewed-on: https://skia-review.googlesource.com/40221
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-08-29 19:37:32 +00:00
Brian Osman
ef45e6eb58 Remove (unused) context option to remove shader swizzling
Bug: skia:
Change-Id: I0372f7782124c096370b42624b6c0a3aff8a90b0
Reviewed-on: https://skia-review.googlesource.com/40101
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-08-29 19:34:51 +00:00
Cary Clark
0461e9fa44 simplify path validate
Reduce path validation interfaces,
deferring the harder work of rewriting
the callers until later.

R=reed@google.com,enne@chromium.org

Change-Id: Iea56f1cd1be93bb1d96b50836a9bd3cd4872ad23
Reviewed-on: https://skia-review.googlesource.com/37541
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Adrienne Walker <enne@chromium.org>
2017-08-29 18:37:11 +00:00
Robert Phillips
b0e93a22bb Remove origin field from GrSurface (take 2)
This mainly consists of rm origin from GrSurface and the wrapBackEnd*
methods and then re-adding an explicit origin parameter to all the
GrGpu methods that need it.

TBR=bsalomon@google.com

Change-Id: I4248b2a4749ef844da4233ce53b0dc504bc9eb74
Reviewed-on: https://skia-review.googlesource.com/30280
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-08-29 17:36:31 +00:00
Robert Phillips
6b47c7d19f Store discard request on the opList and remove GrDiscardOp (take 3)
Change-Id: Ided58e0110b0b4e611ab65f46c18a6ae2b85f1bc
Reviewed-on: https://skia-review.googlesource.com/39340
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-08-29 11:43:01 +00:00
Hal Canary
4b972d1db3 SkFILEStream::Make: fix leak.
Change-Id: I218ae89f049df3d05380b46ca672bb1f6fcb5ea4
Reviewed-on: https://skia-review.googlesource.com/38962
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2017-08-28 20:36:07 +00:00
Brian Salomon
3416969605 Revert "Revert "Revert "Revert "Add GrTextureOp and use to implement SkGpuDevice::drawImage[Rect]() when possible""""
This reverts commit a184ac7e0c.

Change-Id: I2a4a1b713fd998ba33a5f85a34be1645438a7ac9
Reviewed-on: https://skia-review.googlesource.com/39400
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-08-28 20:02:16 +00:00
Ben Wagner
5b07178258 Undo unwanted change to SkTypes.h.
This was undone in an editor, but didn't get commited.

Change-Id: Id410de0a066b3fe65119d0b72c6f29a1f91d1ebb
Reviewed-on: https://skia-review.googlesource.com/39700
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-08-28 19:09:19 +00:00
Mike Reed
3c2d09f89a change SkRect::growToInclude to take a point instead of x,y
This avoids the dangerous overload problem of

growToInclude(0, 0)

matching to (const SkPoint[], count) rather than growToInclude(x, y)

Bug: skia:
Change-Id: Iaba8b1a579638ff363fde62e4e3004052dd2b2ac
Reviewed-on: https://skia-review.googlesource.com/39501
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-08-28 17:54:06 +00:00
Ben Wagner
a93a14a998 Convert NULL and 0 to nullptr.
This was created by looking at warnings produced by clang's
-Wzero-as-null-pointer-constant. This updates most issues in
Skia code. However, there are places where GL and Vulkan want
pointer values which are explicitly 0, external headers which
use NULL directly, and possibly more uses in un-compiled
sources (for other platforms).

Change-Id: Id22fbac04d5c53497a53d734f0896b4f06fe8345
Reviewed-on: https://skia-review.googlesource.com/39521
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-08-28 17:48:57 +00:00
Robert Phillips
445b557361 Revert "Store discard request on the opList and remove GrDiscardOp (take 2)"
This reverts commit 9b0b32fda4.

Reason for revert: Android_Vulkan Gold images are broken

Original change's description:
> Store discard request on the opList and remove GrDiscardOp (take 2)
> 
> Change-Id: I2f1bd6f8547895cc8d66cfde42d7d890441d198e
> Reviewed-on: https://skia-review.googlesource.com/33460
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

TBR=egdaniel@google.com,robertphillips@google.com

Change-Id: I1470d88c2407864da8b6ebdc119c8c2466a2a6c6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/39000
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-08-25 20:36:39 +00:00
Robert Phillips
9b0b32fda4 Store discard request on the opList and remove GrDiscardOp (take 2)
Change-Id: I2f1bd6f8547895cc8d66cfde42d7d890441d198e
Reviewed-on: https://skia-review.googlesource.com/33460
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-08-25 18:52:18 +00:00
Robert Phillips
8296e752fa Switch atlas clients over to using absolute texture coordinates (take 2)
This is a prerequisite for being able to resize the atlas with impunity.

Change-Id: Iccc9c7ced43f38a7d8483a7bd12a458d59a3453a
Reviewed-on: https://skia-review.googlesource.com/38362
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-08-25 15:19:27 +00:00
Ben Wagner
5563d8da7d Remove SkIsS16 and SkIsU16.
SkIsS16 can be replaced with SkTFitsIn<int16_t> and SkIsU16 is never
used.

Change-Id: I734f677149fab102cdb295a7b34faa3e3089134a
Reviewed-on: https://skia-review.googlesource.com/38600
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-08-25 14:09:57 +00:00
Ben Wagner
59c7a6e6e2 Make SkTFitsIn turn into less code.
This changes the cases which require two compares into single compares
by relying on squirrely bits of the C++ specification.

Change-Id: I2c14e461b571bb94f586c14db4eaeadfd06b628b
Reviewed-on: https://skia-review.googlesource.com/38220
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2017-08-24 21:29:47 +00:00
Robert Phillips
e253831ee0 Revert "Switch atlas clients over to using absolute texture coordinates"
This reverts commit e84c087e62.

Reason for revert: ANGLE is unhappy

Original change's description:
> Switch atlas clients over to using absolute texture coordinates
> 
> This is a prerequisite for being able to resize the atlas with impunity.
> 
> Change-Id: I509816c8d6f38fbc92fa39aeab303b42ab09f58b
> Reviewed-on: https://skia-review.googlesource.com/37560
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

TBR=egdaniel@google.com,jvanverth@google.com,robertphillips@google.com,brianosman@google.com

Change-Id: I329efd642c22e11a5c576a4632fc557759b200d5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/38400
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-08-24 17:56:30 +00:00
Robert Phillips
e84c087e62 Switch atlas clients over to using absolute texture coordinates
This is a prerequisite for being able to resize the atlas with impunity.

Change-Id: I509816c8d6f38fbc92fa39aeab303b42ab09f58b
Reviewed-on: https://skia-review.googlesource.com/37560
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-08-24 16:09:16 +00:00
Adrienne Walker
ba9741d467 Validate rrect type in SkRRect::isValid
Bug: chromium: 758161
Change-Id: I2472ff59af2fab05d94d88d5effb44828e8a5132
Reviewed-on: https://skia-review.googlesource.com/37800
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2017-08-23 21:47:27 +00:00
Brian Osman
5127998795 Add an (optional) SkTaskGroup to GrContext
GrContextOptions has an SkExecutor field, allowing clients to supply a
thread pool. If present, the GrContext will create an SkTaskGroup that
can be used for internal threading work.

Bug: skia:
Change-Id: I8b01245515a21a83f9fe838caf0a01c9a26c0003
Reviewed-on: https://skia-review.googlesource.com/37580
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-08-23 14:33:25 +00:00
Leon Scroggins III
ae79f32e79 Call initializeColorXform inside SkCodec
Make initializeColorXform private, and only call in the base class.
Add virtual method to skip initializeColorXform, for classes that do
not need one.

Change SkCodec::FrameInfo's SkAlphaType to an SkEncodedInfo::Alpha.
This allows proper checking internally whether SkCodec needs to do a
color correct premultiply.

Depends on https://chromium-review.googlesource.com/c/620947, for this
API change.

(Separated from review.skia.org/25746)

Bug: skia:5609
Bug: skia:6839
Change-Id: Icb0d46659c546060c34d32eaf792c86708726c7a
Reviewed-on: https://skia-review.googlesource.com/35880
Reviewed-by: Chris Blume <cblume@chromium.org>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-08-18 19:46:59 +00:00
Sadrul Habib Chowdhury
4189d1b8b7 Add SK_API to SkOverdrawCanvas and SkOverdrawColorFilter.
The SkiaRenderer in chromium is going to use the overdraw canvas and
filter for measuring overdraw. Move these headers out of src/ into
include/.

Bug: chromium:704285
Change-Id: I2abb1671b73e3d26552462cf700340a7e3b874f0
Reviewed-on: https://skia-review.googlesource.com/36160
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-08-18 16:53:49 +00:00
Leon Scroggins III
04be2b54ba Reland "skia: add heif decoding support"
This reverts commit db68a426b6.

Fixes errors in Android and Google3

Bug: b/64077740
Change-Id: I3d2bb1223e4d8ba912ea2b88144aeecc487fce1a
Reviewed-on: https://skia-review.googlesource.com/35701
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Chong Zhang <chz@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2017-08-18 14:40:29 +00:00
Ben Wagner
9ce5154d6f Remove sk_throw.
This macro is now an alias for SK_ABORT and appears to no longer be
used. Removing to clean up SkTypes.h a bit.

Change-Id: If2246f2bf5bab47dbb0b79dd8ebd29766ea0bc5e
Reviewed-on: https://skia-review.googlesource.com/35822
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-08-17 21:26:28 +00:00
Ben Wagner
7ca9a74fef Remove uses of sk_throw.
The sk_throw macro is now an alias to SK_ABORT, but is often used when
other macros better describe the situation. This change replaces
sk_throw with SK_ABORT or SkASSERT_RELEASE as appropriate.

Change-Id: I313facc6d535c8e8bec90ceeaf17ae3a381c48f3
Reviewed-on: https://skia-review.googlesource.com/35882
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-08-17 19:45:01 +00:00
Leon Scroggins III
0741818e7a Move calls to conversion_possible to SkCodec
Move common code into the base class, so subclasses need not call
conversion_possible.

Use SkEncodedInfo rather than SkImageInfo, and use the proper frame.

API Changes:
- SkAndroidCodec:
  - Add getEncodedInfo(), for SkBitmapRegionCodec
- SkEncodedInfo:
  - Add opaque() helper
- SkBitmapRegionDecoder:
  - Remove unused conversionSupported

(Split off from skia-review.googlesource.com/c/25746)

Bug: skia:5601
Change-Id: If4a40d4b98a3dd0afde2b6058f92315a393a5baf
Reviewed-on: https://skia-review.googlesource.com/34361
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-08-17 16:09:31 +00:00
Brian Salomon
1d816b92bb Revert "Switched highp float to highfloat and mediump float to half."
This reverts commit 88d99c6387.

Reason for revert: Believed to be causing unit test failures in Chrome roll:

https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/364433
https://luci-logdog.appspot.com/v/?s=chromium%2Fbb%2Ftryserver.chromium.android%2Flinux_android_rel_ng%2F364433%2F%2B%2Frecipes%2Fsteps%2Fcontent_browsertests__with_patch__on_Android%2F0%2Flogs%2FWebRtcCaptureFromElementBrowserTest.VerifyCanvasWebGLCaptureColor%2F0

Original change's description:
> Switched highp float to highfloat and mediump float to half.
> 
> The ultimate goal is to end up with "float" and "half", but this
> intermediate step uses "highfloat" so that it is clear if I missed a
> "float" somewhere. Once this lands, a subsequent CL will switch all
> "highfloats" back to "floats".
> 
> Bug: skia:
> Change-Id: Ia13225c7a0a0a2901e07665891c473d2500ddcca
> Reviewed-on: https://skia-review.googlesource.com/31000
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,csmartdalton@google.com,ethannicholas@google.com

Change-Id: I8bfa97547ac3920d433665f161d27df3f15c83aa
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/35705
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-08-17 15:08:17 +00:00
Ben Wagner
b0d88eda90 Remove SkPARAM and SkDECLAREPARAM.
These were used for debug only parameters, but no longer appear in any
code.

Change-Id: I91a25f0b40df02a66b0d7543339deafbf28dc06d
Reviewed-on: https://skia-review.googlesource.com/35703
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-08-17 14:27:16 +00:00
Ben Wagner
824e730789 Remove SkFAIL.
This macro just forwards to SK_ABORT. It appears there are now no users.

Change-Id: I25a736790d7799b8ff51d879a823ee1b6b9cb47e
Reviewed-on: https://skia-review.googlesource.com/35760
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-08-17 13:42:06 +00:00
Mike Klein
db68a426b6 Revert "skia: add heif decoding support"
This reverts commit c2a954290d.

Reason for revert: both Android and Google3 rolls cannot compile.  Android cannot cast std::unique_ptr<T> to T*, Google3 cannot find HeifDecoderAPI.h.

Original change's description:
> skia: add heif decoding support
> 
> Bug: b/64077740
> Change-Id: I11e0243bcc4c21c0aa5aa29a719dd0fcba7ae6f7
> Reviewed-on: https://skia-review.googlesource.com/35123
> Reviewed-by: Chong Zhang <chz@google.com>
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> Commit-Queue: Chong Zhang <chz@google.com>
> Commit-Queue: Leon Scroggins <scroggo@google.com>

TBR=scroggo@google.com,chz@google.com

Change-Id: Id98f025e63daec50408186000453d1695170f7a8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: b/64077740
Reviewed-on: https://skia-review.googlesource.com/35741
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2017-08-17 13:34:07 +00:00
Ben Wagner
f05aa812a9 Revert "Remove SkFAIL."
This reverts commit 91b6ce3d80.

Reason for revert: Broke all the builders!
Original change's description:
> Remove SkFAIL.
> 
> This macro just forwards to SK_ABORT. It appears there are now no users.
> 
> Change-Id: Iab02109749eb9674a5f5c61752ef0588398d1b27
> Reviewed-on: https://skia-review.googlesource.com/35520
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>

TBR=djsollen@google.com,bungeman@google.com

Change-Id: I7afcd127c8aa07b0147bc9c980918f597378ffef
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/35740
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-08-17 13:11:57 +00:00
Ben Wagner
91b6ce3d80 Remove SkFAIL.
This macro just forwards to SK_ABORT. It appears there are now no users.

Change-Id: Iab02109749eb9674a5f5c61752ef0588398d1b27
Reviewed-on: https://skia-review.googlesource.com/35520
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-08-17 13:07:06 +00:00
Ethan Nicholas
88d99c6387 Switched highp float to highfloat and mediump float to half.
The ultimate goal is to end up with "float" and "half", but this
intermediate step uses "highfloat" so that it is clear if I missed a
"float" somewhere. Once this lands, a subsequent CL will switch all
"highfloats" back to "floats".

Bug: skia:
Change-Id: Ia13225c7a0a0a2901e07665891c473d2500ddcca
Reviewed-on: https://skia-review.googlesource.com/31000
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-08-16 23:05:15 +00:00
Chong Zhang
c2a954290d skia: add heif decoding support
Bug: b/64077740
Change-Id: I11e0243bcc4c21c0aa5aa29a719dd0fcba7ae6f7
Reviewed-on: https://skia-review.googlesource.com/35123
Reviewed-by: Chong Zhang <chz@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Chong Zhang <chz@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-08-16 20:22:55 +00:00
Brian Salomon
cf75b00ff0 Make ref manipulation public on surface proxies.
Now that our system supports more flexible and later creation of GrPiplines, GrOps should be able to access these methods without the redundant state variables incurred when using GrGpuResourceRef.

Change-Id: Ib9c025e1134617f96b9ebbb153c78e51c63914bf
Reviewed-on: https://skia-review.googlesource.com/35283
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-08-16 15:42:58 +00:00
Ben Wagner
b4aab9ae6d Replace SkFAIL with SK_ABORT.
SkFAIL is a legacy macro which is just SK_ABORT. This CL mechanically
changes uses of SkFAIL to SK_ABORT in preparation for its removal. The
related sk_throw macro will be changed independently, due to needing to
actually clean up its users.

Change-Id: Id70b5c111a02d2458dc60c8933f444df27d9cebb
Reviewed-on: https://skia-review.googlesource.com/35284
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-08-16 15:37:54 +00:00
Ben Wagner
5ddfd6f499 Remove SkTypeface::style().
Change-Id: Ide445c73a5b14ea2e52decf85f5a2a9af0f2d242
Reviewed-on: https://skia-review.googlesource.com/34940
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-08-15 20:57:57 +00:00
Brian Osman
03776fc0d7 Speed up convexpaths GM in debug builds
That GM has a path with 16k points, arranged in a rectangle. When we try
to draw it in Ganesh, we first check to see if it's a (closed) rectangle.
We eventually decide that it is a rectangle, but not closed, so it gets
passed along. Then we construct a GrShape, which tries to simplify the
shape, again asking if it's a rectangle...

Each isRect query was iterating over the 16k verbs, and for each one,
calling atVerb(i). That, internally, calls verbs(), which calls validate()
in debug builds. So we were walking all 16k points 16k times (to ensure
the bounds were correct). The end result is that the GM took over 11
seconds to draw, and now takes 3 ms.

Bug: skia:
Change-Id: If5f7a067b8c25f049dc64275d94a42ae4a50f6a9
Reviewed-on: https://skia-review.googlesource.com/34723
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-08-15 20:29:07 +00:00
Brian Salomon
aff329b8e9 Make GrFragmentProcessor be non-refcounted and use std::unique_ptr.
Change-Id: I985e54a071338e99292a5aa2f42c92bc115b4008
Reviewed-on: https://skia-review.googlesource.com/32760
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-08-11 14:13:26 +00:00
Adrienne Walker
ad8da8ea99 Expose SkPath validation as boolean
As a part of serializing SkPaths, I want to be able to know (without
asserting) whether or not a path is valid so that I can discard
potentially malicious deserialized paths.

Currently, SkPath(Ref) both just have asserting validation functions
which can't be used externally.  This patch adds accessors that don't
assert.

Bug: chromium:752755 skia:6955
Change-Id: I4d0ceb31ec660b87e3fda438392ad2b60a27a0da
Reviewed-on: https://skia-review.googlesource.com/31720
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
2017-08-10 20:22:35 +00:00
Brian Osman
71a1889a14 Revert "Revert "GrContext::dump that produces JSON formatted output""
This reverts commit 0f450acd76.

Bug: skia:
Change-Id: I97428fbbc6d82bf8b186ec5fdbf1a939c00e4126
Reviewed-on: https://skia-review.googlesource.com/32726
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-08-10 15:42:25 +00:00
Robert Phillips
65048139bd Remove accessRenderTarget calls in service of binding stencil buffer
Change-Id: Ifca6e21c619a0433ecf0b8699d92661f8c3068a8
Reviewed-on: https://skia-review.googlesource.com/31243
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-08-10 12:47:25 +00:00
Brian Osman
0f450acd76 Revert "GrContext::dump that produces JSON formatted output"
This reverts commit 175af0d011.

Reason for revert: Chrome doesn't know about portable format specifiers. Sigh.

Original change's description:
> GrContext::dump that produces JSON formatted output
> 
> Includes caps, GL strings, and extensions
> 
> Bug: skia:
> Change-Id: I1e8b3dd50fb68357f9de8ca6149cf65443d027ef
> Reviewed-on: https://skia-review.googlesource.com/32340
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,brianosman@google.com

Change-Id: Ie280b25275725f0661da7541f54ed62897abb82f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/32861
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-08-09 20:47:49 +00:00
Robert Phillips
54190c42dd Revert "Store discard request on the opList and remove GrDiscardOp"
This reverts commit b681a0f1b0.

Reason for revert: Seems to be messing up some MacMini & Nexus7 bots
Original change's description:
> Store discard request on the opList and remove GrDiscardOp
> 
> Change-Id: Ic1f76bb91c16b23df1fe71c07a4d5ad5abf1dc26
> Reviewed-on: https://skia-review.googlesource.com/32640
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com

Change-Id: I8a89fae7bb11791bd023d7444a074bb34d006fd0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/32704
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-08-09 20:10:06 +00:00
Brian Osman
175af0d011 GrContext::dump that produces JSON formatted output
Includes caps, GL strings, and extensions

Bug: skia:
Change-Id: I1e8b3dd50fb68357f9de8ca6149cf65443d027ef
Reviewed-on: https://skia-review.googlesource.com/32340
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-08-09 18:52:05 +00:00
Robert Phillips
b681a0f1b0 Store discard request on the opList and remove GrDiscardOp
Change-Id: Ic1f76bb91c16b23df1fe71c07a4d5ad5abf1dc26
Reviewed-on: https://skia-review.googlesource.com/32640
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-08-09 18:11:34 +00:00
Mike Reed
828f1d5195 handle overflows in float->int
rects are already auto-vectorized, so no need to explicitly write a 4f version of SkRect::round()

Bug: skia:
Change-Id: I098945767bfcaa7093d770c376bd17ff3bdc9983
Reviewed-on: https://skia-review.googlesource.com/32060
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2017-08-09 16:07:24 +00:00
Florin Malita
8a0044f1bd Tiling support for GrGradientEffect kTwo_ColorType/kThree_ColorType
(re-land of https://skia-review.googlesource.com/c/30780)

Currently only the hard-stop specializations support tiling.

Consolidate the tiling code and expand to kTwo_ColorType,
kThree_ColorType also.

BUG=6925
Change-Id: I017b4accba30e87367e139333e96246cb362b6a4
Reviewed-on: https://skia-review.googlesource.com/31422
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-08-08 15:27:36 +00:00
Robert Phillips
6dd8cf144e Remove SkLightingShader and associated classes
Change-Id: I8050414c30dfdb5df23ca79955adc5ba3a29d3f5
Reviewed-on: https://skia-review.googlesource.com/31140
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-08-07 13:33:49 +00:00
Mike Reed
35ee0e09b4 clean up useage of SkFloatBits
Bug: skia:
Change-Id: I6d3a0019f2fcf11feca69123e4ce6eb35de43613
Reviewed-on: https://skia-review.googlesource.com/31222
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2017-08-07 02:49:29 +00:00
Mike Reed
8addae8b53 just use math.h for converting from float to int
Bug: skia:
Change-Id: I40cce503cd4cef09c671511a705192efc5d67d71
Reviewed-on: https://skia-review.googlesource.com/31002
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-08-04 21:25:07 +00:00
Mike Reed
514ac0b92a remove unused flag
Bug: skia:
Change-Id: Icfaf04a541138700da906d96dfc2d90e4e00379d
Reviewed-on: https://skia-review.googlesource.com/31150
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-08-04 18:20:45 +00:00
Stan Iliev
73d8fd9065 Add a private API for writing the clip to the stencil
Add a private API used by Android framework, which writes the clip
into a stencil buffer. This is used by HWUI to clip the WebView.

Bug: 31489986
Change-Id: I94515f1539acd9d069c8aceb3300577feed9c94f
Reviewed-on: https://skia-review.googlesource.com/29521
Commit-Queue: Stan Iliev <stani@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2017-08-02 19:56:07 +00:00
Greg Daniel
5131678123 Revert "Revert "Revert "Revert "Add support for semaphores to be inserted on GrContext flush""""
This reverts commit cc8eb60c48.

Reason for revert: Chrome change landed that should fix chrome roll

Original change's description:
> Revert "Revert "Revert "Add support for semaphores to be inserted on GrContext flush"""
> 
> This reverts commit 876aed8758.
> 
> Reason for revert: the bots seem to be unhappily red with this CL
> 
> Original change's description:
> > Revert "Revert "Add support for semaphores to be inserted on GrContext flush""
> > 
> > This reverts commit 8724b46099.
> > 
> > Reason for revert: Creating a test CL to see what happens on the bots
> > 
> > Original change's description:
> > > Revert "Add support for semaphores to be inserted on GrContext flush"
> > > 
> > > This reverts commit cd1416efbc.
> > > 
> > > Reason for revert: speculative, to try to fix roll see gpu_tests.pixel_integration_test.PixelIntegrationTest.Pixel_GpuRasterization_ConcavePaths
> > > 
> > > Original change's description:
> > > > Add support for semaphores to be inserted on GrContext flush
> > > > 
> > > > This also moves the logic of inserting semaphores down into GrDrawingManager
> > > > and finishFlush on GrGpu. With it being on finishFlush, there should be no
> > > > issues when the DrawingManager starts respecting the proxy passed in assuming
> > > > it always calls finishFlush at the end (which it should).
> > > > 
> > > > Bug: skia:
> > > > Change-Id: I925c2a289dcbbb9159b9120878af1d34f21a2dc7
> > > > Reviewed-on: https://skia-review.googlesource.com/25641
> > > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > > 
> > > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com
> > > 
> > > Change-Id: I9c5b9cf8c060193e1861dbb8f0c10fb11dfb5249
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Bug: skia:
> > > Reviewed-on: https://skia-review.googlesource.com/25980
> > > Reviewed-by: Mike Reed <reed@google.com>
> > > Commit-Queue: Mike Reed <reed@google.com>
> > 
> > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reed@google.com
> > 
> > # Not skipping CQ checks because original CL landed > 1 day ago.
> > 
> > Bug: skia:
> > Change-Id: I5edbeaa0769670ee58f362f0ccaa78319410aa6c
> > Reviewed-on: https://skia-review.googlesource.com/26160
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> 
> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reed@google.com
> 
> Change-Id: I22fd6febafe70489a5fdb695c6f4263368eb423d
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/29422
> Reviewed-by: Yuqian Li <liyuqian@google.com>
> Commit-Queue: Yuqian Li <liyuqian@google.com>

TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,liyuqian@google.com,reed@google.com

Change-Id: Ie3eae818b02599a70f714ef6b6635ce7d171bde6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/30000
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-08-02 15:10:18 +00:00