Commit Graph

2326 Commits

Author SHA1 Message Date
Brian Salomon
42ad83ac19 Rename batch->op in GrAuditTrail.
Change-Id: I68670e5ceb06716e9928ee58485d63e157c7aca7
Reviewed-on: https://skia-review.googlesource.com/6345
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2016-12-20 21:50:09 +00:00
Brian Osman
2b25d348fe Tag string bitmaps (for GMs) as sRGB
These are often used as inputs when testing image filters, and we need
tagged inputs to test the color pipeline. To avoid changing legacy mode
results, rasterize the bitmaps in legacy, but tag the output.

BUG=skia:

Change-Id: I55e2c0e0061b3f50b1caa18c19ba4fcf92cdf902
Reviewed-on: https://skia-review.googlesource.com/6280
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
2016-12-20 16:39:05 +00:00
Robert Phillips
22f4a1fd48 Remove getDevice_just_for_deprecated_compatibility_test()
BUG=skia:6067

Change-Id: I646e75f43bc77ea884b7fad7281bf0b684996bb9
Reviewed-on: https://skia-review.googlesource.com/6299
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2016-12-20 14:39:45 +00:00
Brian Salomon
2ee084e730 Rename GrBatchAtlas -> GrDrawOpAtlas.
Change-Id: I776f37e42dcab8b16535c48df9c405b1f211f6c9
Reviewed-on: https://skia-review.googlesource.com/6165
Commit-Queue: Brian Salomon <brian@thesalomons.net>
Reviewed-by: Brian Osman <brianosman@google.com>
2016-12-17 00:35:39 +00:00
Brian Salomon
903da79a19 Rename GrBatchAtlas files to GrDrawOpAtlas
This intermediary change only exists to make the actual class rename change readable on gerrit due to gerrit not recognizing file renames correctly.

Change-Id: I919f84837fb17191ca49f00f82e56330f84766da
Reviewed-on: https://skia-review.googlesource.com/6190
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2016-12-16 23:50:06 +00:00
raftias
a97a60c8ec Added gamma visualizations to colorspaceinfo tool
Visualizations for gamma curves were added.
Tool now outputs at the end following 9 ='s a list of all output images.

BUG=skia:

Change-Id: Id934c4c8cceec68291527554c2c951be08593ef5
Reviewed-on: https://skia-review.googlesource.com/6085
Commit-Queue: Robert Aftias <raftias@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
2016-12-16 23:03:01 +00:00
Cary Clark
ab2d73b06f rework xor to be more like winding
Pathops is very well exercised with winding paths,
but less so with xor (even odd) paths.

Rewrite the xor main loop to look like the winding
one to take advantage of the latter's bug fixes.

TBR=reed@google.com
BUG=skia:6041

Change-Id: Ied8d522254a327b1817b54f0abbf4414f5fab7da
Reviewed-on: https://skia-review.googlesource.com/6228
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2016-12-16 22:47:00 +00:00
Brian Salomon
f856fd1ccd Rename GrBatchFontCache->GrAtlasGlyphCache
Change-Id: Ie21e18b631daa24e70df630b9f910213f62bdbdf
Reviewed-on: https://skia-review.googlesource.com/6164
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2016-12-16 19:48:35 +00:00
Leon Scroggins
427da6fcbb Revert "Remove all KTX support"
This reverts commit ada12ab055.

Reason for revert: Google3 needs it:
https://test.corp.google.com/ui#id=OCL:142184832:BASE:142184975:1481839118985:32fde8ef

Original change's description:
> Remove all KTX support
> 
> It is untested and unused.
> 
> Change-Id: I010ff4ad942738f362d42a99af4edbbb1cb0cd71
> Reviewed-on: https://skia-review.googlesource.com/6142
> Commit-Queue: Leon Scroggins <scroggo@google.com>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> 

TBR=mtklein@chromium.org,mtklein@google.com,robertphillips@google.com,scroggo@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I1ea2f9487eb2212efbfcc514122792b70c9e8737
Reviewed-on: https://skia-review.googlesource.com/6181
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2016-12-16 13:52:09 +00:00
Leon Scroggins III
ada12ab055 Remove all KTX support
It is untested and unused.

Change-Id: I010ff4ad942738f362d42a99af4edbbb1cb0cd71
Reviewed-on: https://skia-review.googlesource.com/6142
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2016-12-15 21:15:54 +00:00
Yuqian Li
ba62b4ae86 Change FLAGS_analyticAA's default to true
BUG=skia:

Change-Id: I1abf2284ed9dfaa69110c4fe86325c8e4ee43317
Reviewed-on: https://skia-review.googlesource.com/5767
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2016-12-14 19:53:43 +00:00
Cary Clark
ff11428526 more simplify bugs
SkOpAngle::alignmentSameSide()
Shifting an edge to align it for angle sorting may move a compared edge to the opposite side.
For lines that are shifted, check to see if this is so.  

class SkOpContourBuilder
If the path contains a pair of lines that cancel, skip them as early as possible.
While not strictly necessary, this optimization is cheap and makes debugging much easier.

SkOpEdgeBuilder::walk()
  case SkPath::kCubic_Verb:
If max curvature or inflections break a cubic into pieces, make sure that the pieces are
large enough to process. If not, add the broken piece back to a neighbor.

Correct debugging that had gone stale.
Add active span debugging cache so only changes are shown.

TBR=reed@google.com
BUG=skia:6401

Change-Id: I766f77e4fb9b76537cf5464961addb103114f5db
Reviewed-on: https://skia-review.googlesource.com/5764
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2016-12-14 17:26:58 +00:00
Hal Canary
1b3387b5cf SkBitmap::setPixelRef(): less reference churn
BUG=skia:

Change-Id: I9657e4af5fcc808f9175ff336155374ccc77999d
Reviewed-on: https://skia-review.googlesource.com/5461
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2016-12-12 20:18:50 +00:00
raftias
d737bee147 Updated the get_images_from_skps tool to check for ICC profile support
Tool will now check for and output all unsuccessfully parsed ICC
profiles in input sksp images if --testColorCorrectionSupported is set
as a flag. All ICC-aware codecs had to be slightly modified in order to
expose this information, as the logic for accessing the ICC profiles is
all within the codecs. If --writeFailedImages is set, it will also
output all images whoses ICC profiles were not supported.

TBR=reed@google.com

BUG=skia:

Change-Id: Ic310d82bdebf92f8d3bc0ad3dcc688136b6de377
Reviewed-on: https://skia-review.googlesource.com/5355
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Robert Aftias <raftias@google.com>
2016-12-12 17:06:41 +00:00
Mike Reed
ebfce6d9b4 change SkClipOp to a class enum
BUG=skia:

Change-Id: I25dbe6d6b8666a2a0a7be7bdd2ae0b067868d14e
Reviewed-on: https://skia-review.googlesource.com/5718
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2016-12-12 15:38:31 +00:00
Brian Salomon
1951f3ddbd Rename testingOnly_drawBatch to testingOnly_addDrawOp and sk_sp
Change-Id: I35efd4ad2b7132145c1e477f0b1f283276e9fad5
Reviewed-on: https://skia-review.googlesource.com/5704
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2016-12-09 22:28:31 +00:00
Brian Salomon
21aa35f0aa Make GrRenderTargetOpList::addDrawOp use sk_sp
Change-Id: I1b3aee2c16075bc481d96052a82f3b3da82061fe
Reviewed-on: https://skia-review.googlesource.com/5699
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2016-12-09 21:38:46 +00:00
Hal Canary
a4a3381790 tools and docs: clean up gyp-specific things
BUG=skia:

DOCS_PREVIEW= https://skia.org/?cl=5770

Change-Id: Iadc436a68cbf7ec0d1dd3c019072eb28bf589bb6
Reviewed-on: https://skia-review.googlesource.com/5770
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-12-09 21:15:27 +00:00
Brian Salomon
0e8fc8b9e6 Relandx2 "Remove antialiasing control from GrPaint."
Fixes a bad merge.

This reverts commit 073285c059.

Change-Id: I5e92339d9b33d3a6dc58b9fcd2a1b3a5684e8f8a
Reviewed-on: https://skia-review.googlesource.com/5774
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2016-12-09 20:43:41 +00:00
Brian Salomon
073285c059 Revert "Reland "Remove antialiasing control from GrPaint.""
This reverts commit 3944484020.

Reason for revert: Merges badly with a recent change. Will rebase and reland.

Original change's description:
> Reland "Remove antialiasing control from GrPaint."
> 
> This contains fixes for GLPrograms test and mixed samples rendering.
> 
> This reverts commit 419d81eed4.
> 
> BUG=skia:
> 
> Change-Id: If8f002fbfaaaab6d1607403f2b15ccc7f1e17e87
> Reviewed-on: https://skia-review.googlesource.com/5763
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> 

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

Change-Id: Iff9657041e28604a845bc5a9acec7c9b248c53bd
Reviewed-on: https://skia-review.googlesource.com/5772
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2016-12-09 20:02:22 +00:00
Brian Salomon
3944484020 Reland "Remove antialiasing control from GrPaint."
This contains fixes for GLPrograms test and mixed samples rendering.

This reverts commit 419d81eed4.

BUG=skia:

Change-Id: If8f002fbfaaaab6d1607403f2b15ccc7f1e17e87
Reviewed-on: https://skia-review.googlesource.com/5763
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2016-12-09 19:56:24 +00:00
Mike Reed
c1f7774e8d Revert[2] "remove SK_SUPPORT_LEGACY_CLIP_REGIONOPS"
This reverts commit a129dfef2a.

BUG=skia:

Change-Id: I717de6e5fcd4516aa684b014b1414b0f82ac2b91
Reviewed-on: https://skia-review.googlesource.com/5722
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2016-12-09 14:33:41 +00:00
Mike Reed
a129dfef2a Revert "remove SK_SUPPORT_LEGACY_CLIP_REGIONOPS"
This reverts commit 8e7432b7f9.

Reason for revert: <INSERT REASONING HERE>

external/skia/bench/../tools/android/SkAndroidSDKCanvas.h:103:36: error: C++ requires a type specifier for all declarations
    void onClipRect(const SkRect&, ClipOp, ClipEdgeStyle) override;

Original change's description:
> remove SK_SUPPORT_LEGACY_CLIP_REGIONOPS
> 
> 
> switch over to SkClipOps now that SK_SUPPORT_LEGACY_CLIP_REGIONOPS is gone
> 
> BUG=skia:
> 
> Change-Id: Ifdc8b3746d508348a40cc009a4e529a1cb3c405d
> Reviewed-on: https://skia-review.googlesource.com/5714
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> 

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

Change-Id: If26ea91d7464615e43c1d3d2f726e337ff56b55c
Reviewed-on: https://skia-review.googlesource.com/5721
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2016-12-09 13:14:41 +00:00
Mike Reed
8e7432b7f9 remove SK_SUPPORT_LEGACY_CLIP_REGIONOPS
switch over to SkClipOps now that SK_SUPPORT_LEGACY_CLIP_REGIONOPS is gone

BUG=skia:

Change-Id: Ifdc8b3746d508348a40cc009a4e529a1cb3c405d
Reviewed-on: https://skia-review.googlesource.com/5714
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2016-12-08 21:45:27 +00:00
Cary Clark
7eb01e00b1 simplify bug
The path contains a cubic with a very tight curve.
Split the cubic into pieces so that the individual
curves are better behaved.

Use both inflections and max curvature to 
potentially split cubics. Since this may require
a bit of work, preflight to ignore cubics that
monotonically change in x and y.

Only one of the three tests referred to by the bug
below repro'd. Use path.dumpHex() instead of 
path.dump() to capture the crashing data.

TBR=reed@google.com
BUG=skia:6041

Change-Id: I29a264f87242cacc7c421e7685b90aca81621c74
Reviewed-on: https://skia-review.googlesource.com/5702
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2016-12-08 20:29:37 +00:00
Brian Salomon
419d81eed4 Revert "Remove antialiasing control from GrPaint."
This reverts commit 9f549358b3.

Reason for revert: hitting asserts

Change-Id: I542d34edc05ecf72b7646263f25736a0950c78e7
Reviewed-on: https://skia-review.googlesource.com/5707
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2016-12-08 17:11:46 +00:00
Brian Salomon
9f549358b3 Remove antialiasing control from GrPaint.
This adds an additional param (of new enum type GrAA) to draws that can antialias and a new enum GrAAType to indicate the AA technique (none, fragment shader computed coverage, msaa).

Some GMs change due to this:
1) In some places we weren't disabling MSAA when the draw was supposed to be unantialiased.
2) Some bounding rect draws that use GrFragmentProcessors were unnecessarily turning on antialiasing, by disabling it a very small number of pixel LSBs change.

Change-Id: I7d8d8793dda70bcd373d09055beb9949c1a8a4d0
Reviewed-on: https://skia-review.googlesource.com/5608
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2016-12-08 16:27:44 +00:00
Brian Salomon
1e41f4a111 Rename batch->op in GrOpList and subclasses
Change-Id: I9c82483c4ac0dc140fb1e5e3650d6ff1e5917e99
Reviewed-on: https://skia-review.googlesource.com/5646
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2016-12-07 20:42:49 +00:00
Joe Gregorio
c39f3fb97b fiddle: Don't run F16 by default, it doesn't work with OSMesa.
BUG=skia:

Change-Id: I68706e7f7b3641d46de4e9765343fa13537f4fcd
Reviewed-on: https://skia-review.googlesource.com/5506
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
2016-12-02 16:27:16 +00:00
brianosman
20471894ea Two (related) changes here:
1) Our older iOS devices failed our sRGB tests, due to precision issues
with alpha. At this point, we only test on iPadMini 4, and that appears
not to have any problems.

2) iOS devices still don't have the sRGB texture decode extension. But,
some clients have no interest in mixing legacy/color-correct rendering,
and would like to use sRGB on these devices. This GrContextOptions flag
enables sRGB support in those cases.

Adjust the test code to produce sRGB capable contexts on these devices,
but only for configs that have a color space. (See comment).

BUG=skia:4148

Committed: https://skia.googlesource.com/skia/+/9db12d2341f3f8722c8b90b11dd4cce138a8a64e
Committed: https://skia.googlesource.com/skia/+/1aeb78c5d978b35b256525b711edd942bce01444
Review-Url: https://codereview.chromium.org/2539993002
2016-12-02 06:43:32 -08:00
brianosman
a6abb57b99 Revert of Enable sRGB on iOS, make sRGB decode support optional (patchset #12 id:220001 of https://codereview.chromium.org/2539993002/ )
Reason for revert:
Command Buffer, too...

Original issue's description:
> Two (related) changes here:
>
> 1) Our older iOS devices failed our sRGB tests, due to precision issues
> with alpha. At this point, we only test on iPadMini 4, and that appears
> not to have any problems.
>
> 2) iOS devices still don't have the sRGB texture decode extension. But,
> some clients have no interest in mixing legacy/color-correct rendering,
> and would like to use sRGB on these devices. This GrContextOptions flag
> enables sRGB support in those cases.
>
> Adjust the test code to produce sRGB capable contexts on these devices,
> but only for configs that have a color space. (See comment).
>
> BUG=skia:4148
>
> Committed: https://skia.googlesource.com/skia/+/9db12d2341f3f8722c8b90b11dd4cce138a8a64e
> Committed: https://skia.googlesource.com/skia/+/1aeb78c5d978b35b256525b711edd942bce01444

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

Review-Url: https://codereview.chromium.org/2546783005
2016-12-01 13:59:31 -08:00
brianosman
1aeb78c5d9 Two (related) changes here:
1) Our older iOS devices failed our sRGB tests, due to precision issues
with alpha. At this point, we only test on iPadMini 4, and that appears
not to have any problems.

2) iOS devices still don't have the sRGB texture decode extension. But,
some clients have no interest in mixing legacy/color-correct rendering,
and would like to use sRGB on these devices. This GrContextOptions flag
enables sRGB support in those cases.

Adjust the test code to produce sRGB capable contexts on these devices,
but only for configs that have a color space. (See comment).

BUG=skia:4148

Committed: https://skia.googlesource.com/skia/+/9db12d2341f3f8722c8b90b11dd4cce138a8a64e
Review-Url: https://codereview.chromium.org/2539993002
2016-12-01 13:18:16 -08:00
brianosman
0a2782c98c Revert of Enable sRGB on iOS, make sRGB decode support optional (patchset #11 id:200001 of https://codereview.chromium.org/2539993002/ )
Reason for revert:
ANGLE tests are failing

Original issue's description:
> Two (related) changes here:
>
> 1) Our older iOS devices failed our sRGB tests, due to precision issues
> with alpha. At this point, we only test on iPadMini 4, and that appears
> not to have any problems.
>
> 2) iOS devices still don't have the sRGB texture decode extension. But,
> some clients have no interest in mixing legacy/color-correct rendering,
> and would like to use sRGB on these devices. This GrContextOptions flag
> enables sRGB support in those cases.
>
> Adjust the test code to produce sRGB capable contexts on these devices,
> but only for configs that have a color space. (See comment).
>
> BUG=skia:4148
>
> Committed: https://skia.googlesource.com/skia/+/9db12d2341f3f8722c8b90b11dd4cce138a8a64e

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

Review-Url: https://codereview.chromium.org/2547603002
2016-12-01 10:42:04 -08:00
Matt Sarett
a2f7126ed4 Add srgb and f16 modes to fiddle
BUG=skia:5945

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

Change-Id: I29b87a3b2eb20b8d28f8fb970b5192807bebdc48
Reviewed-on: https://skia-review.googlesource.com/4546
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2016-12-01 18:12:57 +00:00
brianosman
9db12d2341 Two (related) changes here:
1) Our older iOS devices failed our sRGB tests, due to precision issues
with alpha. At this point, we only test on iPadMini 4, and that appears
not to have any problems.

2) iOS devices still don't have the sRGB texture decode extension. But,
some clients have no interest in mixing legacy/color-correct rendering,
and would like to use sRGB on these devices. This GrContextOptions flag
enables sRGB support in those cases.

Adjust the test code to produce sRGB capable contexts on these devices,
but only for configs that have a color space. (See comment).

BUG=skia:4148

Review-Url: https://codereview.chromium.org/2539993002
2016-12-01 09:02:03 -08:00
Brian Salomon
9afd371a8a Rename GrDrawBatch->GrDrawOp
Change-Id: I18f520924b8a2548566fd61dbea4e3e12bd253dd
Reviewed-on: https://skia-review.googlesource.com/5411
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2016-12-01 16:45:27 +00:00
Hal Canary
1fcc40474f SkEncodeImage: no more link-time registration
Also, no more SkImageEncoder class.

SK_SUPPORT_LEGACY_IMAGE_ENCODER_CLASS now only guards some
old API shims.

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

Change-Id: I3797f584f3e8e12ade10d31e8733163453725f40
Reviewed-on: https://skia-review.googlesource.com/5006
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2016-11-30 22:48:56 +00:00
Hal Canary
08c79b8556 remove more old cmake files
NOTRY=true

Change-Id: I53326b62467aeb6346325597f0223e247fefed8c
Reviewed-on: https://skia-review.googlesource.com/5391
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2016-11-30 20:37:45 +00:00
Brian Salomon
c293a29bc2 Make GrGpuCommandBuffer infer its render target from first draw
This is a temporary workaround to allow removal of GrBatch::renderTarget().

Change-Id: Ic14710a369802064cf6446e8191a98ea3595556d
Reviewed-on: https://skia-review.googlesource.com/5342
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2016-11-30 20:17:51 +00:00
Greg Daniel
9fcc743a5c Add support for resources on android Viewer
BUG=skia:

Change-Id: I1acc3e4fe6d0ce8bf29c52dd7280dff029a3abc2
Reviewed-on: https://skia-review.googlesource.com/5322
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2016-11-30 13:53:21 +00:00
Brian Osman
06826d9d20 In GetResourceAsBitmap, don't crash if the resource is missing
NewFromEncoded returns nullptr if the resourceData is null or empty.

BUG=skia:

Change-Id: I8812b92b8664ebf5e5cf5cdd8b3bfb29963ed454
Reviewed-on: https://skia-review.googlesource.com/5314
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2016-11-29 20:47:37 +00:00
Brian Salomon
f9f451213a Reland image storage with fixes.
Revert "Revert "Initial OpenGL Image support.""

This reverts commit 59dc41175d.

BUG=skia:

Change-Id: Ibe3c87ce7f746f065fdbcc5a518388cc291112f5
Reviewed-on: https://skia-review.googlesource.com/5131
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2016-11-29 17:42:53 +00:00
Hal Canary
db6830162e SkImageEncoder: simplify API
(re-land 248ff02 & 2cb6cb7, with changes)

  - Hide SkImageEncoder class in private header.
  - SkImageEncoder::Type becomes SkEncodedImageFormat
  - SkEncodedFormat becomes SkEncodedImageFormat
  - SkImageEncoder static functions replaced with
    single function EncodeImage()
  - utility wrappers for EncodeImage() are in
    sk_tool_utils.h

TODO: remove link-time registration mechanism.
TODO: clean up clients use of API and flip the flag.
TODO: implement EncodeImage() in chromeium/skia/ext

Change-Id: I47d451e50be4d5c6c130869c7fa7c2857243d9f0
Reviewed-on: https://skia-review.googlesource.com/4909
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-on: https://skia-review.googlesource.com/5186
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
2016-11-23 16:40:32 +00:00
Hal Canary
a2b4bdce8c Revert 248ff023 & 2cb6cb72
Revert "SkImageEncoder: simplify API"
This reverts commit 248ff02331.
Revert "Fix bug: can't convert nullptr -> bool"
This reverts commit 2cb6cb7218.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5151
NOTRY=true

Change-Id: I5f6414392d6545f74db0b5bb50608d04f053a8ec
Reviewed-on: https://skia-review.googlesource.com/5151
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
2016-11-22 21:23:51 +00:00
Hal Canary
248ff02331 SkImageEncoder: simplify API
- Hide SkImageEncoder class in private header.
  - SkImageEncoder::Type becomes SkEncodedImageFormat
  - SkEncodedFormat becomes SkEncodedImageFormat
  - SkImageEncoder static functions replaced with
    single function EncodeImage()
  - utility wrappers for EncodeImage() are in
    sk_tool_utils.h

TODO: remove link-time registration mechanism.
TODO: clean up clients use of API and flip the flag.
TODO: implement EncodeImage() in chromeium/skia/ext

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

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

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

BUG=skia:5907

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

Change-Id: I20ff972ffe1c7e6535ddc501e2a8ab8c246e4061
Reviewed-on: https://skia-review.googlesource.com/4838
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
2016-11-21 14:58:32 +00:00
Mike Klein
50500ad470 GN: add public headers warnings check.
We already generate skia.h to include all public headers for Fiddle.
This just includes it with -Wunused-parameter turned on as an error.

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

Change-Id: Ia55a901c09a3c9c9d6d35a43259431dba3532ed9
Reviewed-on: https://skia-review.googlesource.com/4901
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-16 19:27:29 +00:00
csmartdalton
27f05a2172 skpbench: fix parser script for bots
- emits the timings as numbers instead of strings.
- moves 'bench_type' and 'source_type' into the key.

BUG=skia:

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

Change-Id: Ibf98891e21c5d4c8a794c207e60d0df78d8a063c
Reviewed-on: https://skia-review.googlesource.com/4823
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2016-11-15 18:52:10 +00:00
Brian Osman
57ae6cfe01 Revert "Support decoding images to multiple formats, depending on usage"
This reverts commit c73a1ecbed.

Reason for revert: ANGLE and CommandBuffer failures

Original change's description:
> Support decoding images to multiple formats, depending on usage
> 
> Our codec generator will now preserve any asked-for color space, and
> convert the encoded data to that representation. Cacherator now
> allows decoding an image to both legacy (nullptr color space), and
> color-correct formats. In color-correct mode, we choose the best
> decoded format, based on the original properties, and our backend's
> capabilities. Preference is given to the native format, when it's
> already texturable (sRGB 8888 or F16 linear). Otherwise, we prefer
> linear F16, and fall back to sRGB when that's not an option.
> 
> BUG=skia:5907
> 
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4438
> 
> Change-Id: I847c243dcfb72d8c0f1f6fc73c09547adea933f0
> Reviewed-on: https://skia-review.googlesource.com/4438
> Reviewed-by: Matt Sarett <msarett@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> 

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

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

BUG=skia:5907

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

Change-Id: I847c243dcfb72d8c0f1f6fc73c09547adea933f0
Reviewed-on: https://skia-review.googlesource.com/4438
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2016-11-15 15:27:14 +00:00
csmartdalton
2e27207eb4 skpbench: skiaperf.py modifications
- Appends the clock and unit to the result type (e.g. "accum_cpu_ms").
- Removes the "options" key.
- Adds "bench_type" and "source_type" keys to the properties.

BUG=skia:

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

Change-Id: I2fd27eac4f42f443131fef6b1774f20e60571cd5
Reviewed-on: https://skia-review.googlesource.com/4737
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2016-11-14 20:28:51 +00:00
Mike Klein
c168a3ac3c Revert "Always build the ANGLE test code. Always build ANGLE on windows and linux."
This reverts commit 238b820369.

Reason for revert: breaks 32-bit bots, iOS bots, Google3 roll, -ASAN bot.

Original change's description:
> Always build the ANGLE test code. Always build ANGLE on windows and linux.
> 
> Make ANGLE test code independent of having ANGLE lib. Make ANGLE test code not include EGL headers.
> 
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4040
> 
> DOCS_PREVIEW= https://skia.org/?cl=4040
> 
> Change-Id: I7b857e9785246743f53fb969647b1162ce7419ab
> Reviewed-on: https://skia-review.googlesource.com/4040
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> 

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

Change-Id: I19bab8c93baebf032f8a4cefbedfe7359317e806
Reviewed-on: https://skia-review.googlesource.com/4758
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-11-14 14:53:23 +00:00
Brian Salomon
238b820369 Always build the ANGLE test code. Always build ANGLE on windows and linux.
Make ANGLE test code independent of having ANGLE lib. Make ANGLE test code not include EGL headers.

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

DOCS_PREVIEW= https://skia.org/?cl=4040

Change-Id: I7b857e9785246743f53fb969647b1162ce7419ab
Reviewed-on: https://skia-review.googlesource.com/4040
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-11-14 14:34:11 +00:00
Mike Reed
5df4934b3e Revert[2] "Change SkCanvas to *not* inherit from SkRefCnt"
Changes over original:
- conditionalize ownership in SkPictureRecorder
- conditionalize ownership in SkCanvasStateUtils

This reverts commit b613c266df.

BUG=skia:

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

Change-Id: Ib25514d6f546c69b6650b5c957403b04f7380dc2
Reviewed-on: https://skia-review.googlesource.com/4742
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2016-11-13 18:31:13 +00:00
Matt Sarett
8740d5802b Re-purpose color space tool
(1) Compile tool with GN.
(2) Rename tool to colorspaceinfo.
(3) Support both images and icc profiles as input.
(4) Print out information on transfer fn in addition to gamut.

TODO: Output graphs of the three transfer fn curves.

BUG=skia:

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

Change-Id: I2e75139685ea41446d3ae6f9803c8068ea05661a
Reviewed-on: https://skia-review.googlesource.com/4721
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Brian Osman <brianosman@google.com>
2016-11-11 19:31:09 +00:00
Robert Phillips
294870ff11 Add explicit UniqueID classes for GrGpuResource & GrSurfaceProxy
This sets the stage for using the Proxy's/RenderTargetContext's ID above the flush and the RenderTarget's/GrGpuResource's below the flush.

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

Change-Id: I9f1e6b00c02a0691d90b58c49e1d8c60684884c1
Reviewed-on: https://skia-review.googlesource.com/4650
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2016-11-11 18:24:56 +00:00
Mike Klein
38af9438d7 GN: build Lua tools when skia_use_lua.
When we opt into Lua, this builds SampleLua into SampleApp, and the lua_app and lua_pictures tools.

I've tested this builds with and without skia_use_system_lua on my Mac laptop and Linux desktop.

I've made lua_pictures.cpp's flags static to avoid conflicts with flags in SkCommonFlags.cpp.

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

DOCS_PREVIEW= https://skia.org/?cl=4699

Change-Id: I8176fd51d8a38746e7d730cfcce66da42b9a015a
Reviewed-on: https://skia-review.googlesource.com/4699
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-11 17:34:36 +00:00
Heather Miller
b613c266df Revert "Change SkCanvas to *not* inherit from SkRefCnt"
This reverts commit 8240750718.

Reason for revert: Breaking WebView (chromium:663959)

Original change's description:
> Change SkCanvas to *not* inherit from SkRefCnt
> 
> Definitely tricky for classes like SkNWayCanvas, where the caller (today)
> need not pay attention to ownership of the canvases it gave the NWay
> (after this CL, the caller *must* managed ownership)
> 
> BUG=skia:
> 
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4441
> 
> DOCS_PREVIEW= https://skia.org/?cl=4441
> 
> Change-Id: Ib1ac07a3cdf0686d78e7aaa4735d45cc90bea081
> Reviewed-on: https://skia-review.googlesource.com/4441
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> 

TBR=djsollen@google.com,mtklein@google.com,halcanary@google.com,robertphillips@google.com,fmalita@chromium.org,fmalita@google.com,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I5e3b3e876b7d2c09833cf841801321033b6b968b
Reviewed-on: https://skia-review.googlesource.com/4687
Commit-Queue: Heather Miller <hcm@google.com>
Reviewed-by: Heather Miller <hcm@google.com>
2016-11-10 21:25:44 +00:00
Kevin Lubick
9c2249f51c skpbench: add utility to format results for Skia Perf
Adds skiaperf.py for formatting skpbench.py outputs for Skia Perf.
Also renames parseskpbench.py to sheet.py.

BUG=skia:

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

Change-Id: I758678e1c589b15ec2d07c43e4921663e919b47b
Reviewed-on: https://skia-review.googlesource.com/4657
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2016-11-10 20:00:56 +00:00
csmartdalton
49df770318 skpbench: add "resultsfile" option
BUG=skia:

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

Change-Id: I1a26eddb40de1398cad5348d3fe0ba397a87dbb0
Reviewed-on: https://skia-review.googlesource.com/4654
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2016-11-10 16:08:12 +00:00
csmartdalton
2087dda163 skpbench: remove --path flag
Replaces the confusing --path flag with a positional argument that
gives the path to the skpbench binary.

BUG=skia:

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

Change-Id: I2b5eeca61ec85e7fe45fd3370625eddf34a2fd0e
Reviewed-on: https://skia-review.googlesource.com/4635
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2016-11-10 12:52:14 +00:00
csmartdalton
a115129a46 skpbench: call adb wait-for-device after root
BUG=skia:

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

Change-Id: I310600e79141d2eafd668c76b97a017b151ac0fd
Reviewed-on: https://skia-review.googlesource.com/4632
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2016-11-09 21:29:18 +00:00
csmartdalton
f2b024db67 skpbench: filter out junk spewed by Pixel C driver
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2488043003

Review-Url: https://codereview.chromium.org/2488043003
2016-11-09 13:25:24 -08:00
csmartdalton
b87642e018 skpbench: use 3 cores instead of 4 on Pixel C
Hopefully with less cores running we will produce less heat. 3 cores
should be enough to run Ganesh, the graphics driver, and the OS.

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

Review-Url: https://codereview.chromium.org/2491633002
2016-11-09 12:26:31 -08:00
Mike Reed
8240750718 Change SkCanvas to *not* inherit from SkRefCnt
Definitely tricky for classes like SkNWayCanvas, where the caller (today)
need not pay attention to ownership of the canvases it gave the NWay
(after this CL, the caller *must* managed ownership)

BUG=skia:

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

DOCS_PREVIEW= https://skia.org/?cl=4441

Change-Id: Ib1ac07a3cdf0686d78e7aaa4735d45cc90bea081
Reviewed-on: https://skia-review.googlesource.com/4441
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2016-11-09 19:40:06 +00:00
fmalita
d067ae7a8f Missing SkOSPath include in lua_pictures.cpp
TBR=bungeman@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2494443002

Review-Url: https://codereview.chromium.org/2494443002
2016-11-09 09:15:05 -08:00
csmartdalton
e4fd0780ec skpbench: simplify adb and reduce number of invocations
This change reduces a bit of startup overhead by condensing more bash
into fewer invocations of 'adb shell'.

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

Review-Url: https://codereview.chromium.org/2481413003
2016-11-09 08:41:23 -08:00
csmartdalton
c8b15684fe skpbench: fix typo in 6P bash script
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2486973002

Review-Url: https://codereview.chromium.org/2486973002
2016-11-08 16:50:13 -08:00
Ben Wagner
bf111d7bc9 Move SkOSPath out of include/core.
It is moved to src/utils. It is almost a tool, but has two uses in
src/ports.

The existing SkOSFile.cpp is left empty for the time being since it is
mentioned in Chromium's BUILD.gn for Skia.

Change-Id: I3bb7f7c4214359eb6ab906bfe76737d20bf1d6c7
Reviewed-on: https://skia-review.googlesource.com/4536
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
2016-11-08 20:20:15 +00:00
Mike Klein
08c896378e Add -j as alias for --threads.
I keep typing this...

BUG=skia:

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

Change-Id: Ib3e387054810cebae468addc001a1e148e5af155
Reviewed-on: https://skia-review.googlesource.com/4553
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-11-08 19:43:00 +00:00
Robert Phillips
eaa862569d Revert "Revert "Add GrRenderTargetContext instantiate & asTextureProxy""
This reverts commit 7d7d7d1946.

Reason for revert: Reverting this to see if it really was crashing on SVGs or if that was cross talk.

Original change's description:
> Revert "Add GrRenderTargetContext instantiate & asTextureProxy"
> 
> This reverts commit 9113edfff8.
> 
> Reason for revert: Looks to be causing EXCEPTION_ACCESS_VIOLATION:
> 
> https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Win-MSVC-NUC-GPU-IntelIris6100-x86_64-Debug/builds/121/steps/test_skia%20on%20Windows/logs/stdio
> https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Win-MSVC-GCE-CPU-AVX2-x86-Debug/builds/2384/steps/test_skia%20on%20Windows-2008ServerR2-SP1/logs/stdio
> https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Win-MSVC-ShuttleC-GPU-iHD530-x86_64-Debug/builds/785/steps/test_skia%20on%20Windows/logs/stdio
> 
> Original change's description:
> > Add GrRenderTargetContext instantiate & asTextureProxy
> > 
> > This CL also centralizes the instantiation code in GrSurfaceProxy and adds a test.
> > 
> > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4494
> > 
> > Change-Id: I0081d9a216dc0af293179f23bcb88acf6a822324
> > Reviewed-on: https://skia-review.googlesource.com/4494
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Robert Phillips <robertphillips@google.com>
> > 
> 
> TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> 
> Change-Id: I225ce7867ebd445067e5ea55ebbfd587f7fe782a
> Reviewed-on: https://skia-review.googlesource.com/4528
> Commit-Queue: Leon Scroggins <scroggo@google.com>
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> 

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

Change-Id: Ifc3b9ac343009a3808f5f47500eef50df438e3d9
Reviewed-on: https://skia-review.googlesource.com/4537
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2016-11-08 13:49:49 +00:00
Leon Scroggins
7d7d7d1946 Revert "Add GrRenderTargetContext instantiate & asTextureProxy"
This reverts commit 9113edfff8.

Reason for revert: Looks to be causing EXCEPTION_ACCESS_VIOLATION:

https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Win-MSVC-NUC-GPU-IntelIris6100-x86_64-Debug/builds/121/steps/test_skia%20on%20Windows/logs/stdio
https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Win-MSVC-GCE-CPU-AVX2-x86-Debug/builds/2384/steps/test_skia%20on%20Windows-2008ServerR2-SP1/logs/stdio
https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Win-MSVC-ShuttleC-GPU-iHD530-x86_64-Debug/builds/785/steps/test_skia%20on%20Windows/logs/stdio

Original change's description:
> Add GrRenderTargetContext instantiate & asTextureProxy
> 
> This CL also centralizes the instantiation code in GrSurfaceProxy and adds a test.
> 
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4494
> 
> Change-Id: I0081d9a216dc0af293179f23bcb88acf6a822324
> Reviewed-on: https://skia-review.googlesource.com/4494
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> 

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

Change-Id: I225ce7867ebd445067e5ea55ebbfd587f7fe782a
Reviewed-on: https://skia-review.googlesource.com/4528
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2016-11-07 21:26:46 +00:00
Robert Phillips
9113edfff8 Add GrRenderTargetContext instantiate & asTextureProxy
This CL also centralizes the instantiation code in GrSurfaceProxy and adds a test.

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

Change-Id: I0081d9a216dc0af293179f23bcb88acf6a822324
Reviewed-on: https://skia-review.googlesource.com/4494
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2016-11-07 20:28:13 +00:00
bsalomon
795390bd88 Improvements to build_command_buffer.py
Remove subdir thing for Linux. It's incorrect.

Make the script able to take extra GN args.

Default to a custom gn output dir for the command buffer build.

Default to a release build of the command buffer.

Document that the script overwrites the gn args on each run.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2472343003

Review-Url: https://codereview.chromium.org/2472343003
2016-11-04 10:54:54 -07:00
Hal Canary
1b612a89fb tools: s/SkAutoTUnref/sk_sp/
BUG=skia:

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

Change-Id: Iae8b032b00d3579c77f3b86370dde71c4649da45
Reviewed-on: https://skia-review.googlesource.com/4391
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2016-11-03 21:00:34 +00:00
Mike Reed
faba3715b8 remove unused code around SK_SUPPORT_LEGACY_XFERMODE_PARAM
BUG=skia:

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

Change-Id: I5121acd027d935ade169ff65941f29f654a47bd0
Reviewed-on: https://skia-review.googlesource.com/4384
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2016-11-03 19:54:08 +00:00
Ben Wagner
12e8dc256d Fix iOS and Angle builds.
"Remove SkAutoTDelete." did not run trybots on these specific bots.

Change-Id: Ibfa731df387a90a78187b88c75483800981a691c
Reviewed-on: https://skia-review.googlesource.com/4387
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2016-11-03 19:45:29 +00:00
Mike Klein
7d3028818e GN: iOS basics
This doesn't create any apps or bundles or sign anything, but it all compiles and links.

Note the awkward transitional hack I used to make each tool's tool_main() serve as the real main() again when built with GN, while keeping the existing setup with GYP.  Fun...

BUG=skia:

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

Change-Id: I632753d5d8e5848380854f413bf5905d676bfcf4
Reviewed-on: https://skia-review.googlesource.com/4350
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-03 19:31:50 +00:00
Ben Wagner
145dbcd165 Remove SkAutoTDelete.
Replace with std::unique_ptr.

Change-Id: I5806cfbb30515fcb20e5e66ce13fb5f3b8728176
Reviewed-on: https://skia-review.googlesource.com/4381
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-11-03 19:03:40 +00:00
Mike Reed
37d1b49ae8 add include to remove legacy flag
BUG=skia:

NOTRY=True

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

Change-Id: Ie3b173188041a8c37fc2252d257c1f3e1c2a4c84
Reviewed-on: https://skia-review.googlesource.com/4377
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2016-11-03 17:14:29 +00:00
Ben Wagner
7ecc59610d Remove SkAutoTDeleteArray
This class is already just an alias for std::unique_ptr<T[]>, so replace
all uses with that and delete the class.

CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-ASAN-Trybot,Test-Ubuntu-Clang-Golo-GPU-GT610-x86_64-Debug-ASAN-Trybot

Change-Id: I40668d398356a22da071ee791666c7f728b59266
Reviewed-on: https://skia-review.googlesource.com/4362
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-11-02 21:30:38 +00:00
Brian Osman
7039f74a8b Remove SkImageInfoIsGammaCorrect, etc...
Our internal definition is (and will continue to be) that anything with
a color space is gamma correct. F16 is irrelevant (whether or not we
choose to support untagged F16). This makes these helpers less than
helpful, and lets us remove them from (public) API.

API change is just removal (of unused functions).

TBR=reed@google.com

BUG=skia:

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

Change-Id: Ia84a423548bfee14a3ba4a43d6d5b8c4686fb5ff
Reviewed-on: https://skia-review.googlesource.com/4228
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-11-01 20:55:51 +00:00
Mike Reed
5e25717ab6 hide setImageFilter(ptr)
BUG=skia:

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

Change-Id: Iad792cfdf54087ad4c424fd268559c162a9a5f5c
Reviewed-on: https://skia-review.googlesource.com/4184
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2016-11-01 16:05:41 +00:00
csmartdalton
c25c5d73e9 Move memoization of multisample specs id to GrRenderTarget
GrGpu used to perform the memoization on behalf of GrRenderTarget via
a public accessor. This change updates GrRenderTarget to do its own
work.

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

Review-Url: https://codereview.chromium.org/2467593002
2016-11-01 07:03:59 -07:00
reed
70295ea220 update androidsdkcanvas for SkBlendMode
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2464433003

TBR=

Review-Url: https://codereview.chromium.org/2464433003
2016-10-31 05:27:57 -07:00
Greg Daniel
1f05f44e8f Various fixes in VulkanWindowContext
BUG=skia:

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

Change-Id: Ib42dbe70e868c83bdf06e370388e0cc7639a0992
Reviewed-on: https://skia-review.googlesource.com/4066
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2016-10-28 21:14:17 +00:00
Mike Reed
7d954ad797 remove xfermode from public api
BUG=skia:

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

CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Change-Id: I19cd056f2af778f10e8c6c2b7b2735593b43dbac
Reviewed-on: https://skia-review.googlesource.com/4020
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2016-10-28 20:06:17 +00:00
Robert Phillips
c7635fa374 Make GrDrawContext be GrRenderTargetProxy-backed
This is split out of https://codereview.chromium.org/2215323003/ (Start using RenderTargetProxy (omnibus))

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

CQ_INCLUDE_TRYBOTS=master.client.skia.android:Test-Android-Clang-Nexus5-GPU-Adreno330-arm-Debug-GN_Android-Trybot

Change-Id: I1a47f19ed1ac0c249e6ccac8db74095d7f456db4
Reviewed-on: https://skia-review.googlesource.com/3841
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2016-10-28 18:35:06 +00:00
Brian Osman
1105224f97 Rename GrDrawContext to GrRenderTargetContext
This is in preparation for GrTextureContext and GrSurfaceContext

BUG=skia:

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

Change-Id: Ie58c93052e68f3f1f5fe8d15d63760de274a6fbd
Reviewed-on: https://skia-review.googlesource.com/4030
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2016-10-27 19:14:09 +00:00
Hal Canary
18fa6421e9 chmod -x *.cpp *.h
Change-Id: I5b37499505e26e0837921292c1aea0056e4d5ecd
Reviewed-on: https://skia-review.googlesource.com/4035
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2016-10-27 16:41:14 +00:00
bungeman
6bd5284415 Remove SkAutoTUnref and SkAutoTDelete from public includes.
This also makes the required changed to src, tests, and tools. The few
public APIs modified by this change appear to be unused outside of Skia.

Removing these from the public API makes it easier to ensure users are
no longer using them.

This also updates GrGpu::wrapBackendXXX and the
::onWrapBackendXXX methods to clarify ownership.

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

Review-Url: https://codereview.chromium.org/2448593002
2016-10-27 09:30:08 -07:00
Robert Phillips
f2361d2d93 Add GrOpList and rename GrDrawTarget to GrRenderTargetOpList
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3910

Change-Id: I026aa26ecc61a0d002e98892dca728536259e8b1
Reviewed-on: https://skia-review.googlesource.com/3910
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2016-10-26 00:48:37 +00:00
Brian Osman
0117485a4a Fix GPU sRGB mode in viewer
Need to attach the sRGB color space to the surface to get past validation.

BUG=skia:

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

Change-Id: Icce1c8cf35c31023c116cbcddf8848c4c92cd212
Reviewed-on: https://skia-review.googlesource.com/3905
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2016-10-25 15:39:51 +00:00
Brian Osman
49f57123eb Populate ALL copies of a command line flag during parsing
Now that we're declaring flags statically per-tool, we were only
setting the value on one of them (randomly) in the linked list.

BUG=skia:

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

Change-Id: I448cb7f42ee01a16daa65986b14aee9f1a2a3588
Reviewed-on: https://skia-review.googlesource.com/3881
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
2016-10-24 19:32:55 +00:00
caryclark
34efb70398 nc seal breaks simplify
This test has nearly coincident lines that are missorted.
The underlying bug is caused when a pair of curves
are coincident when reduced to line segments, but the
end points aren't detected.

The error was generated by running nanobench over all svg
sample data with the distance field patch installed.

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

Review-Url: https://codereview.chromium.org/2440043003
2016-10-24 08:19:07 -07:00
Brian Osman
526972ecb5 Rename all color space factories from New* to Make*
Matches our naming convention for all other types - factories that
return sk_sp (or any type that intelligently manages its own
lifetime) are named Make.

Previous factories are still around, assuming
SK_SUPPORT_LEGACY_COLOR_SPACE_FACTORIES is defined. Enable that
define for Android, etc.

See also: https://codereview.chromium.org/2442053002/

BUG=skia:

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

Change-Id: Iaea9376490736b494e8ffc820831f052bbe1478d
Reviewed-on: https://skia-review.googlesource.com/3822
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2016-10-24 14:02:27 +00:00
bungeman
7cfd46aebd SkScalerContext to use smart pointers.
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-ASAN-Trybot;master.client.skia:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN-Trybot

Change-Id: I27a714388b8ded7dfc968e322b0a587205f575f1
Reviewed-on: https://skia-review.googlesource.com/3731
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
2016-10-20 22:00:28 +00:00
caryclark
78a37a5336 fix more fuzz, carsvg
Fix a few kevin-generated fuzzers.

Remove an assert triggered by
carsvg when thrown through the
distance field stuff.

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

Review-Url: https://chromiumcodereview.appspot.com/2427253005
2016-10-20 12:36:16 -07:00
Brian Salomon
4a5e49dc6e Run ANGLE in GL mode on test bots
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Win-MSVC-ShuttleC-GPU-GTX960-x86_64-Debug-ANGLE-Trybot

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

Change-Id: Ic3d6efcb331ac3947026476e357e76214f2ccdf8
Reviewed-on: https://skia-review.googlesource.com/3724
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2016-10-20 16:16:31 +00:00
Mike Klein
4bc6d8fd3d Make monobench more usable on Windows.
All small stuff:
  - printf doesn't go to the Visual Studio console, SkDebugf does;
  - the Windows console can't show an ellipsis;
  - overwriting the console line is a little different on Windows.

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

Change-Id: I0175afd6d0147feaff8ff6edae2b35a7435c25f5
Reviewed-on: https://skia-review.googlesource.com/3664
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-19 17:43:07 +00:00