Commit Graph

623 Commits

Author SHA1 Message Date
Jim Van Verth
623fadf8be Add Material Design shadow reference sample
Change-Id: I889a3f508407178c457f675c321880d869caf9ea
Reviewed-on: https://skia-review.googlesource.com/17717
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-05-23 18:12:15 +00:00
Robert Phillips
92de631edd Remove compressed (ETC1) texture support from Ganesh (take 2)
Reland of https://skia-review.googlesource.com/c/17456/ (Remove compressed (ETC1) texture support from Ganesh) but w/o removing third_part\etc1 files

TBR=bsalomon@google.com
Change-Id: I8ec4b7e3ddf47d213cb24c382731c050ffb8847f
Reviewed-on: https://skia-review.googlesource.com/17700
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-05-23 12:45:21 +00:00
Brian Osman
bc262e110a Revert "Remove compressed (ETC1) texture support from Ganesh"
This reverts commit ee26363aaa.

Reason for revert: Failing Google 3 roll.

Original change's description:
> Remove compressed (ETC1) texture support from Ganesh
> 
> Change-Id: If4cf286df87ea87338aba47001d90a5fcc4f2667
> Reviewed-on: https://skia-review.googlesource.com/17456
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> 

TBR=bsalomon@google.com,robertphillips@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ie1a57187287e03600a69e374501478e93c41415c
Reviewed-on: https://skia-review.googlesource.com/17527
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-05-22 20:14:50 +00:00
Robert Phillips
ee26363aaa Remove compressed (ETC1) texture support from Ganesh
Change-Id: If4cf286df87ea87338aba47001d90a5fcc4f2667
Reviewed-on: https://skia-review.googlesource.com/17456
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-05-22 18:02:52 +00:00
Jim Van Verth
3af1af9e97 Remove ambient and spot mask filters.
Also remove a deprecated interface in SkShadowUtils.

Change-Id: I32e67271be953f11071c512cb39a47ea1e7dcaaf
Reviewed-on: https://skia-review.googlesource.com/17266
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2017-05-18 19:45:45 +00:00
Jim Van Verth
72f4891bf8 Add microbench for shadows
Based on Android's shadowgrid2.

Change-Id: I33209b6b84fc63a762405c4988afbdbffcc170d6
Reviewed-on: https://skia-review.googlesource.com/17360
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-05-18 18:57:24 +00:00
Brian Osman
6e3ce40bd9 Add GM to verify that drawX == (path.addX, drawPath)
This demonstrates a new kind of hybrid unit test/GM.
It creates a grid of cells. In each cell, we do two
renders that are expected to produce the same result.
For each cell, we render the two results overlaid,
and highlight any differing pixels in red. Assuming
there is a diff, the area around the largest diff
is drawn zoomed in from both images.

Matching cells are outlined in green, failing cells
are outlined in red. Triaging this GM just involves
answering the question: "Are there any red boxes?"

"Good" example: https://screenshot.googleplex.com/909P3tvS55f.png
"Bad" example: https://screenshot.googleplex.com/oXBWbEKw5ur.png

To get more tests to pass, (and fix an assert
in Ganesh), I've gone ahead and enforced that user
supplied rects (in drawRect and drawOval) are
always sorted once they hit the canvas virtuals.
Currently, drawArc rejects empty ovals, but I added
the same assert to onDrawArc, if we decide to change
the strategy there.

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

Bug: skia:
Change-Id: I48f85de5f2bcb7fdc9558c2fd80cb1f20800b244
Reviewed-on: https://skia-review.googlesource.com/17270
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-05-17 19:45:10 +00:00
Greg Daniel
89eb148abd Revert "Add GM to verify that drawX == (path.addX, drawPath)"
This reverts commit 78d1b428a8.

Reason for revert: break preabandongpu bot

Original change's description:
> Add GM to verify that drawX == (path.addX, drawPath)
> 
> This demonstrates a new kind of hybrid unit test/GM.
> It creates a grid of cells. In each cell, we do two
> renders that are expected to produce the same result.
> For each cell, we render the two results overlaid,
> and highlight any differing pixels in red. Assuming
> there is a diff, the area around the largest diff
> is drawn zoomed in from both images.
> 
> Matching cells are outlined in green, failing cells
> are outlined in red. Triaging this GM just involves
> answering the question: "Are there any red boxes?"
> 
> "Good" example: https://screenshot.googleplex.com/909P3tvS55f.png
> "Bad" example: https://screenshot.googleplex.com/oXBWbEKw5ur.png
> 
> To get more tests to pass, (and fix an assert
> in Ganesh), I've gone ahead and enforced that user
> supplied rects (in drawRect and drawOval) are
> always sorted once they hit the canvas virtuals.
> Currently, drawArc rejects empty ovals, but I added
> the same assert to onDrawArc, if we decide to change
> the strategy there.
> 
> Bug: skia:
> Change-Id: I021a18c85e234298e1d29f333662683d996dd42c
> Reviewed-on: https://skia-review.googlesource.com/16983
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Mike Reed <reed@google.com>
> 

TBR=mtklein@chromium.org,mtklein@google.com,brianosman@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Bug: skia:

Change-Id: Id1ead4e22115c49cad5d0adb6151ede81734b4d3
Reviewed-on: https://skia-review.googlesource.com/17269
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-05-17 19:00:51 +00:00
Brian Osman
78d1b428a8 Add GM to verify that drawX == (path.addX, drawPath)
This demonstrates a new kind of hybrid unit test/GM.
It creates a grid of cells. In each cell, we do two
renders that are expected to produce the same result.
For each cell, we render the two results overlaid,
and highlight any differing pixels in red. Assuming
there is a diff, the area around the largest diff
is drawn zoomed in from both images.

Matching cells are outlined in green, failing cells
are outlined in red. Triaging this GM just involves
answering the question: "Are there any red boxes?"

"Good" example: https://screenshot.googleplex.com/909P3tvS55f.png
"Bad" example: https://screenshot.googleplex.com/oXBWbEKw5ur.png

To get more tests to pass, (and fix an assert
in Ganesh), I've gone ahead and enforced that user
supplied rects (in drawRect and drawOval) are
always sorted once they hit the canvas virtuals.
Currently, drawArc rejects empty ovals, but I added
the same assert to onDrawArc, if we decide to change
the strategy there.

Bug: skia:
Change-Id: I021a18c85e234298e1d29f333662683d996dd42c
Reviewed-on: https://skia-review.googlesource.com/16983
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
2017-05-17 17:59:47 +00:00
Mike Reed
c090c647e4 move files out of private, and fix up callers to IWYU
Realized that a pending CL needed to add (yet another) private type to SkRecords.h, but w/o this CL I'd be forced to move that header also into private. This change frees us up to not have transitive exposure for types that need to be recorded.

Bug: skia:
Change-Id: Id79f1c2e44ba85e063c1360cf96c92de6397ca2b
Reviewed-on: https://skia-review.googlesource.com/17031
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-05-16 21:29:03 +00:00
Mike Klein
7e68bc93ff clamp to premul in dither
Dither can bump color values above alpha (duh), or below
zero (duh), so clamp back to premul after dithering.

BUG=skia:6644,skia:6643

Change-Id: Ida107e866380e06130af0d01467117bca929ba44
Reviewed-on: https://skia-review.googlesource.com/17070
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-05-16 21:10:14 +00:00
Florin Malita
03d1e59bda Add SK_LEGACY_SWEEP_GRADIENT on Android
Speculative roll fix.

Change-Id: I570c807c4f1d695fe46526a943d5376b79b358a1
Reviewed-on: https://skia-review.googlesource.com/17023
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-05-16 12:07:06 +00:00
Mike Klein
fd35c742bf fix SkJumper radial gradient precision
rcp(rsqrt(x)) doesn't have enough precision when x is a coordinate.
(It's fine when x is a color, like in the softlight blend mode.)

Adds a GM to test this.  It used to look quite ugly.

Change-Id: Icec295c2e2f50ae7a5e3e33c62270f632a58f65c
Reviewed-on: https://skia-review.googlesource.com/16914
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-05-15 20:37:16 +00:00
Brian Salomon
e334c59654 Attempt to work around iOS varying limit in GLPrograms test
Dump shaders when linking fails.

Bug: skia:6627
Change-Id: I7f1df4be039eb56d990aa64c58c8dd2a22d97dbe
Reviewed-on: https://skia-review.googlesource.com/16867
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-05-15 15:41:01 +00:00
Mike Reed
787a16dd9e move impl for drawvertices into separate file
expect to refactor the impl, so this just makes that easier
(plus SkDraw.cpp was just too big)

Bug: skia:
Change-Id: I22c07d37429195363d9a76e56a1dca915f9c2d57
Reviewed-on: https://skia-review.googlesource.com/16863
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2017-05-15 13:51:25 +00:00
Brian Osman
85d34b2e84 Remove SkCrossContextImageData and all support code
Bug: skia:
Change-Id: I8eb8cef5456c05a8e314d8404698893c7af82d13
Reviewed-on: https://skia-review.googlesource.com/16368
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-05-11 18:07:20 +00:00
Ethan Nicholas
5ac13c2362 sksl support for static ifs & switches
Bug: skia:
Change-Id: Ic9e01a3a18efddb19bab26e92bfb473cad294fc1
Reviewed-on: https://skia-review.googlesource.com/16144
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
2017-05-10 19:31:34 +00:00
Mike Reed
14113bcc4e add flag to hide deprecated clipops
needs this to land first
https://codereview.chromium.org/2877493002/#

Bug: skia:3191
Change-Id: Iff5271064877c4e96353d3564464f513eaad0bb5
Reviewed-on: https://skia-review.googlesource.com/16365
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-05-10 18:56:14 +00:00
Brian Salomon
ac70f84e7f Move all non-AA fill rect ops off of GrLegacyMeshDrawOp.
This adds perspective to GrNewNonAAFillRectOp, renames it to GrNonAAFillRectOp, and deletes the previous version of that namespace.

Change-Id: I20f35bf019f9c9105e6ec83dda11328451138109
Reviewed-on: https://skia-review.googlesource.com/15634
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-05-10 14:48:47 +00:00
Brian Osman
13dddce65f Added SkImage::MakeCrossContextFromEncoded
Designed for Flutter's threading architecture, with
an eye to being useful to other clients. Under the
hood, uses a new image generator class to lazily wrap
a texture for multiple GrContexts.

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

Bug: skia:
Change-Id: I3dd382640629b79b3058f18fee68d043566e43e5
Reviewed-on: https://skia-review.googlesource.com/15895
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-05-09 18:45:04 +00:00
Matt Sarett
2e61b182da Add jpeg encoder alpha handling option
This instructs us on how to encode jpegs when the src
image has alpha.  The original behavior is to ignore
the alpha channel.  This CL adds the option to blend
the pixels onto opaque black.

Note that kBlendOnBlack and kIgnore are identical
unless the input alpha type is kUnpremul.

Bug: 713862
Bug: skia:1501
Change-Id: I4891c70bb0ccd83f7974c359bd40a2143b5c49ac
Reviewed-on: https://skia-review.googlesource.com/15817
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-05-09 18:32:04 +00:00
Brian Salomon
449d78f5a8 Revert "Added SkImage::MakeCrossContextFromEncoded"
This reverts commit 83b1b3db36.

Reason for revert: unit test failing and asan leaks

Original change's description:
> Added SkImage::MakeCrossContextFromEncoded
> 
> Designed for Flutter's threading architecture, with
> an eye to being useful to other clients. Under the
> hood, uses a new image generator class to lazily wrap
> a texture for multiple GrContexts.
> 
> Bug: skia:
> Change-Id: I6c37b12c8ab5bce94b91190e5f0beb91d31ae81b
> Reviewed-on: https://skia-review.googlesource.com/14180
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> 

TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,brianosman@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I1f0bf580aa0ea2d132e18b64ff610ddac9d073a7
Reviewed-on: https://skia-review.googlesource.com/15892
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-05-08 20:46:26 +00:00
Brian Osman
83b1b3db36 Added SkImage::MakeCrossContextFromEncoded
Designed for Flutter's threading architecture, with
an eye to being useful to other clients. Under the
hood, uses a new image generator class to lazily wrap
a texture for multiple GrContexts.

Bug: skia:
Change-Id: I6c37b12c8ab5bce94b91190e5f0beb91d31ae81b
Reviewed-on: https://skia-review.googlesource.com/14180
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-05-08 19:56:27 +00:00
Ethan Nicholas
2983f4022d Re-land of "eliminated GrGLSLExpr".
This change is exactly the same as the last time it was landed; I believe the
underlying optimizer bug that was causing this to cause problems has been
fixed by a prior CL.
Bug: skia:
Change-Id: I5436422f094ea758caa3cd69e9338db31b1f93fa
Reviewed-on: https://skia-review.googlesource.com/15768
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-05-08 16:08:44 +00:00
Greg Daniel
c2dd5ed937 Add GrVkTexelBuffer class
Bug: skia:
Change-Id: I6111902f58df3af92702d974a52d9c7f267634d4
Reviewed-on: https://skia-review.googlesource.com/15628
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-05-08 13:32:31 +00:00
Ben Wagner
912876b38a Add bigrect GM.
Previous version in https://codereview.chromium.org/1758113005
was reverted.

Bug: skia:4632
Change-Id: I9a85f11ca3a6fcd5e67016edf67f0538f00b6f01
Reviewed-on: https://skia-review.googlesource.com/14751
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
2017-05-05 19:21:42 +00:00
Mike Klein
6bfe3f5142 add a new hsl GM
Change-Id: I2c8b9df3e6bf40de4b38966fa8ea671fc68aa45f
Reviewed-on: https://skia-review.googlesource.com/15635
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-05-05 19:20:21 +00:00
Chris Dalton
fe199b7d51 Add postFlush call to GrOnFlushCallbackObject
Adds a new postFlush method and renames the class to
GrOnFlushCallbackObject. Also removes the ref counting in favor of
making the callback object a purely virtual interface. ref/unref on the
callback interface would conflict with existing ref/unref methods on the
subclass. It is now the caller’s responsibility to ensure the lifetime
of the callback is tied to that of the context.

Bug: skia:
Change-Id: I2fc1f98c700032e296a36f3a9a09c0753ab47aea
Reviewed-on: https://skia-review.googlesource.com/15463
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-05-05 15:53:36 +00:00
Jim Van Verth
e7705780c9 Add ShadowUtils sample.
Also enables mouse support in Viewer.

Change-Id: Iaed08d42a64f591f0cd9b24684b3aee43404ed94
Reviewed-on: https://skia-review.googlesource.com/15313
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-05-04 18:37:55 +00:00
Matt Sarett
9f3dcb3f76 Reland "Add SkImage::makeColorSpace() with correct transfer fn behavior"
Completes implementation for lazy and raster images.  gpu is
still a TODO.

Bug: skia:6553
Change-Id: I898e4464ffc91442c7f98669f1203dd5c203621b
Reviewed-on: https://skia-review.googlesource.com/15307
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-05-04 13:22:39 +00:00
Ethan Nicholas
421fe443f8 Revert "Revert "Revert "eliminated GrGLSLExpr"""
This reverts commit 796001c82e.

Reason for revert: looks to be causing problems in Chrome (https://storage.googleapis.com/chromium-layout-test-archives/WebKit_Linux_Trusty__dbg_/1553/layout-test-results/results.html)

Original change's description:
> Revert "Revert "eliminated GrGLSLExpr""
> 
> This reverts commit 5e550ab57e.
> 
> Bug: skia:
> Change-Id: I4705e47dbd209aa8f43db3d28c856bd3aa9e49ab
> Reviewed-on: https://skia-review.googlesource.com/15187
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> 

TBR=ethannicholas@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I6455a4f16b2dc0d6d1265541f7117e0cfb8dd91c
Reviewed-on: https://skia-review.googlesource.com/15309
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-05-04 13:11:09 +00:00
Matt Sarett
bc6e5ff7cf Finish removal of SkImageInfo from SkPixelRef
All of the clients are updated.  We don't need this anymore.

Bug: skia:6535
Change-Id: I1399a08b7dda8f29c4f4016a1de50ee8310c1fef
Reviewed-on: https://skia-review.googlesource.com/15106
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-05-04 12:54:10 +00:00
Matt Sarett
b59a9da7eb Revert "Add SkImage::makeColorSpace() with correct transfer fn behavior"
This reverts commit 9ad0531a18.

Reason for revert: Does not handle transfer fn behavior.

Original change's description:
> Add SkImage::makeColorSpace() with correct transfer fn behavior
> 
> Completes implementation for lazy and raster images.  gpu is
> still a TODO.
> 
> Bug: skia:6553
> Change-Id: I04eea5c4fb53c50c0406c2e6b6778b0e21fd85f8
> Reviewed-on: https://skia-review.googlesource.com/14403
> Commit-Queue: Matt Sarett <msarett@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> 

TBR=mtklein@google.com,msarett@google.com,brianosman@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I3830321aea7d0dc5ab38a40f3318bb53a41df383
Reviewed-on: https://skia-review.googlesource.com/15306
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-05-04 12:40:41 +00:00
Matt Sarett
9ad0531a18 Add SkImage::makeColorSpace() with correct transfer fn behavior
Completes implementation for lazy and raster images.  gpu is
still a TODO.

Bug: skia:6553
Change-Id: I04eea5c4fb53c50c0406c2e6b6778b0e21fd85f8
Reviewed-on: https://skia-review.googlesource.com/14403
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-05-03 23:45:55 +00:00
Brian Salomon
6d4b65e9da Revert "Revert "Add a new non-AA rect op that does not inherit from GrLegacyMeshDrawOp.""
This reverts commit 0f35332796.

Bug: skia:
Change-Id: I8def56fa55bfc70de4386bf0b7a7867f6e91c173
Reviewed-on: https://skia-review.googlesource.com/15251
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-05-03 21:41:38 +00:00
Brian Salomon
0f35332796 Revert "Add a new non-AA rect op that does not inherit from GrLegacyMeshDrawOp."
This reverts commit ff574e0eb7.

Reason for revert: needs a merge

Original change's description:
> Add a new non-AA rect op that does not inherit from GrLegacyMeshDrawOp.
> 
> This uses a new helper class, GrSimpleMeshDrawOpHelper, which it uses to fullfill the GrMeshDrawOp contract and to construct its GrPipline when flushed. The helper is intended to be used such that the op only stores a GrProcessorSet if it is constructed with a "nontrivial" GrPaint. "Trivial" currently means no fragment processors and src-over blending. The helper allows the op subclass to specify whether it supports stenciling via a template parameter. The helper class is initially intended to be used for ops that don't have per-vertex colors and construct a single GrPipeline at flush time, though perhaps this can be relaxed in future changes.
> 
> On the microbenchmark "rotated_rects_bw_same_transparent_srcover" this produces a 18-20% reduction in time on my Z840 running Linux and 33% on my 2010 MacPro.
> 
> Bug: skia:
> Change-Id: I9f655827a70bee585b0b0e1255371ffd995a0b80
> Reviewed-on: https://skia-review.googlesource.com/14604
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> 

TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I2893d6ff7c183a18f7d0ba82818701b80b681eb0
Reviewed-on: https://skia-review.googlesource.com/15280
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-05-03 20:59:06 +00:00
Brian Salomon
ff574e0eb7 Add a new non-AA rect op that does not inherit from GrLegacyMeshDrawOp.
This uses a new helper class, GrSimpleMeshDrawOpHelper, which it uses to fullfill the GrMeshDrawOp contract and to construct its GrPipline when flushed. The helper is intended to be used such that the op only stores a GrProcessorSet if it is constructed with a "nontrivial" GrPaint. "Trivial" currently means no fragment processors and src-over blending. The helper allows the op subclass to specify whether it supports stenciling via a template parameter. The helper class is initially intended to be used for ops that don't have per-vertex colors and construct a single GrPipeline at flush time, though perhaps this can be relaxed in future changes.

On the microbenchmark "rotated_rects_bw_same_transparent_srcover" this produces a 18-20% reduction in time on my Z840 running Linux and 33% on my 2010 MacPro.

Bug: skia:
Change-Id: I9f655827a70bee585b0b0e1255371ffd995a0b80
Reviewed-on: https://skia-review.googlesource.com/14604
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-05-03 20:50:40 +00:00
Ethan Nicholas
796001c82e Revert "Revert "eliminated GrGLSLExpr""
This reverts commit 5e550ab57e.

Bug: skia:
Change-Id: I4705e47dbd209aa8f43db3d28c856bd3aa9e49ab
Reviewed-on: https://skia-review.googlesource.com/15187
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-05-03 14:13:41 +00:00
Mike Reed
91b43e4fa3 remove unused etc logic
Bug: skia:
Change-Id: I913d348910db0b6ab930c4c5566ba9eb2320550e
Reviewed-on: https://skia-review.googlesource.com/15181
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-05-03 12:55:43 +00:00
Brian Salomon
5e550ab57e Revert "eliminated GrGLSLExpr"
This reverts commit 93f20f5629.

Reason for revert: Mismerge readded deleted files.

Original change's description:
> eliminated GrGLSLExpr
> 
> Now that skslc performs all of the optimizations (and then some) that
> GrGLSLExpr is responsible for, it's just extra work for no benefit.
> 
> Bug: skia:
> Change-Id: I40b0629e00a33873ed9fc6c0a9f41d8350221f9a
> Reviewed-on: https://skia-review.googlesource.com/14560
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> 

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

Change-Id: Ia8b723594527afe34489fc78a4b49039081b6390
Reviewed-on: https://skia-review.googlesource.com/15154
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-05-02 21:07:32 +00:00
Matt Sarett
26b44df233 Add support for row-by-row jpeg encoding
Reland of:
https://skia-review.googlesource.com/c/14641/

Bug: 713862
Change-Id: I9dca5ede4ebf569c5f80edcfb23a506b6cfa935e
Reviewed-on: https://skia-review.googlesource.com/15144
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-05-02 20:40:10 +00:00
Ethan Nicholas
93f20f5629 eliminated GrGLSLExpr
Now that skslc performs all of the optimizations (and then some) that
GrGLSLExpr is responsible for, it's just extra work for no benefit.

Bug: skia:
Change-Id: I40b0629e00a33873ed9fc6c0a9f41d8350221f9a
Reviewed-on: https://skia-review.googlesource.com/14560
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-05-02 20:05:56 +00:00
Jim Van Verth
4c9155bd66 Remove EXPERIMENTAL_SHADOWING, Part 1
Bug: skia:6557
Change-Id: I6482d74be7b360c93141a73dd80c67854530c7a1
Reviewed-on: https://skia-review.googlesource.com/15101
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-05-02 17:22:44 +00:00
Leon Scroggins
c06f309cf5 Revert "Add support for row-by-row jpeg encoding"
This reverts commit 9b848d5749.

Reason for revert: ASAN reports leaked memory [1]. Google3 reports a "delete size mismatch" [2], which I suspect is the same issue.

[1] https://chromium-swarm.appspot.com/task?id=35e2c9fa9eac6310&refresh=10&show_raw=1
[2] https://test.corp.google.com/ui#cl=154838904&flags=CAMQBQ==&id=OCL:154838904:BASE:154839043:1493741642370:9c96115f&t=//chrome/skia/dm_wrapper:dm_wrapper

Original change's description:
> Add support for row-by-row jpeg encoding
> 
> Bug: 713862
> Change-Id: I787b7c49662a00b89ae0ef35845dfbd6be3e6fb1
> Reviewed-on: https://skia-review.googlesource.com/14641
> Commit-Queue: Matt Sarett <msarett@google.com>
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> 

TBR=msarett@google.com,scroggo@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ic5a8d67e0d4a7733662586055ceff086a2ab335d
Reviewed-on: https://skia-review.googlesource.com/15140
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-05-02 17:08:35 +00:00
Matt Sarett
9b848d5749 Add support for row-by-row jpeg encoding
Bug: 713862
Change-Id: I787b7c49662a00b89ae0ef35845dfbd6be3e6fb1
Reviewed-on: https://skia-review.googlesource.com/14641
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2017-05-02 16:07:15 +00:00
Florin Malita
c3b10a3a78 Reland "Add a clip mask bench"
Change-Id: Iefbfd1ecec38d3db5bac4370c75e6701aa03076f
TBR=reed@google.com
Reviewed-on: https://skia-review.googlesource.com/15102
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-05-02 15:33:06 +00:00
Mike Klein
cea615b497 Revert "Add a clip mask bench"
This reverts commit c59a38d12d.

Reason for revert: whoops, sorry, this one must have been the problem.

Original change's description:
> Add a clip mask bench
> 
> Change-Id: I230729492fc23e290136f7d62610abe5ca51c067
> Reviewed-on: https://skia-review.googlesource.com/14941
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Florin Malita <fmalita@chromium.org>
> 

TBR=fmalita@chromium.org,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ifbd74a8985ebaa95e54032aaaa2891b0f1b67940
Reviewed-on: https://skia-review.googlesource.com/14957
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-05-01 21:34:00 +00:00
Florin Malita
c59a38d12d Add a clip mask bench
Change-Id: I230729492fc23e290136f7d62610abe5ca51c067
Reviewed-on: https://skia-review.googlesource.com/14941
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-05-01 21:27:00 +00:00
Matt Sarett
d170c0fb48 Only store width and height on SkPixelRef (last part)
Relanding https://skia-review.googlesource.com/c/14105/
in pieces to try to diagnose problems with the Chrome
roll.

Bug: skia:6535
Change-Id: Iefe4825b9ce9be999baeec8ab7ae6651f1caf451
Reviewed-on: https://skia-review.googlesource.com/14860
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-05-01 17:01:29 +00:00
Mike Reed
736a9cc88d remove unused yuv methods
Bug: skia:
Change-Id: Ie1e6c905d8989b49c2cf5c9e5fd1f383268f6480
Reviewed-on: https://skia-review.googlesource.com/14645
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-04-28 18:25:17 +00:00
Ben Wagner
2fcd4a480d Revert "Only store width and height on SkPixelRef"
This reverts commit 2cbb6662e3.

Reason for revert: Likely cause of Chromium DEPS roll failure; speculative revert.

Original change's description:
> Only store width and height on SkPixelRef
>
> Bug: skia:6535
> Change-Id: Id91e8d1e82f593be7d4b23ca5abde752f2666a77
> Reviewed-on: https://skia-review.googlesource.com/14105
> Commit-Queue: Matt Sarett <msarett@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
>

TBR=djsollen@google.com,msarett@google.com,reed@google.com,stani@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I12a024a71833f33432d5ea8cffdfc642b8b4240a
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/14644
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
2017-04-28 17:06:23 +00:00
Matt Sarett
2cbb6662e3 Only store width and height on SkPixelRef
Bug: skia:6535
Change-Id: Id91e8d1e82f593be7d4b23ca5abde752f2666a77
Reviewed-on: https://skia-review.googlesource.com/14105
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-04-27 21:19:32 +00:00
Brian Osman
df7e075c74 Fold SkImageCacherator into SkImage_Lazy
SkImageCacherator still exists, but only as an interface implemented
(solely) by SkImage_Lazy. The only external clients are
GrImageTextureMaker and SkImage_Gpu::getDeferredTextureImageData.

This is probably an improvement, but doesn't go as far as I'd hoped.

Bug: skia:
Change-Id: I6812badfabb6924b025621b21af00cbde9c16cac
Reviewed-on: https://skia-review.googlesource.com/14371
Reviewed-by: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-04-27 18:31:19 +00:00
Mike Klein
39312c8f82 Describe GCC-like asm steps as "assemble ..."
Oddly, the MSVC toolchain already says "assemble ...".

Change-Id: Iabf06afa1b7c05b5699a26813f1469346be439a5
Reviewed-on: https://skia-review.googlesource.com/14367
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-04-26 14:59:55 +00:00
Matt Sarett
ee7cb5d974 Delete SkGTypeface and SkGScalerContext
Bug: skia:
Change-Id: I6a513d0cb3600678bc3b9c2bdfa8e04d692e9acf
Reviewed-on: https://skia-review.googlesource.com/14191
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-04-25 15:49:55 +00:00
Robert Phillips
7fbb7d3d90 Remove two more gpu headers from include/*
This is probably it until GrTexture.h can be hidden.

TBR=bsalomon@google.com

Change-Id: Ie743c937f72aa0dc9f5e84def572f655f0abe041
Reviewed-on: https://skia-review.googlesource.com/14143
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-04-24 12:57:31 +00:00
Robert Phillips
e3302dfb81 Make InstancedRendering more opList-splitting friendly
This CL splits the InstancedRendering class into an allocator and a per-opList op tracker. This was done because we need to allocate the InstancedRendering ops before we know the final destination opList. The InstancedRendering ops are now still all allocated from the same pool but the tracking and execution is done per opList.

Change-Id: Ieddabb6f85f8f187c5e7373f7f6cb155d69a9685
Reviewed-on: https://skia-review.googlesource.com/13860
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2017-04-24 12:13:16 +00:00
Leon Scroggins III
83239658f2 Reland "Make SkPngCodec only read as much of the stream as necessary"
(Originally uploaded as 13900.)

Previously, SkPngCodec assumed that the stream only contained one
image, which ended at the end of the stream. It read the stream in
arbitrarily-sized chunks, and then passed that data to libpng for
processing.

If a stream contains more than one image, this may result in reading
beyond the end of the image, making future reads read the wrong data.

Now, SkPngCodec starts by reading 8 bytes at a time. After the
signature, 8 bytes is enough to know which chunk is next and how many
bytes are in the chunk.

When decoding the size, we stop when we reach IDAT, and when decoding
the image, we stop when we reach IEND.

This manual parsing is necessary to support APNG, which is planned in
the future. It also allows us to remove the SK_GOOGLE3_PNG_HACK, which
was a workaround for reading more than necessary at the beginning of
the image.

Add a test that simulates the issue, by decoding a special stream that
reports an error if the codec attempts to read beyond the end.

Temporarily disable the partial decoding tests for png. A larger change
will be necessary to get those working again, and no clients are
currently relying on incrementally decoding PNGs (i.e. decode part of
an image, then decode further with more data).

Include a workaround for older versions of libpng (e.g. 1.2 in
Google3). In older versions, if the row callback is null when the
IDAT header is processed, reading the image will fail. When we see the
IDAT, we save the length and process a recreated IDAT header later,
after the row callback has been set.

Bug: skia:5368
Bug:b/34073812
Test: Existing tests, plus a new test in dm.

Change-Id: I293a4ddc013b82669a8b735062228b26d0bce933
Reviewed-on: https://skia-review.googlesource.com/13984
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
2017-04-21 20:49:55 +00:00
Matt Sarett
e71db447d4 Use dstColorSpace in SkPictureShader cache key
Starting with the bug fix + test.

Broken off of:
https://skia-review.googlesource.com/c/13976

Bug: skia:
Change-Id: If6c28e2dfb0c5340c48e943d0313a9ea9515a6c3
Reviewed-on: https://skia-review.googlesource.com/14061
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-04-21 19:34:43 +00:00
Robert Phillips
9f5d4679e1 Remove more headers from include/gpu
TBR=bsalomon@google.com

Change-Id: I93b28cfcb4d7b50c12e24ea81faab680bccce9ef
Reviewed-on: https://skia-review.googlesource.com/14036
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-04-21 17:12:17 +00:00
Robert Phillips
54cbcd7056 Remove all headers from include/gpu/effects
TBR=bsalomon@google.com

Change-Id: I9ad2fa41262693b3a83bef625eac332eb1e71a3d
Reviewed-on: https://skia-review.googlesource.com/13988
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-04-21 16:02:31 +00:00
Brian Osman
f1b4382421 Rename SkImage_Generator to SkImage_Lazy
This removes a long-standing source of confusion: SkImage_Generator was an
image that wrapped an SkImageGenerator (with an SkImageCacherator stuck in
the middle). We could choose to rename either one, but SkImageGenerator is
public, so take the easy road and rename the private image subclass. Given
the existence of SkImage::isLazyGenerated, this name seems appropriate.

Bug: skia:
Change-Id: I061ece94f48538efb1dc5548010f6ca7d438a69b
Reviewed-on: https://skia-review.googlesource.com/13979
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-04-20 18:19:56 +00:00
Leon Scroggins
434b6e81a5 Revert "Make SkPngCodec only read as much of the stream as necessary"
This reverts commit 2c65d51612.

Reason for revert: Causing failures in Google3 (https://test.corp.google.com/ui#cl=153703311&flags=CAMQAg==&id=OCL:153703311:BASE:153703364:1492695824938:4db2240d&t=//chrome/skia/dm_wrapper:dm_wrapper) and differences in Gold. This change was not intended to change the output.

Original change's description:
> Make SkPngCodec only read as much of the stream as necessary
> 
> Previously, SkPngCodec assumed that the stream only contained one
> image, which ended at the end of the stream. It read the stream in
> arbitrarily-sized chunks, and then passed that data to libpng for
> processing.
> 
> If a stream contains more than one image, this may result in reading
> beyond the end of the image, making future reads read the wrong data.
> 
> Now, SkPngCodec starts by reading 8 bytes at a time. After the
> signature, 8 bytes is enough to know which chunk is next and how many
> bytes are in the chunk.
> 
> When decoding the size, we stop when we reach IDAT, and when decoding
> the image, we stop when we reach IEND.
> 
> This manual parsing is necessary to support APNG, which is planned in
> the future. It also allows us to remove the SK_GOOGLE3_PNG_HACK, which
> was a workaround for reading more than necessary at the beginning of
> the image.
> 
> Add a test that simulates the issue, by decoding a special stream that
> reports an error if the codec attempts to read beyond the end.
> 
> Temporarily disable the partial decoding tests for png. A larger change
> will be necessary to get those working again, and no clients are
> currently relying on incrementally decoding PNGs (i.e. decode part of
> an image, then decode further with more data).
> 
> Bug: skia:5368
> BUG:34073812
> 
> Change-Id: If832f7b20565411226fb5be3c305a4d16bf9269d
> Reviewed-on: https://skia-review.googlesource.com/13900
> Commit-Queue: Leon Scroggins <scroggo@google.com>
> Reviewed-by: Matt Sarett <msarett@google.com>
> 

TBR=msarett@google.com,scroggo@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I2f82e9960dda7bf5c646774df84320dadb7b930e
Reviewed-on: https://skia-review.googlesource.com/13971
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-04-20 15:07:23 +00:00
Leon Scroggins III
2c65d51612 Make SkPngCodec only read as much of the stream as necessary
Previously, SkPngCodec assumed that the stream only contained one
image, which ended at the end of the stream. It read the stream in
arbitrarily-sized chunks, and then passed that data to libpng for
processing.

If a stream contains more than one image, this may result in reading
beyond the end of the image, making future reads read the wrong data.

Now, SkPngCodec starts by reading 8 bytes at a time. After the
signature, 8 bytes is enough to know which chunk is next and how many
bytes are in the chunk.

When decoding the size, we stop when we reach IDAT, and when decoding
the image, we stop when we reach IEND.

This manual parsing is necessary to support APNG, which is planned in
the future. It also allows us to remove the SK_GOOGLE3_PNG_HACK, which
was a workaround for reading more than necessary at the beginning of
the image.

Add a test that simulates the issue, by decoding a special stream that
reports an error if the codec attempts to read beyond the end.

Temporarily disable the partial decoding tests for png. A larger change
will be necessary to get those working again, and no clients are
currently relying on incrementally decoding PNGs (i.e. decode part of
an image, then decode further with more data).

Bug: skia:5368
BUG:34073812

Change-Id: If832f7b20565411226fb5be3c305a4d16bf9269d
Reviewed-on: https://skia-review.googlesource.com/13900
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
2017-04-20 13:40:17 +00:00
Greg Daniel
c819e66993 Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h
This change is needed since once we start getting support for varrying of extensions
and newer version support in general, we need a common vulkan header to compile off of.
Otherwise we will run into problems if clients have older headers that don't include
functions/symbols we are trying to use.

Additionally it has the benefit of not needing to add if SK_VULKAN around code in
include which wants to use vulkan symbols.

This is a reland of the reverted cl: https://skia-review.googlesource.com/13804

Bug: skia:
Change-Id: I9023e80e60d2f2ebbdc8e794ec46d6f5c5c7c917
Reviewed-on: https://skia-review.googlesource.com/13874
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-04-20 13:09:27 +00:00
Mike Klein
d0ce148ed4 test and fix f16<->f32 conversion stages
This refactors from_half() and to_half() a bit, totally
reimplementing the non-hardware cases to be more clearly correct.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Android-Clang-PixelC-CPU-TegraX1-arm64-Release-Android,Test-Android-Clang-Ci20-CPU-IngenicJZ4780-mipsel-Release-Android,Test-Android-Clang-Nexus10-CPU-Exynos5250-arm-Release-Android,Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Release,Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug,Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug

Change-Id: I439463cf90935c5e8fe2369cbcf45e07f3af62c7
Reviewed-on: https://skia-review.googlesource.com/13921
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Matt Sarett <msarett@google.com>
2017-04-20 12:49:03 +00:00
Herb Derby
ecc364c426 Remove SkOpTAllocator
Have the callsites of SkOpTAllocator call SkArenaAlloc directly.

Bug: skia:
Change-Id: Ic54e92c3e9a0abed038aa3ae40e8a195895af99d
Reviewed-on: https://skia-review.googlesource.com/13870
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2017-04-19 20:36:15 +00:00
Mike Klein
8f2911f840 add unit tests for parametric_* stages
Change-Id: I7fab6d1c7240c17f2cc8436e8c6e7c8d2df940bb
Reviewed-on: https://skia-review.googlesource.com/13814
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-04-19 17:39:48 +00:00
Greg Daniel
5238f994bf Revert "Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h"
This reverts commit 3a3bc42b7d.

Reason for revert: still breaking android

Original change's description:
> Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h
> 
> This change is needed since once we start getting support for varrying of extensions
> and newer version support in general, we need a common vulkan header to compile off of.
> Otherwise we will run into problems if clients have older headers that don't include
> functions/symbols we are trying to use.
> 
> Additionally it has the benefit of not needing to add if SK_VULKAN around code in
> include which wants to use vulkan symbols.
> 
> This is a reupload of CL: https://skia-review.googlesource.com/13651
> 
> Bug: skia:
> Change-Id: I091f526b8c4a61774c34834cd7bfb7e2c822ff5c
> Reviewed-on: https://skia-review.googlesource.com/13804
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> 

TBR=djsollen@google.com,egdaniel@google.com,mtklein@google.com,jvanverth@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ic595e32005761170156499cfb6efc1acfce96001
Reviewed-on: https://skia-review.googlesource.com/13806
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-04-19 14:44:47 +00:00
Greg Daniel
3a3bc42b7d Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h
This change is needed since once we start getting support for varrying of extensions
and newer version support in general, we need a common vulkan header to compile off of.
Otherwise we will run into problems if clients have older headers that don't include
functions/symbols we are trying to use.

Additionally it has the benefit of not needing to add if SK_VULKAN around code in
include which wants to use vulkan symbols.

This is a reupload of CL: https://skia-review.googlesource.com/13651

Bug: skia:
Change-Id: I091f526b8c4a61774c34834cd7bfb7e2c822ff5c
Reviewed-on: https://skia-review.googlesource.com/13804
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-04-19 13:58:52 +00:00
Greg Daniel
df07ddd1f0 Revert "Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h"
This reverts commit edbb7d8860.

Reason for revert: breaking android

Original change's description:
> Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h
> 
> This change is needed since once we start getting support for varrying of extensions
> and newer version support in general, we need a common vulkan header to compile off of.
> Otherwise we will run into problems if clients have older headers that don't include
> functions/symbols we are trying to use.
> 
> Additionally it has the benefit of not needing to add if SK_VULKAN around code in
> include which wants to use vulkan symbols.
> 
> Bug: skia:
> Change-Id: I674a253308596dc75bd23574984ae933923679f9
> Reviewed-on: https://skia-review.googlesource.com/13651
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> 

TBR=mtklein@chromium.org,egdaniel@google.com,mtklein@google.com,jvanverth@google.com,bsalomon@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I179647e6ae213b1b17a9c42ced5e98c6599b96c2
Reviewed-on: https://skia-review.googlesource.com/13774
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-04-19 01:22:52 +00:00
Greg Daniel
9440345a81 Add backend safe classes for passing in external texture and render targets into gpu
This CL adds the GrBackend* classes as well as just updates the API for SkSurface and
SkImage. The implementation on SkSurface/Image and the plumbing down into Ganesh will
be in an additional CL.

Besides the change to use the type safe classes, we also pull the SurfaceFlags, origin,
samples, out of the descriptor and pass those in directly.

Bug: skia:
Change-Id: I9702981fe26c3d5d7d2cbcf6977ba569d356d854
Reviewed-on: https://skia-review.googlesource.com/13122
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-04-18 20:33:58 +00:00
Herb Derby
3f4531d312 Remove SkVarAlloc
Change-Id: Id41d3e03390185f72b682225aeb140df45c84a34
Reviewed-on: https://skia-review.googlesource.com/13763
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-04-18 19:43:42 +00:00
Greg Daniel
edbb7d8860 Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h
This change is needed since once we start getting support for varrying of extensions
and newer version support in general, we need a common vulkan header to compile off of.
Otherwise we will run into problems if clients have older headers that don't include
functions/symbols we are trying to use.

Additionally it has the benefit of not needing to add if SK_VULKAN around code in
include which wants to use vulkan symbols.

Bug: skia:
Change-Id: I674a253308596dc75bd23574984ae933923679f9
Reviewed-on: https://skia-review.googlesource.com/13651
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-04-18 19:35:22 +00:00
Mike Reed
15bff50a62 remove unneeded android flag for lockpixels
Bug: skia:6481
Change-Id: I6f9e299b34f396fbab892a4f91d3c4265c7c0ae2
Reviewed-on: https://skia-review.googlesource.com/13762
Reviewed-by: Mike Reed <reed@google.com>
2017-04-18 19:01:26 +00:00
Mike Reed
4edb5d219e hide lockpixels api behind flag
guarded by SK_SUPPORT_OBSOLETE_LOCKPIXELS

needs https://codereview.chromium.org/2820873002/# to land first
Bug: skia:6481
Change-Id: I1c39902cbf6fe99f622adfa8192733b95f7fea09

Change-Id: I1c39902cbf6fe99f622adfa8192733b95f7fea09
Reviewed-on: https://skia-review.googlesource.com/13580
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-04-17 15:33:36 +00:00
Mike Reed
818580d81b remove code directly involved in lock/unlock in SkPixelRef
Bug: skia:6481
Change-Id: I3c301ad42b082e04e233aa32d77862036fe998fa
Reviewed-on: https://skia-review.googlesource.com/13463
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-04-13 20:44:24 +00:00
Mike Reed
79f2db2a21 remove old-pixelref-api flag from android
call sites have been updated in master

Bug: skia:6481
Change-Id: I7f341cb511126a71fe3077bed3eaa55dc7ff76c3
Reviewed-on: https://skia-review.googlesource.com/13440
Reviewed-by: Mike Reed <reed@google.com>
2017-04-13 18:10:55 +00:00
Mike Reed
1335a0561e remove dead code around replayClips
Bug: skia:
Change-Id: I208bf41846265524d86f65de660311199fefc158
Reviewed-on: https://skia-review.googlesource.com/13338
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-04-13 15:42:09 +00:00
Greg Daniel
50130e427c Allow including of vulkan.h as a required public api when using vulkan.
Bug: skia:
Change-Id: I3ac382edc12144dcda9ef168f752b14878e0e5ac
Reviewed-on: https://skia-review.googlesource.com/13262
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-04-12 18:24:25 +00:00
Matt Sarett
547a7272fa Fix SkLocalMatrixShader::isAImage() to respect local matrix and image local matrix
Fixes cts tests.

b/37161109
b/37237678

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN

Bug: skia:
Change-Id: I438b8b17f4c7c5bfcb50dfa22af1ddb97b905088
Reviewed-on: https://skia-review.googlesource.com/13261
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-04-12 16:36:51 +00:00
Matt Sarett
e5fec21787 Revert "Fix SkLocalMatrixShader::isAImage() to respect local matrix and image local matrix"
This reverts commit e5efa51b2a.

Reason for revert: MSAN

Original change's description:
> Fix SkLocalMatrixShader::isAImage() to respect local matrix and image local matrix
> 
> Fixes cts tests.
> 
> b/37161109
> b/37237678
> 
> Bug: skia:
> Change-Id: Ida9ac5e4261e8a6b22e8cdc0e585e0e7929dbbfd
> Reviewed-on: https://skia-review.googlesource.com/13249
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> 

TBR=mtklein@chromium.org,mtklein@google.com,msarett@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I2b78c7b32997344136c784dc77675dafca37565e
Reviewed-on: https://skia-review.googlesource.com/13259
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-04-12 15:49:51 +00:00
Matt Sarett
e5efa51b2a Fix SkLocalMatrixShader::isAImage() to respect local matrix and image local matrix
Fixes cts tests.

b/37161109
b/37237678

Bug: skia:
Change-Id: Ida9ac5e4261e8a6b22e8cdc0e585e0e7929dbbfd
Reviewed-on: https://skia-review.googlesource.com/13249
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-04-12 15:11:03 +00:00
Mike Reed
a00f347747 switch over to no lockPixels in pixelref
Bug: skia:6481
Change-Id: I7c32d2e6dcd4c9cd8aa761ac5c4794c916eb650a
Reviewed-on: https://skia-review.googlesource.com/13193
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-04-12 00:12:00 +00:00
Brian Salomon
7b29749c13 constexprify GrBlend.h and GrPorterDuffXferProcessor.cpp
Also remove some unused functions from GrBlend.h and related unit test.

Bug: skia:
Change-Id: Id8ad0057a02f65a9e19dc75e4b88709a762f4139
Reviewed-on: https://skia-review.googlesource.com/12623
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-04-10 16:27:36 +00:00
Mike Klein
28f5b779a3 stop disabling threadsafe statics
Chrome's got threadsafe statics, Android too, Flutter too, and heck, we even have them on all our Windows builds.  No one responded to my mail about them.  Let's stop turning them off on not-Windows!

Change-Id: Iadf00336aa73df3f694ac019c9d54a3f2257a3bd
Reviewed-on: https://skia-review.googlesource.com/11683
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-04-07 14:54:29 +00:00
Mike Reed
93b1b4feda add guard for obsolete (non-functioning) replayClips
replayClips has been disabled (broken) for a while.
This CL just attempts to hide the api (will remove
once android's callsite is removed)

Bug: skia:
Change-Id: I35b412addfc0a08ea888a62609888b9b54dce2a6
Reviewed-on: https://skia-review.googlesource.com/11401
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-04-06 12:53:21 +00:00
Mike Reed
45a00cee88 remove android legacy flags
relies on https://googleplex-android-review.git.corp.google.com/#/c/2060523/ landing first

Bug: skia:
Change-Id: I603c8e0835235e9d81bd0a5a559cb5ab5b5cfd56
Reviewed-on: https://skia-review.googlesource.com/11350
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-04-05 17:45:49 +00:00
Mike Klein
9e4d51126f remove -mdspr2
I set -mdspr2 unconditionally on 32-bit MIPS builds only to not have to
deal with setting it conditionally on the source files specifically
requiring those instructions.

Since then, I've deleted all the source files specifically requiring
-mdspr2 (and -mdsp).  No one understood them and they were only
accelerating really uninteresting cases, like 565 blits.

So, we haven't needed -mdspr2 anywhere for a while, and removing it
will unblock running these builds on the CI20 dev boards, which
support neither -mdsp nor -mdsp2.

BUG=skia:1437

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Ubuntu-Clang-mipsel-Debug-Android,Build-Ubuntu-Clang-mipsel-Release-Android

Change-Id: Idda56fd8bb37ba064b78b4cddd8878b37dfe9502
Reviewed-on: https://skia-review.googlesource.com/11284
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-04-04 19:33:43 +00:00
Mike Reed
793dccf6b2 remove canvas-helpers flag for android
Bug: skia:
Change-Id: Ib468815ddd71fcd19ef27f93384bd8e1634121f4
Reviewed-on: https://skia-review.googlesource.com/11241
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-04-04 19:03:15 +00:00
Mike Reed
6b3155c4be Revert[4] "clean up (partially) colortable api""""
Fixes:
- create temp api for android to pass nullptr
- don't release and access sk_sp<SkData> at the same time in parameters

This reverts commit b14131c185.

Bug: skia:
Change-Id: Ic0e4f62520ba9f35455499ed30d306ad19d998a8
Reviewed-on: https://skia-review.googlesource.com/11129
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
2017-04-03 19:29:38 +00:00
Mike Reed
887cdf1128 move vertex-mode enum into SkVertices
BUG=skia:6366

Change-Id: I3c0bf96cce6d32c9b8d12d16a772aaa6f18981aa
Reviewed-on: https://skia-review.googlesource.com/11062
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-04-03 15:50:16 +00:00
Yuqian Li
b55dd55312 Add SkThreadedBMPDevice for Threaded Raster Backend
BUG=skia:

Change-Id: I882b6563c735796f3a4dcd19f6c79e7efd8306ae
Reviewed-on: https://skia-review.googlesource.com/10505
Commit-Queue: Yuqian Li <liyuqian@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-04-03 15:42:15 +00:00
Matt Sarett
e684483408 Avoid extra bitmap copies in SkColorSpaceXformCanvas
Before:
ColorCanvasDrawBitmap_sRGB_to_sRGB     5.09us
ColorCanvasDrawBitmap_AdobeRGB_to_sRGB 50.7us

After:
ColorCanvasDrawBitmap_sRGB_to_sRGB     2.43us
ColorCanvasDrawBitmap_AdobeRGB_to_sRGB 37.1us

BUG=skia:6456
Change-Id: Ie382936c36fd347b59485882cf8f27f315a5d35f

Change-Id: Ie382936c36fd347b59485882cf8f27f315a5d35f
Reviewed-on: https://skia-review.googlesource.com/11040
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-04-03 15:35:55 +00:00
Mike Reed
b14131c185 Revert "Revert[2] "clean up (partially) colortable api"""
This reverts commit 9920b10f52.

Reason for revert: trying to get details on w2k failure

https://chromium-swarm.appspot.com/task?id=354345d34ba3b310&refresh=10

Caught exception 3221225477 EXCEPTION_ACCESS_VIOLATION, was running:
	unit test  HugeBlurImageFilter
	unit test  FontNames
	unit test  Codec_PngRoundTrip
	unit test  ClampRange
	unit test  FontHost
	unit test  ColorMatrixFilter
	f16 image scaled_codec_premul abnormal.wbmp
	565 image brd_android_codec_divisor_0.167 interlaced3.png_0.167
	unit test  Codec_png
	unit test  ImageFilterBlurLargeImage
	unit test  FontObj
	unit test  DrawText
	unit test  GrShape
	565 image brd_android_codec_divisor_0.333 interlaced2.png_0.333
	unit test  PathOpsOpCubicsThreaded
	unit test  PathOpsOpLoopsThreaded
	unit test  FontMgr
	unit test  ColorToHSVRoundTrip
	unit test  Image_Serialize_Encoding_Failure
Likely culprit:
	unit test  Image_Serialize_Encoding_Failure
step returned non-zero exit code: -1073741819


Original change's description:
> Revert[2] "clean up (partially) colortable api""
> 
> This reverts commit 1d1165ca65.
> 
> Bug: skia:
> Change-Id: Idbc0634ae3cec2e79f592d252de8751b077e6408
> Reviewed-on: https://skia-review.googlesource.com/11024
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
> 

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

Change-Id: Ia4e73434b083224baa36092c69526c2f59bb16aa
Reviewed-on: https://skia-review.googlesource.com/11025
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-04-01 17:21:52 +00:00
Mike Reed
9920b10f52 Revert[2] "clean up (partially) colortable api""
This reverts commit 1d1165ca65.

Bug: skia:
Change-Id: Idbc0634ae3cec2e79f592d252de8751b077e6408
Reviewed-on: https://skia-review.googlesource.com/11024
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-04-01 16:46:11 +00:00
Ethan Nicholas
0df1b04db8 skslc can now be compiled with no Skia dependencies, in preparation for its eventual
This reverts commit 9bd301d640.

Bug: skia:
Change-Id: I5ad3f77ef33aa5ce2fd27fe383c9339c571663a1
Reviewed-on: https://skia-review.googlesource.com/10964
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-03-31 18:49:51 +00:00
Mike Klein
1d1165ca65 Revert "clean up (partially) colortable api"
This reverts commit 2e491a6a11.

Reason for revert: Windows unit tests failing?

Original change's description:
> clean up (partially) colortable api
> 
> Needs this to land: https://codereview.chromium.org/2789853002/
> 
> Bug: skia:
> Change-Id: I38d916a546b7fa64d000d973e695ddda24a589e7
> Reviewed-on: https://skia-review.googlesource.com/10600
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Matt Sarett <msarett@google.com>
> 

TBR=msarett@google.com,scroggo@google.com,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I626e7edfcea82576a440dcaa851a04cedee6233f
Reviewed-on: https://skia-review.googlesource.com/10966
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-03-31 16:45:09 +00:00
Ethan Nicholas
9bd301d640 Revert "skslc can now be compiled with no Skia dependencies, in preparation for its eventual"
This reverts commit f3333c89bf.

Reason for revert: breaking the bots

Original change's description:
> skslc can now be compiled with no Skia dependencies, in preparation for its eventual
> role in Skia's build process.
> 
> This reverts commit bcf35f86d5.
> 
> BUG=skia:
> 
> Change-Id: Id0a12dfc4d804d69a3c6bf60fed37e89ee130f02
> Reviewed-on: https://skia-review.googlesource.com/10802
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Ben Wagner <benjaminwagner@google.com>
> 

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

Change-Id: Ic7b50d391d25b3870acffa9764cbafc7f5c3be89
Reviewed-on: https://skia-review.googlesource.com/10962
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-03-31 16:04:41 +00:00
Mike Reed
2e491a6a11 clean up (partially) colortable api
Needs this to land: https://codereview.chromium.org/2789853002/

Bug: skia:
Change-Id: I38d916a546b7fa64d000d973e695ddda24a589e7
Reviewed-on: https://skia-review.googlesource.com/10600
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
2017-03-31 15:39:31 +00:00
Ethan Nicholas
f3333c89bf skslc can now be compiled with no Skia dependencies, in preparation for its eventual
role in Skia's build process.

This reverts commit bcf35f86d5.

BUG=skia:

Change-Id: Id0a12dfc4d804d69a3c6bf60fed37e89ee130f02
Reviewed-on: https://skia-review.googlesource.com/10802
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
2017-03-31 15:25:32 +00:00
Mike Klein
0a64e32f39 Turn on SkJumper all the time, try 2.
Rebased on top of _win.S change, which I hope lands first.

CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel,win_chrome_official,win_chromium_dbg_ng,win_chromium_rel_ng,win_chromium_compile_dbg_ng,win_chromium_compile_rel_ng,win_clang;master.tryserver.chromium.android:android_optional_gpu_tests_rel

Change-Id: I30e97dbb55b8a42251b46f5607096ca12bc670b9
Reviewed-on: https://skia-review.googlesource.com/10462
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
2017-03-30 20:15:11 +00:00
Mike Klein
5f80485a53 make _win.S know if it's 64-bit
I think this is the root of my Windows / Chrome problems.
Even on 32-bit builds, Chrome compiles nacl64.exe in 64-bit mode.

So to make things simple, always put _win.S in the sources,
and no-op it away when assembling for 32-bit.

Change-Id: I19f163491739a6c0cbdedd0ce353f1d2289907ae
Reviewed-on: https://skia-review.googlesource.com/10637
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-03-30 18:45:19 +00:00
Ethan Nicholas
bcf35f86d5 Revert "skslc can now be compiled with no Skia dependencies, in preparation for"
This reverts commit 7833466da4.

Reason for revert: Vulkan assertion failure

Original change's description:
> skslc can now be compiled with no Skia dependencies, in preparation for
> its eventual role in Skia's build process.
> 
> Bug: skia:
> Change-Id: Iaa9933f4fc4a64bec60aa897c509a3513f457a78
> Reviewed-on: https://skia-review.googlesource.com/10282
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Ben Wagner <benjaminwagner@google.com>
> 

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

Change-Id: Ic64cac2395abb406116885ddd725f74a434c8c49
Reviewed-on: https://skia-review.googlesource.com/10758
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-03-30 18:42:59 +00:00
Ethan Nicholas
7833466da4 skslc can now be compiled with no Skia dependencies, in preparation for
its eventual role in Skia's build process.

Bug: skia:
Change-Id: Iaa9933f4fc4a64bec60aa897c509a3513f457a78
Reviewed-on: https://skia-review.googlesource.com/10282
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
2017-03-30 18:28:47 +00:00
Matt Sarett
cdc651d29d Make xformer class for SkCSXCanvas, use for draw loopers
Fixes draw looper gms in gbr-8888 config.

Bug: skia:
Change-Id: I0a9306cc0523c82f2ad9516752d79c1d86b1e295
Reviewed-on: https://skia-review.googlesource.com/10644
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-03-30 18:02:58 +00:00
Brian Salomon
a811b1200c Renames of processor analysis-related classes and method.
GrProcesserSet::FragmentProcessorAnalysis->GrProcessorSet::Analysis
GrPipelineAnalysisColor->GrProcessorAnalysisColor
GrPipelineAnalysisCoverage->GrProcessorAnalysisCoverage
GrMeshDrawOp::getFragmentProcessorAnalysisInputs->GrMeshDrawOp::getProcessorAnalysisInputs

Change-Id: I28ad19dfab5f4ac1788c4eacdec5e1af2a701dd0
Reviewed-on: https://skia-review.googlesource.com/10747
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-03-30 15:19:53 +00:00
Kevin Lubick
2677a9a135 Add extra_asmflags
This makes it easier to cross-compile for non-Android ARM (e.g. Raspberry PI)

Bug: skia:
Change-Id: I4414d933bc38d56009aefcbe10e68f7c70964d9c
Reviewed-on: https://skia-review.googlesource.com/10291
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-03-28 20:39:17 +00:00
Matt Sarett
56ea77ac5f Implement SkBlurDrawLooper with SkLayerDrawLooper
This allows us to delete SkBlurDrawLooper (and leave only one draw
looper implementation).

BUG=skia:

Change-Id: I549af86b81babf19e3649bdffffe2fdb0b308d5a
Reviewed-on: https://skia-review.googlesource.com/10101
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2017-03-28 19:29:00 +00:00
Mike Klein
8cb66485e5 turn on hidden visibility flags on iOS
These new images came up when I turned them off the other day:

https://gold.skia.org/search?blame=eec23d113149569414e325ac6fd5a9253945628b&fdiffmax=-1&fref=false&frgbamax=-1&head=true&include=false&limit=50&match=gamma_correct&match=name&metric=combined&neg=false&pos=false&query=source_type%3Dgm&sort=desc&unt=true

Some sort of ODR problem?  :/

Change-Id: I9b2575948c3bd5710476e6501e8ec27933c277f6
Reviewed-on: https://skia-review.googlesource.com/10287
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-03-28 18:37:09 +00:00
Robert Phillips
a2cedff029 Fix gaussianedge GM
Change-Id: Ia4523ea13992b325cb59f42e4458a199c7a98c4b
Reviewed-on: https://skia-review.googlesource.com/10219
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-03-28 16:36:54 +00:00
csmartdalton
8c67909e04 Add a simple tool for isolating a path from an SKP
BUG=skia:

Change-Id: I5ca9bbd43919e3f65ea940847c68f85cc78dfeda
Reviewed-on: https://skia-review.googlesource.com/10130
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2017-03-27 19:19:19 +00:00
Herb Derby
b549cc38c8 Change SkMemory to the more accurately named SkMalloc.
Change-Id: I6b08a74234b99bac866bad71014b94f7ec2d4bc8
Reviewed-on: https://skia-review.googlesource.com/10188
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-03-27 18:13:07 +00:00
Brian Salomon
c0b642ca48 Split GrPipelineInput into separate color and coverage types, the latter of which is just an enum.
Assign names that indicate that they aren't just for the input phase since I plan to use them at the boundary between FPs and XPs as well.

Renamed GrProcOptInfo to GrColorFragmentProcessorAnalysis. This is now only used on the color side and the new name seems clearer to me.

Change GrMeshDrawOp::getFragmentProcessorAnalysisInputs to use the new color/coverage types directly rather than a class that has been reduced to simply bundling them together.

Change-Id: If93bae74c9d590486eecdf63f302418c96deab65
Reviewed-on: https://skia-review.googlesource.com/10161
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-03-27 17:45:29 +00:00
Robert Phillips
51e7ca31ce Add new proxy-based DetermineDomainMode w/ test
split out of: https://skia-review.googlesource.com/c/8823/ (Remove GrFragmentProcessor-derived class' GrTexture-based ctors)


Change-Id: Ibf54da589710382254b416e4801d83e9f5663f44
Reviewed-on: https://skia-review.googlesource.com/10180
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-03-27 14:57:56 +00:00
Mike Klein
eec23d1131 focus hidden-visibility flags
This makes things like dladdr and backtrace_symbols not totally useless on Linux.

Change-Id: I26666a76c5b50fbf88aaf9709c869de0a697bb02
Reviewed-on: https://skia-review.googlesource.com/10176
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-03-27 12:50:16 +00:00
Brian Salomon
ab664fa5b5 Revert "Revert "Create new inset algorithm for spot shadows""
This reverts commit e7c85c45c4.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Revert "Create new inset algorithm for spot shadows"
> 
> This reverts commit e5f5bf5175.
> 
> Reason for revert: Breaking a bunch of bots. e.g:
> 
> https://luci-milo.appspot.com/swarming/task/3519cae0a03c7b10/steps/dm/0/stdout
> 
> Original change's description:
> > Create new inset algorithm for spot shadows
> > 
> > BUG=skia:
> > 
> > Change-Id: If7c67c2a5b9beea28f86d13362a5156b46394d0e
> > Reviewed-on: https://skia-review.googlesource.com/9875
> > Commit-Queue: Ravi Mistry <rmistry@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> > 
> 
> TBR=jvanverth@google.com,bsalomon@google.com,rmistry@google.com,robertphillips@google.com,msarett@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
> 
> Change-Id: I3d119ff631dbb1a41f873b9c8753d542ec91254e
> Reviewed-on: https://skia-review.googlesource.com/10112
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> 

TBR=jvanverth@google.com,bsalomon@google.com,rmistry@google.com,msarett@google.com,robertphillips@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Change-Id: Ib3998300606d3a2e2fb3a14b2088cfad48363501
Reviewed-on: https://skia-review.googlesource.com/10113
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-03-24 16:07:27 +00:00
Brian Salomon
e7c85c45c4 Revert "Create new inset algorithm for spot shadows"
This reverts commit e5f5bf5175.

Reason for revert: Breaking a bunch of bots. e.g:

https://luci-milo.appspot.com/swarming/task/3519cae0a03c7b10/steps/dm/0/stdout

Original change's description:
> Create new inset algorithm for spot shadows
> 
> BUG=skia:
> 
> Change-Id: If7c67c2a5b9beea28f86d13362a5156b46394d0e
> Reviewed-on: https://skia-review.googlesource.com/9875
> Commit-Queue: Ravi Mistry <rmistry@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> 

TBR=jvanverth@google.com,bsalomon@google.com,rmistry@google.com,robertphillips@google.com,msarett@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Change-Id: I3d119ff631dbb1a41f873b9c8753d542ec91254e
Reviewed-on: https://skia-review.googlesource.com/10112
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-03-24 16:00:55 +00:00
Jim Van Verth
e5f5bf5175 Create new inset algorithm for spot shadows
BUG=skia:

Change-Id: If7c67c2a5b9beea28f86d13362a5156b46394d0e
Reviewed-on: https://skia-review.googlesource.com/9875
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-03-24 14:56:01 +00:00
Robert Phillips
a3bdd44aff Revert "Revert "Remove Android-specific SK_SUPPORT_LEGACY_IMG_SNAPSHOT flag""
This reverts commit fde9bff19c.

Reason for revert: RenderNodeDrawableTests.cpp fix has landed in Android

Original change's description:
> Revert "Remove Android-specific SK_SUPPORT_LEGACY_IMG_SNAPSHOT flag"
> 
> This reverts commit c3efe67856.
> 
> Reason for revert: RenderNodeDrawableTests.cpp
> 
> Original change's description:
> > Remove Android-specific SK_SUPPORT_LEGACY_IMG_SNAPSHOT flag
> > 
> > Android has been updated to use the new signature so this should no longer be needed
> > 
> > Change-Id: Id745191e815381d032aba6a49bf4baf9c53b2385
> > Reviewed-on: https://skia-review.googlesource.com/9985
> > Reviewed-by: Derek Sollenberger <djsollen@google.com>
> > Commit-Queue: Robert Phillips <robertphillips@google.com>
> > 
> 
> TBR=djsollen@google.com,robertphillips@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> 
> Change-Id: I0211342b237373fe40d205bb18bbef5efce56bf3
> Reviewed-on: https://skia-review.googlesource.com/9946
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> 

TBR=djsollen@google.com,robertphillips@google.com,reviews@skia.org
# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: Ia517aafc7c9c589d18c0e94699cad3f5acc0e941
Reviewed-on: https://skia-review.googlesource.com/10103
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-03-24 12:37:27 +00:00
csmartdalton
cc26127920 Find cubic KLM functionals directly
- Updates GrPathUtils to computes the KLM functionals directly instead
  of deriving them from their explicit values at the control points.
- Updates the utility to return these functionals as a matrix
  rather than an array of scalar values.
- Adds a benchmark for chopCubicAtLoopIntersection.

BUG=skia:

Change-Id: I97a9b5cf610d33e15c9af96b9d9a8eb4a94b1ca7
Reviewed-on: https://skia-review.googlesource.com/9951
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-03-23 21:05:45 +00:00
Robert Phillips
fde9bff19c Revert "Remove Android-specific SK_SUPPORT_LEGACY_IMG_SNAPSHOT flag"
This reverts commit c3efe67856.

Reason for revert: RenderNodeDrawableTests.cpp

Original change's description:
> Remove Android-specific SK_SUPPORT_LEGACY_IMG_SNAPSHOT flag
> 
> Android has been updated to use the new signature so this should no longer be needed
> 
> Change-Id: Id745191e815381d032aba6a49bf4baf9c53b2385
> Reviewed-on: https://skia-review.googlesource.com/9985
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> 

TBR=djsollen@google.com,robertphillips@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I0211342b237373fe40d205bb18bbef5efce56bf3
Reviewed-on: https://skia-review.googlesource.com/9946
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-03-22 14:18:15 +00:00
Robert Phillips
c3efe67856 Remove Android-specific SK_SUPPORT_LEGACY_IMG_SNAPSHOT flag
Android has been updated to use the new signature so this should no longer be needed

Change-Id: Id745191e815381d032aba6a49bf4baf9c53b2385
Reviewed-on: https://skia-review.googlesource.com/9985
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-03-22 13:13:14 +00:00
Hal Canary
27ecd86b61 SkImageSource::Make() returns nullptr when srcrect is empty.
BUG=skia:6389
Change-Id: Ia995da1f70cbbc0c80ab76385f0ea8cc0d48fa07
Reviewed-on: https://skia-review.googlesource.com/9943
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-03-21 22:04:36 +00:00
Hal Canary
271d495a68 check-headers-self-sufficient: update
* Translate to python, use multiprocessing to make it wun in reasonanble time.
  * Fix three headers.
  * Move one header.

Change-Id: I0b26f912bb8086ec158d1c0bae76b923ec6121a4
Reviewed-on: https://skia-review.googlesource.com/8490
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-03-21 15:28:12 +00:00
Robert Phillips
eb35f4dfaa Add pre-Flush callback to GrDrawingManager (take 2)
This will allow internal systems (e.g., fonts & path renderers) to create pre-flush atlases.

Depends on: https://skia-review.googlesource.com/c/8988/ (Allow GrSurfaceProxy-derived classes to use flags when instantiating)

Change-Id: I7ffc1b69defda625b6d4311e96776de4cf2abb87
Reviewed-on: https://skia-review.googlesource.com/9903
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-03-21 11:59:58 +00:00
Mike Reed
3130fbb1a7 remove SK_SUPPORT_LEGACY_DRAWVERTICES_VIRTUAL flag
BUG=skia:6366

Change-Id: If5e5bc2a65f2d8c66d7bef36cbb906c01225f80f
Reviewed-on: https://skia-review.googlesource.com/9940
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-21 10:11:35 +00:00
Ben Wagner
4e8472c529 Support vs2017.
Change-Id: Icb333d34705c86f6204a5265b645a2a215e60ad6
Reviewed-on: https://skia-review.googlesource.com/9624
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-03-21 02:37:06 +00:00
Mike Reed
18ea65a347 Revert "Revert "remove unused SkMeshUtils and SkBoundaryPatch""
This reverts commit 006c8da9c6.

Reason for revert: PDFium references have been removed

Original change's description:
> Revert "remove unused SkMeshUtils and SkBoundaryPatch"
> 
> This reverts commit 5e21e09919.
> 
> Reason for revert: Breaks Pdfium build see:
>     https://chromium-swarm.appspot.com/task?id=3504e60d4bc10810&refresh=10
> 
> Original change's description:
> > remove unused SkMeshUtils and SkBoundaryPatch
> > 
> > BUG=skia:6366
> > 
> > Change-Id: Ibacd397e0a246dbeefde074c98712ada3848a7b6
> > Reviewed-on: https://skia-review.googlesource.com/9852
> > Reviewed-by: Mike Reed <reed@google.com>
> > Commit-Queue: Mike Reed <reed@google.com>
> > 
> 
> TBR=djsollen@google.com,reed@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:6366
> 
> Change-Id: I2403bae0a17bce8eeec743c6f433bb51b214e669
> Reviewed-on: https://skia-review.googlesource.com/9891
> Reviewed-by: Stephan Altmueller <stephana@google.com>
> Commit-Queue: Stephan Altmueller <stephana@google.com>
> 

TBR=djsollen@google.com,reviews@skia.org,stephana@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:6366

Change-Id: Iefe14394a09c16bd0ad00807dbda947311f926e8
Reviewed-on: https://skia-review.googlesource.com/9910
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-20 20:53:12 +00:00
Herb Derby
d7b34a5ca0 Make SkMemory.h and adjust all files for usage.
This will be rolled out in three stages:
1) make SkMemory.h and have SkTypes.h include it.
2) Adjust chromium and android.
3) no long include SkMemory.h in SkTypes.h

Change-Id: If360ef5e1164d88f50b03f279e2e963ca2f57d5d
Reviewed-on: https://skia-review.googlesource.com/9874
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2017-03-20 18:40:49 +00:00
Ravi Mistry
f9bd468325 Make gn directory importable in python
This will make it possible to do
>>> from gn import gn_to_bp
instead of:
>>> sys.path.append('gn')
>>> import gn_to_bp
in the new Android autoroller

BUG=skia:5538

Change-Id: I4fe851247ab6dd5bc553b8315ad91281819fbc7e
Reviewed-on: https://skia-review.googlesource.com/9897
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2017-03-20 17:40:30 +00:00
Ben Wagner
09de753537 Move SkOSFile.h to src/core
Skia needs implementations (ports) of the declarations in this header,
but no one outside of Skia the library should use them.

Change-Id: I1b92eca787a61892d7b3c0ac8c5996774429ae24
Reviewed-on: https://skia-review.googlesource.com/9878
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2017-03-20 14:46:32 +00:00
Stephan Altmueller
006c8da9c6 Revert "remove unused SkMeshUtils and SkBoundaryPatch"
This reverts commit 5e21e09919.

Reason for revert: Breaks Pdfium build see:
    https://chromium-swarm.appspot.com/task?id=3504e60d4bc10810&refresh=10

Original change's description:
> remove unused SkMeshUtils and SkBoundaryPatch
> 
> BUG=skia:6366
> 
> Change-Id: Ibacd397e0a246dbeefde074c98712ada3848a7b6
> Reviewed-on: https://skia-review.googlesource.com/9852
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
> 

TBR=djsollen@google.com,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:6366

Change-Id: I2403bae0a17bce8eeec743c6f433bb51b214e669
Reviewed-on: https://skia-review.googlesource.com/9891
Reviewed-by: Stephan Altmueller <stephana@google.com>
Commit-Queue: Stephan Altmueller <stephana@google.com>
2017-03-20 14:23:11 +00:00
Mike Reed
6598564648 remove unsupported flag
BUG=skia:

Change-Id: I9483dd5ec9f53639d6b78cf864bfdff4d5c9a9b4
Reviewed-on: https://skia-review.googlesource.com/9886
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-20 14:06:13 +00:00
Robert Phillips
ac6b1fa2c8 Remove budgeted parameter from SkSurface::makeImageSnapshot (take 2)
This unused feature complicates MDB.

Chrome compiles locally for me with this CL.
frameworks/base/libs/hwui compiles locally for me with this CL.

Change-Id: Id3ad64dac72eace52855896df0d7ce3679f15884
Reviewed-on: https://skia-review.googlesource.com/9882
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-03-20 13:50:35 +00:00
Mike Reed
5e21e09919 remove unused SkMeshUtils and SkBoundaryPatch
BUG=skia:6366

Change-Id: Ibacd397e0a246dbeefde074c98712ada3848a7b6
Reviewed-on: https://skia-review.googlesource.com/9852
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-20 12:40:31 +00:00
Mike Reed
795c5ea657 don't use deprecated (raw) form of SkPatchUtils, delete duplicate util
deprecated API still used in android -- will fix (and then delete)

BUG=skia:6366

Change-Id: Icd87acc680f7c8ae66ac231cb5d254f5eb178008
Reviewed-on: https://skia-review.googlesource.com/9864
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-17 19:28:45 +00:00
Mike Reed
9bb0a28b84 add flag for android
BUG=skia:6366

Change-Id: I2b250ed32442379e3e14ab2dc805ac9ccdc57e93
NOTRY=True
Reviewed-on: https://skia-review.googlesource.com/9866
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-17 19:17:39 +00:00
Jim Van Verth
830104632f Rename GrAADistanceFieldPathRenderer to GrSmallPathRenderer
Also disables use of small distance fields in Android framework.

Change-Id: I1ba40ce85aa34d067608587e1fbe1d42e8a42868
Reviewed-on: https://skia-review.googlesource.com/9731
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2017-03-16 13:22:31 +00:00
Robert Phillips
18ea816aad Revert "Add pre-Flush callback to GrDrawingManager"
This reverts commit d222ec492f.

Reason for revert: TegraX1 Vulkan bot

Original change's description:
> Add pre-Flush callback to GrDrawingManager
> 
> This will allow internal systems (e.g., fonts & path renderers) to create pre-flush atlases.
> 
> Depends on: https://skia-review.googlesource.com/c/8988/ (Allow GrSurfaceProxy-derived classes to use flags when instantiating)
> 
> Change-Id: I307796595d651cf376838bff1f9e4385c3753547
> Reviewed-on: https://skia-review.googlesource.com/8679
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> 

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

Change-Id: I852648adc12d2aa58cd09c57d961c340d657776c
Reviewed-on: https://skia-review.googlesource.com/9735
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-03-15 18:41:31 +00:00
Robert Phillips
d222ec492f Add pre-Flush callback to GrDrawingManager
This will allow internal systems (e.g., fonts & path renderers) to create pre-flush atlases.

Depends on: https://skia-review.googlesource.com/c/8988/ (Allow GrSurfaceProxy-derived classes to use flags when instantiating)

Change-Id: I307796595d651cf376838bff1f9e4385c3753547
Reviewed-on: https://skia-review.googlesource.com/8679
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-03-15 17:54:16 +00:00
Brian Osman
63954c9944 GPU version of onMakeColorSpace
New fragment processor that implements end-to-end
color space conversion, with nonlinear blending.

BUG=skia:6242

Change-Id: Ied86170fc28537a2bc209d57530d3ded48b467a9
Reviewed-on: https://skia-review.googlesource.com/9543
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-03-15 12:52:03 +00:00
Matthew Leibowitz
3150ec6be9 Added support for building for tvOS
This change is just to add support for building for tvOS.
It is exactly the same as iOS, just using a different SDK.

I had to change the two lines for libjpeg-turbo so that
it will run for both tvOS and iOS.

BUG=skia:

Change-Id: I6ae5fc4257df74c0f321e5d2d71584f6a52ec3a6
Reviewed-on: https://skia-review.googlesource.com/9660
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-03-14 22:55:04 +00:00
Mike Reed
bdce9c2d73 vertices to/from data
precursor to enabling serialization in pictures

BUG=skia:6366

Change-Id: Iba89aa98f389b3281e7705d041e3337e89071f03
Reviewed-on: https://skia-review.googlesource.com/9680
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-14 18:40:40 +00:00
Mike Reed
97eb4feb11 add SkVertices::Builder
Possible next iterations:
- remove another allocation use the SkData trick to share
  the object and its (trailing) data
- store a bit that tells use to free each pointer, allowing
  the builder to "adopt" some allocations instead of copy.

Larger idea:
- merge with drawPoints to have a single object for both.

BUG=skia:6366

Change-Id: Iec33239aa2ad5d00b36469ca0b88934ddf6f22eb
Reviewed-on: https://skia-review.googlesource.com/9604
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-14 16:57:49 +00:00
Brian Salomon
0727f674bd Move GrSurfaceContext.h and GrTextureContext.h to src/gpu from include/gpu
Change-Id: I5b68650d2417018e217a2fef2f852316ebd9de6f
Reviewed-on: https://skia-review.googlesource.com/9637
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-03-14 13:33:04 +00:00
Mike Reed
6291863daf remove legacy clipop flag for android
BUG=skia:

Change-Id: Iaed145deec7680f30e25d1b62776bcba378de06b
Reviewed-on: https://skia-review.googlesource.com/9629
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-13 20:05:53 +00:00
Mike Klein
7a5e0f3847 Add iOS simulator support in GN.
This builds fine on my laptop, but fails to link on the bots,
so I'm leaving out a new Build bot for now.

BUG=skia:6329

Change-Id: I4b33770f13ab9dec914d090b45d9921b19ee2c9d
Reviewed-on: https://skia-review.googlesource.com/9519
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-03-13 17:21:43 +00:00
Mike Klein
841101d348 SkColorSpaceXformCanvas
TODO:
  images
  shaders
  color filters
  image filters
  a couple stray color arrays

Change-Id: Ib91639bb0a6a00af737dd5186180011fe5120860
Reviewed-on: https://skia-review.googlesource.com/9529
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-03-13 16:11:38 +00:00
Greg Daniel
fe71b9dd69 Add GrSemaphoreOp to support deferred semaphore use
This is a precursor to adding support for external drawable ops.

BUG=skia:

Change-Id: I3e8b06b4cbe2b5728b7911c22ee74a93d0813f98
Reviewed-on: https://skia-review.googlesource.com/9452
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-03-09 16:17:19 +00:00