Commit Graph

4831 Commits

Author SHA1 Message Date
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
Robert Phillips
7ee385e1dc Add GrSurfaceProxy* parameter to GrContext::flush
Split out of: https://skia-review.googlesource.com/c/10284/ (Omnibus: Remove GrSurface-derived classes from ops)

Change-Id: I12c66a6fa826c2363b21ece56391fb352d12d6b3
Reviewed-on: https://skia-review.googlesource.com/10541
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-03-30 12:55:37 +00:00
Jim Van Verth
291932e8e4 Fix is_convex() check for inset polys.
Change-Id: I1a8a24132b0cf9eb80dd586bf2f1b930adb7b582
Reviewed-on: https://skia-review.googlesource.com/10525
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2017-03-29 19:32:34 +00:00
Brian Salomon
1c6025cc9d Make analysis optional to GrPipeline::init().
GrXPFactory::createXferProcessor now takes GrPipelineAnalysisColor and GrPipelineAnalysisCoverage rather than GrProcessorSet::FragmentProcessorAnalysis.

This will make it so ops do not have to retain the analysis or rerun it to create pipelines at flush time.

Change-Id: Ib28ba65de425b20c2647329275f209aec168c3df
Reviewed-on: https://skia-review.googlesource.com/10474
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-03-29 19:05:06 +00:00
Robert Phillips
769e80d23d More GrSurfaceProxy-clean up
Split out of: https://skia-review.googlesource.com/c/10484/ (Omnibus: Push instantiation of GrTextures later (post TextureSampler))

Change-Id: I1ee39a23c749e420dce0ad561ee1c8b09bdcc763
Reviewed-on: https://skia-review.googlesource.com/10485
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-03-29 18:28:02 +00:00
Robert Phillips
301431d751 Miscellaneous GrSurfaceProxy-related cleanup
This is pulled out of: https://skia-review.googlesource.com/c/10284/ (Remove GrSurface-derived classes from ops)

Change-Id: I083c0beefe4899b3517d0b0569bb25096809f410
Reviewed-on: https://skia-review.googlesource.com/10483
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-03-29 17:00:16 +00:00
Brian Salomon
e7d30484ea Remove GrPipelineOptimizations computation from GrPipeline::init and nest in GrMeshDrawOp.
Change-Id: I4a702c83857606c1cb050294c408922eef5769ea
Reviewed-on: https://skia-review.googlesource.com/10414
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-03-29 16:46:07 +00:00
Brian Salomon
318538484f Remove GrXferProcessor::getOptimizations.
This replaces GrXferProcessor::getOptimizations with a new function on GrXPFactory. The results are made available via FragmentProcessorAnalysis.

Bug: skia:
Change-Id: I535985458c9d13ad858cac94e957e2fdbe332036
Reviewed-on: https://skia-review.googlesource.com/10218
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-03-29 13:17:50 +00:00
Robert Phillips
1ec1faaff4 Remove GrSurface::flushWrites
Change-Id: Ifac5af00ef852ee212964baa113b490a03e0168d
Reviewed-on: https://skia-review.googlesource.com/10293
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-03-29 12:48:17 +00:00
Greg Daniel
af40127570 Minor fix to VkWrapTest
We need to make sure we cleanup the VkImage created when testing the
wrapping of a render target.

BUG=skia:

Change-Id: I60ea7e880fecccca309a250cc3b19eb29d6aa89c
Reviewed-on: https://skia-review.googlesource.com/10206
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-03-27 20:48:00 +00:00
Mike Klein
b338484d23 quiet some annoying logging in unit tests
Noticed all these while adding some unit test support to ok.

Change-Id: Ie33b96da95840628657211cb28b2134fd314a48a
Reviewed-on: https://skia-review.googlesource.com/10202
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-03-27 19:16:59 +00:00
Jim Van Verth
b436655ad5 Add height function to shadow tessellators.
Prep work for adding perspective support.

Bug: skia:
Change-Id: Id07d3050afb3f0d001b885e482adb8d03125b619
Reviewed-on: https://skia-review.googlesource.com/10167
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-03-27 19:06:59 +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 Reed
5fa3d6d4b1 Revert "Revert "simplify api to bitmapcache""
Remove (for now) overly agressive assert

This reverts commit dd1b4e94c4.

Bug: skia:
Change-Id: Ibdcf0b2e92cf108ae710cd180d4fa359f81176d1
Reviewed-on: https://skia-review.googlesource.com/10129
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-25 14:25:58 +00:00
Florin Malita
dd1b4e94c4 Revert "simplify api to bitmapcache"
This reverts commit 9f4b0ae91e.

Reason for revert: Nanobench asserts.

../../../src/core/SkBitmapCache.cpp:81: fatal error: "assert(scaledWidth != image->width() || scaledHeight != image->height())"
Aborted
Command exited with code 134
step returned non-zero exit code: 134

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

Original change's description:
> simplify api to bitmapcache
> 
> Force all Find callers to make a bitmpacachedesc, which now
> has more rigid validation.
> 
> Goal is to ensure we never make two desc (which turn into keys)
> that look different but represent the same image/transformation.
> 
> BUG=skia:
> 
> Change-Id: I8571837ee4754a69acc99e949bee9a465fa25f2b
> Reviewed-on: https://skia-review.googlesource.com/10114
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> 

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

Change-Id: I21b3c8a5bae409ba740cfc28b352c3b970dcf5af
Reviewed-on: https://skia-review.googlesource.com/10171
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-03-24 22:09:40 +00:00
Mike Reed
9f4b0ae91e simplify api to bitmapcache
Force all Find callers to make a bitmpacachedesc, which now
has more rigid validation.

Goal is to ensure we never make two desc (which turn into keys)
that look different but represent the same image/transformation.

BUG=skia:

Change-Id: I8571837ee4754a69acc99e949bee9a465fa25f2b
Reviewed-on: https://skia-review.googlesource.com/10114
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-03-24 21:40:33 +00:00
Matt Sarett
f388093309 Delete SkColorSpace::ColorSpaceFlags
BUG=skia:

Change-Id: Ia0688876915cd773614ca0c4ccd467cf6e7c603e
Reviewed-on: https://skia-review.googlesource.com/10105
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-03-24 17:11:26 +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
Matt Sarett
cf3f2347c8 Add SkTransferFunctionBehavior flag: Use in codec and encoder
This is a step towards removing the non-linear blending flag from
SkColorSpace.  The flag on SkColorSpace used to control the premul
behavior - now it is controlled by this option.

BUG=skia:

Change-Id: Ia29bd8c2b0596a93c6aa14332dcd9bd39e388a90
Reviewed-on: https://skia-review.googlesource.com/10008
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-03-24 13:19:53 +00:00
Mike Reed
4dc6474b73 remove dead code in bitmapcache
BUG=skia:

Change-Id: If17511179851ac192758f9d96092ff6dd7c60888
Reviewed-on: https://skia-review.googlesource.com/10055
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-23 21:19:13 +00:00
Matt Sarett
f160ad4d76 SkBlurDrawLooper: Start by deleting flags
Android is the only user of this looper.  They never pass any flags.

BUG=skia:

Change-Id: I87b02ef7bc0ed94bca82637d60adddf34575a3e6
Reviewed-on: https://skia-review.googlesource.com/10057
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-03-23 20:58:30 +00:00
Mike Reed
02be3c1c3f add test and fix for canvas::isClipEmpty
BUG=skia:

Change-Id: I4e57e0da7111e861fbae1b88574bc1803442243c
Reviewed-on: https://skia-review.googlesource.com/10046
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2017-03-23 17:26:34 +00:00
Matt Sarett
5df93de8ad Revert "Revert "Add support for writing icc profiles to the jpeg encoder""
This reverts commit dda14b9b7a.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Revert "Add support for writing icc profiles to the jpeg encoder"
> 
> This reverts commit 4ef0148202.
> 
> Reason for revert: This breaks the android autoroller.
> 
> Original change's description:
> > Add support for writing icc profiles to the jpeg encoder
> > 
> > Also, share the impl for skjpeg_error_mgr between the
> > jpeg decoder and encoder.  They are already identical
> > anyway.
> > 
> > BUG=skia:
> > 
> > Change-Id: I4d67f28126388fef3057d62b6e0b203e21ed4afb
> > Reviewed-on: https://skia-review.googlesource.com/10011
> > Reviewed-by: Leon Scroggins <scroggo@google.com>
> > Commit-Queue: Matt Sarett <msarett@google.com>
> > 
> 
> TBR=msarett@google.com,scroggo@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
> 
> Change-Id: Idbb9918370e8384e39d6b7d1c3bcd9545ce4cfd1
> Reviewed-on: https://skia-review.googlesource.com/10017
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Commit-Queue: Derek Sollenberger <djsollen@google.com>
> 

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

Change-Id: I9c1df3f497a9187ac017e464976fd8f0333bad0e
Reviewed-on: https://skia-review.googlesource.com/10030
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-03-22 21:52:57 +00:00
Brian Salomon
5e150851d0 Revert "Revert "Add a new GrResourceCache purging mechanism for purging unused resources.""
This reverts commit 20c322ef0c.

Change-Id: I6df9a8594484837672308dc2c21c7c29b76ffa2c
Reviewed-on: https://skia-review.googlesource.com/10013
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-03-22 20:08:21 +00:00
Derek Sollenberger
dda14b9b7a Revert "Add support for writing icc profiles to the jpeg encoder"
This reverts commit 4ef0148202.

Reason for revert: This breaks the android autoroller.

Original change's description:
> Add support for writing icc profiles to the jpeg encoder
> 
> Also, share the impl for skjpeg_error_mgr between the
> jpeg decoder and encoder.  They are already identical
> anyway.
> 
> BUG=skia:
> 
> Change-Id: I4d67f28126388fef3057d62b6e0b203e21ed4afb
> Reviewed-on: https://skia-review.googlesource.com/10011
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> Commit-Queue: Matt Sarett <msarett@google.com>
> 

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

Change-Id: Idbb9918370e8384e39d6b7d1c3bcd9545ce4cfd1
Reviewed-on: https://skia-review.googlesource.com/10017
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2017-03-22 18:54:30 +00:00
Greg Daniel
70131b97f9 Fix SkTArray operator= to work with self assignment
BUG=skia:

Change-Id: I2a403a7ccbb87a030757f3e57d2ea53503f72512
Reviewed-on: https://skia-review.googlesource.com/10012
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-03-22 18:33:19 +00:00
Matt Sarett
4ef0148202 Add support for writing icc profiles to the jpeg encoder
Also, share the impl for skjpeg_error_mgr between the
jpeg decoder and encoder.  They are already identical
anyway.

BUG=skia:

Change-Id: I4d67f28126388fef3057d62b6e0b203e21ed4afb
Reviewed-on: https://skia-review.googlesource.com/10011
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-03-22 17:34:32 +00:00
Cary Clark
44c1b111c7 path hang
In release, path hangs because buffers overflow.
Debug shows that the clipped cubic generates 34 points although
a maximum of 32 are expected.

The path has very small numbers that fool MaxCurvature into
thinking that there are more places to break the cubic than
are necessary.

To make this bullet-proof, increase the verbs and points.

Allow (1 line + 1 cubic) * (3 x-pieces) * (3 y-pieces) == 18 verbs.
Allow (6 points for line + cubic + line) * 9 pieces    == 54 points.

R=reed@google.com,liyuqian@google.com
BUG=698714

Change-Id: I04fad10c151c79d0c53465a2b658aa4dd59f1c98
Reviewed-on: https://skia-review.googlesource.com/9983
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2017-03-22 16:32:45 +00:00
Derek Sollenberger
d68c41df1b Revert "Add support for writing icc profiles to the jpeg encoder"
This reverts commit e3b95ce468.

Reason for revert: This is breaking the Android auto roller. 

Original change's description:
> Add support for writing icc profiles to the jpeg encoder
> 
> Also, share the impl for skjpeg_error_mgr between the
> jpeg decoder and encoder.  They are already identical
> anyway.
> 
> BUG=skia:
> 
> Change-Id: I029312406dee8734744cc3058acd1f153aefcd83
> Reviewed-on: https://skia-review.googlesource.com/9971
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> Commit-Queue: Matt Sarett <msarett@google.com>
> 

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

Change-Id: I05fb02610dbf4d9475f158d876d6495b0f7e9db4
Reviewed-on: https://skia-review.googlesource.com/10009
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2017-03-22 16:19:59 +00:00
Brian Salomon
d3b65972aa Mark overridden destructors with 'override' and remove 'virtual'
This silences a new warning in clang 5.0

Change-Id: Ieb5b75a6ffed60107c3fd16075d2ecfd515b55e8
Reviewed-on: https://skia-review.googlesource.com/10006
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-03-22 16:06:18 +00:00
Mike Reed
2a65cc0ff1 test (and fix) clip_restriction in canvas
BUG=skia:

Change-Id: I86d25d0fd82be35d01471fba59f77b360be5373c
Reviewed-on: https://skia-review.googlesource.com/9995
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2017-03-22 14:59:56 +00:00
Brian Salomon
20c322ef0c Revert "Add a new GrResourceCache purging mechanism for purging unused resources."
This reverts commit fbb56ce83f.

Reason for revert: Chrome's ancient libstdc++ doesn't like use of steady_clock

Original change's description:
> Add a new GrResourceCache purging mechanism for purging unused resources.
> 
> The client may call GrContext::purgeResourceNotUsedSince() with a stead_clock::time_point and all resources that have been purgeable since before that time point are purged.
> 
> This is intended to replace the "max unused flushes" purging mechanism once Chrome adopts it.
> 
> Change-Id: I28881dd2959cc01c0acca81b2d6001ee5626439d
> Reviewed-on: https://skia-review.googlesource.com/8920
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Eric Karl <ericrk@google.com>
> 

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

Change-Id: I3baa3b2e80302315b757d4d625732459e13795d4
Reviewed-on: https://skia-review.googlesource.com/10004
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-03-22 14:59:07 +00:00
Brian Salomon
fbb56ce83f Add a new GrResourceCache purging mechanism for purging unused resources.
The client may call GrContext::purgeResourceNotUsedSince() with a stead_clock::time_point and all resources that have been purgeable since before that time point are purged.

This is intended to replace the "max unused flushes" purging mechanism once Chrome adopts it.

Change-Id: I28881dd2959cc01c0acca81b2d6001ee5626439d
Reviewed-on: https://skia-review.googlesource.com/8920
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Eric Karl <ericrk@google.com>
2017-03-22 14:42:11 +00:00
Matt Sarett
e3b95ce468 Add support for writing icc profiles to the jpeg encoder
Also, share the impl for skjpeg_error_mgr between the
jpeg decoder and encoder.  They are already identical
anyway.

BUG=skia:

Change-Id: I029312406dee8734744cc3058acd1f153aefcd83
Reviewed-on: https://skia-review.googlesource.com/9971
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-03-22 13:57:58 +00:00
Robert Phillips
0ae6faa34d Make SkImage_Gpu be deferred (take 2)
This CL removes the GrTexture-based ctor forcing everyone to create deferred SkImage_Gpus.

relanding of: https://skia-review.googlesource.com/c/6680/ (Make SkImage_Gpu be deferred)

split out into:
https://skia-review.googlesource.com/c/9106/ (Remove atlas creation from GrResourceProvider)

Change-Id: I834ede430b9706cf9b675bdfdddf1c8c624c2f14
Reviewed-on: https://skia-review.googlesource.com/9965
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-03-22 11:52:16 +00:00
Brian Salomon
54d212e1bf Revert "Revert "Remove GrPipeline from GrDrawOp.""
This reverts commit c48af93460.

Change-Id: I4ba78fd7e5a7d406b88223ca6f7245c029b60f76
Reviewed-on: https://skia-review.googlesource.com/9981
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-03-21 23:55:32 +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
Cary Clark
28da283704 fix fuzz
corrupted intersection point lists
can loop forever. Add a safety
hatch to abort after a large number
of iterations.

TBR=kjlubick@google.com
BUG=700679

Change-Id: Ifd4b180b47ba3bbde38ade0bb13b16b8d645c1cb
Reviewed-on: https://skia-review.googlesource.com/9967
Reviewed-by: Cary Clark <caryclark@skia.org>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2017-03-21 15:18:11 +00:00
Robert Phillips
90960eb1fa Exclude Vulkan from running PreFlushCallbackTest
This should "fix" the broken Vulkan bots

Change-Id: I220cda983d7aad469dfa851db7bf25df6074650e
Reviewed-on: https://skia-review.googlesource.com/9968
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-03-21 15:14:54 +00:00
Robert Phillips
eaa78c4500 Revert "Make SkImage_Gpu be deferred"
This reverts commit 0db235bc02.

Reason for revert: cc_unittests failing

Original change's description:
> Make SkImage_Gpu be deferred
> 
> This CL removes the GrTexture-based ctor forcing everyone to create deferred SkImage_Gpus.
> 
> split out into:
> https://skia-review.googlesource.com/c/9106/ (Remove atlas creation from GrResourceProvider)
> 
> Change-Id: I266bbe089c242fe54d5b7adcc7895aa5a39440a0
> Reviewed-on: https://skia-review.googlesource.com/6680
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> 

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

Change-Id: Ia15590a1fae04b52723713760fdbf0492ad36286
Reviewed-on: https://skia-review.googlesource.com/9962
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-03-21 13:26:22 +00:00
Brian Salomon
107524c2a2 Attempt to fix AMD ANGLE bots.
Makes the second context used for image tests be of the same type as it was before https://skia.googlesource.com/skia/+/6405e71279e99731f89db69325c6763ec62a98e1

Change-Id: Id861214e5bea2b874ba5eae4489a982340c2f101
Reviewed-on: https://skia-review.googlesource.com/9912
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-03-21 13:06:15 +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
Robert Phillips
0db235bc02 Make SkImage_Gpu be deferred
This CL removes the GrTexture-based ctor forcing everyone to create deferred SkImage_Gpus.

split out into:
https://skia-review.googlesource.com/c/9106/ (Remove atlas creation from GrResourceProvider)

Change-Id: I266bbe089c242fe54d5b7adcc7895aa5a39440a0
Reviewed-on: https://skia-review.googlesource.com/6680
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-03-21 11:39:41 +00:00
Matt Sarett
0e032be6b2 Add support for writing ICC profiles in png encodes
BUG=skia:

Change-Id: I99eb2f157f249ed09d724461ec4a1e31db70816a
Reviewed-on: https://skia-review.googlesource.com/9782
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-03-21 00:05:30 +00:00
Brian Osman
ed182d7c90 Remove SkImage::MakeTextureFromPixmap
Slight variation on https://skia-review.googlesource.com/c/7346/,
which had to be reverted. This version also changes the non-mip
upload path to use a GrTextureProxy. Hopefully this doesn't trigger
the same perf regression that we saw last time.

BUG=skia:

Change-Id: Ic99bdd93904089942fb680c3af9c4c36310074c0
Reviewed-on: https://skia-review.googlesource.com/9892
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-03-20 16:42:44 +00:00
Brian Salomon
dcf0ab0dc5 Switch 16 sample gpu configs to 8 samples
BUG=skia:

Change-Id: I053cce7c05c74860cbace00cd94ea4b96e9a482c
Reviewed-on: https://skia-review.googlesource.com/9889
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
2017-03-20 16:22:17 +00:00
Herb Derby
1a3c4b8cce Eager or Lazy evaluation of sub-drawings for SkDeferredCanvas.
Allow evaluation choice of Lazy or Eager evaluation for SkDeferredCanvas.

Eager is used for drawing to a non-recording canvas to reduce the number of
all operations.

Lazy is used for drawing to a recording canvas to reduce the amount decode/encode
that happens.

R=reed@google.com

Change-Id: I7837c4f6e5911c153e0796162e1170edbc34839e
Reviewed-on: https://skia-review.googlesource.com/9839
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-03-20 15:15:33 +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
Brian Salomon
6405e71279 Remove gpu configs that don't have explicit API.
DOCS_PREVIEW= https://skia.org/?cl=9871

Change-Id: I510473cf91d8bee38d1e33424b1ae7b30dc86968
Reviewed-on: https://skia-review.googlesource.com/9871
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-03-20 13:31:49 +00:00
Yuqian Li
06ee8e8a3e Revert "Revert "Revert "Remove budgeted parameter from SkSurface::makeImageSnapshot"""
This reverts commit 31249bb2df.

Reason for revert: Android build is still broken as shown below.

out/target/product/bullhead/obj/NATIVE_TESTS/hwui_unit_tests_intermediates/tests/unit/SkiaPipelineTests.o frameworks/base/libs/hwui/tests/unit/SkiaPipelineTests.cpp"
frameworks/base/libs/hwui/tests/unit/SkiaPipelineTests.cpp:211:51: error: non-virtual member function marked 'override' hides virtual member function
    sk_sp<SkImage> onNewImageSnapshot(SkBudgeted) override {
                                                  ^
external/skia/src/image/SkSurface_Base.h:46:28: note: hidden overloaded virtual function 'SkSurface_Base::onNewImageSnapshot' declared here: different number of parameters (0 vs 1)
    virtual sk_sp<SkImage> onNewImageSnapshot() = 0;
                           ^
frameworks/base/libs/hwui/tests/unit/SkiaPipelineTests.cpp:281:84: error: no viable conversion from 'sk_sp<DeferLayer<DeferTestCanvas>>' to 'sk_sp<SkSurface>'
    pipeline->renderFrame(layerUpdateQueue, dirty, nodes, true, contentDrawBounds, surface);
                                                                                   ^~~~~~~
external/skia/include/core/SkRefCnt.h:253:15: note: candidate constructor not viable: no known conversion from 'sk_sp<DeferLayer<DeferTestCanvas> >' to 'std::nullptr_t' (aka 'nullptr_t') for 1st argument
    constexpr sk_sp(std::nullptr_t) : fPtr(nullptr) {}
              ^
external/skia/include/core/SkRefCnt.h:259:5: note: candidate constructor not viable: no known conversion from 'sk_sp<DeferLayer<DeferTestCanvas> >' to 'const sk_sp<SkSurface> &' for 1st argument
    sk_sp(const sk_sp<T>& that) : fPtr(SkSafeRef(that.get())) {}
    ^
external/skia/include/core/SkRefCnt.h:268:5: note: candidate constructor not viable: no known conversion from 'sk_sp<DeferLayer<DeferTestCanvas> >' to 'sk_sp<SkSurface> &&' for 1st argument
    sk_sp(sk_sp<T>&& that) : fPtr(that.release()) {}
    ^
external/skia/include/gpu/../private/SkTLogic.h:27:82: note: candidate template ignored: disabled by 'enable_if' [with U = (anonymous namespace)::DeferLayer<DeferTestCanvas>]
template <bool B, typename T = void> using enable_if_t = typename std::enable_if<B, T>::type;
                                                                                 ^
external/skia/include/gpu/../private/SkTLogic.h:27:82: note: candidate template ignored: disabled by 'enable_if' [with U = (anonymous namespace)::DeferLayer<DeferTestCanvas>]
external/skia/include/core/SkRefCnt.h:327:5: note: candidate function
    operator unspecified_bool_type() const { return this->get() ? &sk_sp::fPtr : nullptr; }
    ^
frameworks/base/libs/hwui/pipeline/skia/SkiaPipeline.h:50:30: note: passing argument to parameter 'surface' here
            sk_sp<SkSurface> surface);
                             ^
frameworks/base/libs/hwui/tests/unit/SkiaPipelineTests.cpp:312:58: error: no viable conversion from 'sk_sp<DeferLayer<ClippedTestCanvas>>' to 'sk_sp<SkSurface>'
            SkRect::MakeWH(CANVAS_WIDTH, CANVAS_HEIGHT), surface);
                                                         ^~~~~~~
external/skia/include/core/SkRefCnt.h:253:15: note: candidate constructor not viable: no known conversion from 'sk_sp<DeferLayer<ClippedTestCanvas> >' to 'std::nullptr_t' (aka 'nullptr_t') for 1st argument
    constexpr sk_sp(std::nullptr_t) : fPtr(nullptr) {}
              ^
external/skia/include/core/SkRefCnt.h:259:5: note: candidate constructor not viable: no known conversion from 'sk_sp<DeferLayer<ClippedTestCanvas> >' to 'const sk_sp<SkSurface> &' for 1st argument
    sk_sp(const sk_sp<T>& that) : fPtr(SkSafeRef(that.get())) {}
    ^
external/skia/include/core/SkRefCnt.h:268:5: note: candidate constructor not viable: no known conversion from 'sk_sp<DeferLayer<ClippedTestCanvas> >' to 'sk_sp<SkSurface> &&' for 1st argument
    sk_sp(sk_sp<T>&& that) : fPtr(that.release()) {}
    ^
external/skia/include/gpu/../private/SkTLogic.h:27:82: note: candidate template ignored: disabled by 'enable_if' [with U = (anonymous namespace)::DeferLayer<ClippedTestCanvas>]
template <bool B, typename T = void> using enable_if_t = typename std::enable_if<B, T>::type;
                                                                                 ^
external/skia/include/gpu/../private/SkTLogic.h:27:82: note: candidate template ignored: disabled by 'enable_if' [with U = (anonymous namespace)::DeferLayer<ClippedTestCanvas>]
external/skia/include/core/SkRefCnt.h:327:5: note: candidate function
    operator unspecified_bool_type() const { return this->get() ? &sk_sp::fPtr : nullptr; }
    ^
frameworks/base/libs/hwui/pipeline/skia/SkiaPipeline.h:50:30: note: passing argument to parameter 'surface' here
            sk_sp<SkSurface> surface);
                             ^
frameworks/base/libs/hwui/tests/unit/SkiaPipelineTests.cpp:343:58: error: no viable conversion from 'sk_sp<DeferLayer<ClipReplaceTestCanvas>>' to 'sk_sp<SkSurface>'
            SkRect::MakeWH(CANVAS_WIDTH, CANVAS_HEIGHT), surface);
                                                         ^~~~~~~
external/skia/include/core/SkRefCnt.h:253:15: note: candidate constructor not viable: no known conversion from 'sk_sp<DeferLayer<ClipReplaceTestCanvas> >' to 'std::nullptr_t' (aka 'nullptr_t') for 1st argument
    constexpr sk_sp(std::nullptr_t) : fPtr(nullptr) {}
              ^
external/skia/include/core/SkRefCnt.h:259:5: note: candidate constructor not viable: no known conversion from 'sk_sp<DeferLayer<ClipReplaceTestCanvas> >' to 'const sk_sp<SkSurface> &' for 1st argument
    sk_sp(const sk_sp<T>& that) : fPtr(SkSafeRef(that.get())) {}
    ^
external/skia/include/core/SkRefCnt.h:268:5: note: candidate constructor not viable: no known conversion from 'sk_sp<DeferLayer<ClipReplaceTestCanvas> >' to 'sk_sp<SkSurface> &&' for 1st argument
    sk_sp(sk_sp<T>&& that) : fPtr(that.release()) {}
    ^
external/skia/include/gpu/../private/SkTLogic.h:27:82: note: candidate template ignored: disabled by 'enable_if' [with U = (anonymous namespace)::DeferLayer<ClipReplaceTestCanvas>]
template <bool B, typename T = void> using enable_if_t = typename std::enable_if<B, T>::type;
                                                                                 ^
external/skia/include/gpu/../private/SkTLogic.h:27:82: note: candidate template ignored: disabled by 'enable_if' [with U = (anonymous namespace)::DeferLayer<ClipReplaceTestCanvas>]
external/skia/include/core/SkRefCnt.h:327:5: note: candidate function
    operator unspecified_bool_type() const { return this->get() ? &sk_sp::fPtr : nullptr; }
    ^
frameworks/base/libs/hwui/pipeline/skia/SkiaPipeline.h:50:30: note: passing argument to parameter 'surface' here
            sk_sp<SkSurface> surface);
                             ^
frameworks/base/libs/hwui/tests/unit/SkiaPipelineTests.cpp:214:42: error: cannot initialize object parameter of type 'SkSurface' with an expression of type '(anonymous namespace)::DeferLayer<DeferTestCanvas>'
    T* canvas() { return static_cast<T*>(getCanvas()); }
                                         ^~~~~~~~~
frameworks/base/libs/hwui/tests/unit/SkiaPipelineTests.cpp:282:27: note: in instantiation of member function '(anonymous namespace)::DeferLayer<DeferTestCanvas>::canvas' requested here
    EXPECT_EQ(4, surface->canvas()->mDrawCounter);
                          ^
frameworks/base/libs/hwui/tests/unit/SkiaPipelineTests.cpp:214:42: error: cannot initialize object parameter of type 'SkSurface' with an expression of type '(anonymous namespace)::DeferLayer<ClippedTestCanvas>'
    T* canvas() { return static_cast<T*>(getCanvas()); }
                                         ^~~~~~~~~
frameworks/base/libs/hwui/tests/unit/SkiaPipelineTests.cpp:313:27: note: in instantiation of member function '(anonymous namespace)::DeferLayer<ClippedTestCanvas>::canvas' requested here
    EXPECT_EQ(1, surface->canvas()->mDrawCounter);
                          ^
frameworks/base/libs/hwui/tests/unit/SkiaPipelineTests.cpp:214:42: error: cannot initialize object parameter of type 'SkSurface' with an expression of type '(anonymous namespace)::DeferLayer<ClipReplaceTestCanvas>'
    T* canvas() { return static_cast<T*>(getCanvas()); }
                                         ^~~~~~~~~
frameworks/base/libs/hwui/tests/unit/SkiaPipelineTests.cpp:344:27: note: in instantiation of member function '(anonymous namespace)::DeferLayer<ClipReplaceTestCanvas>::canvas' requested here
    EXPECT_EQ(1, surface->canvas()->mDrawCounter);

Original change's description:
> Revert "Revert "Remove budgeted parameter from SkSurface::makeImageSnapshot""
> 
> This reverts commit 9e9188f84b.
> 
> Reason for revert: Android-side fix has landed
> 
> Original change's description:
> > Revert "Remove budgeted parameter from SkSurface::makeImageSnapshot"
> > 
> > This reverts commit b64bcbdc3a.
> > 
> > Reason for revert: 
> > 
> > Android build failed as shown below.
> > 
> > frameworks/base/libs/hwui/VkLayer.cpp:32:41: error: too many arguments to function call, expected 0, have 1
> >     mImage = surface->makeImageSnapshot(SkBudgeted::kNo);
> > 
> > Original change's description:
> > > Remove budgeted parameter from SkSurface::makeImageSnapshot
> > > 
> > > This unused feature complicates MDB.
> > > 
> > > Chrome compiles locally for me with this CL.
> > > 
> > > Change-Id: I611e464885fb984030eace43ead42cf39d0e7f72
> > > Reviewed-on: https://skia-review.googlesource.com/9734
> > > 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: Iae6e313c15b2352bd0d4fc7b5629de0a51ac398e
> > Reviewed-on: https://skia-review.googlesource.com/9788
> > Reviewed-by: Yuqian Li <liyuqian@google.com>
> > Commit-Queue: Yuqian Li <liyuqian@google.com>
> > 
> 
> TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org,liyuqian@google.com
> # Not skipping CQ checks because original CL landed > 1 day ago.
> 
> Change-Id: If07d1b5db6e6c618d37445a0cf127780ed243a92
> Reviewed-on: https://skia-review.googlesource.com/9843
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> 

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

Change-Id: I674b0a9d4130e00164d2e0344a92c373cf70f4fd
Reviewed-on: https://skia-review.googlesource.com/9873
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2017-03-17 20:50:19 +00:00
Brian Salomon
50f66d805b Be explicit on test and perf bots about GL vs GLES
This changes the names of several shorthand names for gpu configs to be prefixed either with "gl" or "gles" and makes the bots only use such configs. It adds some missing named configs.

Change-Id: Iea4e0e2ddafe0ac08e623111a15be7335156957c
Reviewed-on: https://skia-review.googlesource.com/9833
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
2017-03-17 19:09:37 +00:00
Robert Phillips
31249bb2df Revert "Revert "Remove budgeted parameter from SkSurface::makeImageSnapshot""
This reverts commit 9e9188f84b.

Reason for revert: Android-side fix has landed

Original change's description:
> Revert "Remove budgeted parameter from SkSurface::makeImageSnapshot"
> 
> This reverts commit b64bcbdc3a.
> 
> Reason for revert: 
> 
> Android build failed as shown below.
> 
> frameworks/base/libs/hwui/VkLayer.cpp:32:41: error: too many arguments to function call, expected 0, have 1
>     mImage = surface->makeImageSnapshot(SkBudgeted::kNo);
> 
> Original change's description:
> > Remove budgeted parameter from SkSurface::makeImageSnapshot
> > 
> > This unused feature complicates MDB.
> > 
> > Chrome compiles locally for me with this CL.
> > 
> > Change-Id: I611e464885fb984030eace43ead42cf39d0e7f72
> > Reviewed-on: https://skia-review.googlesource.com/9734
> > 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: Iae6e313c15b2352bd0d4fc7b5629de0a51ac398e
> Reviewed-on: https://skia-review.googlesource.com/9788
> Reviewed-by: Yuqian Li <liyuqian@google.com>
> Commit-Queue: Yuqian Li <liyuqian@google.com>
> 

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

Change-Id: If07d1b5db6e6c618d37445a0cf127780ed243a92
Reviewed-on: https://skia-review.googlesource.com/9843
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-03-17 17:44:01 +00:00
Brian Osman
c35a2d4a34 Add nondeterministic seed option for ProcessorOptimization test
BUG=skia:

Change-Id: Ie1dad1ab164eb36635095595e3200ae16e328832
Reviewed-on: https://skia-review.googlesource.com/9830
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-03-17 17:38:01 +00:00
Brian Salomon
c48af93460 Revert "Remove GrPipeline from GrDrawOp."
This reverts commit 2bf4b3a97b.

Reason for revert: nanobench assertion

Original change's description:
> Remove GrPipeline from GrDrawOp.
> 
> GrDrawOp subclasses are now free to construct their pipelines at flush time and now in theory could use multiple GrPipelines for multipass rendering.
> 
> GrProcessorSet may be used to retain the processors from a GrPaint with "pending execution" style refs.
> 
> NVPR and Instanced rendering are updated to create their pipelines at flush time without a GrPipelineBuilder.
> 
> The monolithic pipeline creation/management that was on GrDrawOp is moved to GrMeshDrawOp. However, this is temporary and will be removed in coming changes.
> 
> Change-Id: I124282e3cea5d070970b5460c8a679fcaf7a8eff
> Reviewed-on: https://skia-review.googlesource.com/7279
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> 

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

Change-Id: I1bc64f6cbbd5f482417637a034342c2b5371dc5c
Reviewed-on: https://skia-review.googlesource.com/9817
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-03-16 19:51:55 +00:00
Mike Reed
aa9e3326f7 Revert[4] "store vertices arrays inline with object""""
This reverts commit 0c492cfe17.

BUG=skia:

Change-Id: I63bce834fee6dd6f043b3889ac4ec287dd03d2e6
Reviewed-on: https://skia-review.googlesource.com/9809
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-16 19:17:11 +00:00
Brian Salomon
2bf4b3a97b Remove GrPipeline from GrDrawOp.
GrDrawOp subclasses are now free to construct their pipelines at flush time and now in theory could use multiple GrPipelines for multipass rendering.

GrProcessorSet may be used to retain the processors from a GrPaint with "pending execution" style refs.

NVPR and Instanced rendering are updated to create their pipelines at flush time without a GrPipelineBuilder.

The monolithic pipeline creation/management that was on GrDrawOp is moved to GrMeshDrawOp. However, this is temporary and will be removed in coming changes.

Change-Id: I124282e3cea5d070970b5460c8a679fcaf7a8eff
Reviewed-on: https://skia-review.googlesource.com/7279
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-03-16 19:10:15 +00:00
Mike Reed
0c492cfe17 Revert[3] "store vertices arrays inline with object"""
This reverts commit 7d9f9e3020.

Reason for revert: speculative revert to try to fix google3

Original change's description:
> Revert[2] "store vertices arrays inline with object""
> 
> This reverts commit 9e62df6ecd.
> 
> Reason for revert: behavior in reader32 fixed
> 
> Fix is here: https://skia-review.googlesource.com/c/9729/
> 
> Original change's description:
> > Revert "store vertices arrays inline with object"
> > 
> > This reverts commit eaaebb19a1.
> > 
> > Reason for revert: may call SkReader32::read(null, 0) -- reader needs to handle this
> > 
> > Original change's description:
> > > store vertices arrays inline with object
> > > 
> > > Also unify some of naming (esp. around texCoords)
> > > 
> > > BUG=skia:6366
> > > 
> > > Change-Id: I5a6793f029cccf0cd0a2c1d180b259ce4eab526f
> > > Reviewed-on: https://skia-review.googlesource.com/9705
> > > Commit-Queue: Mike Reed <reed@google.com>
> > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > 
> > 
> > TBR=bsalomon@google.com,reed@google.com,reviews@skia.org
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=skia:6366
> > 
> > Change-Id: Ie421654bcd74d74f8be6676291e3d6e16e2a7a16
> > Reviewed-on: https://skia-review.googlesource.com/9727
> > Reviewed-by: Mike Reed <reed@google.com>
> > Commit-Queue: Mike Reed <reed@google.com>
> > 
> 
> TBR=bsalomon@google.com,reviews@skia.org,reed@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:6366
> 
> Change-Id: I1f12108fff8f551d66455cfadd6d5dd9412e9aa8
> Reviewed-on: https://skia-review.googlesource.com/9760
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
> 

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

Change-Id: Ie23130a07fbecd5664e37291bc167008a6b496bc
Reviewed-on: https://skia-review.googlesource.com/9806
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-16 16:44:39 +00:00
Yuqian Li
9e9188f84b Revert "Remove budgeted parameter from SkSurface::makeImageSnapshot"
This reverts commit b64bcbdc3a.

Reason for revert: 

Android build failed as shown below.

frameworks/base/libs/hwui/VkLayer.cpp:32:41: error: too many arguments to function call, expected 0, have 1
    mImage = surface->makeImageSnapshot(SkBudgeted::kNo);

Original change's description:
> Remove budgeted parameter from SkSurface::makeImageSnapshot
> 
> This unused feature complicates MDB.
> 
> Chrome compiles locally for me with this CL.
> 
> Change-Id: I611e464885fb984030eace43ead42cf39d0e7f72
> Reviewed-on: https://skia-review.googlesource.com/9734
> 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: Iae6e313c15b2352bd0d4fc7b5629de0a51ac398e
Reviewed-on: https://skia-review.googlesource.com/9788
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2017-03-16 15:05:04 +00:00
Robert Phillips
b64bcbdc3a Remove budgeted parameter from SkSurface::makeImageSnapshot
This unused feature complicates MDB.

Chrome compiles locally for me with this CL.

Change-Id: I611e464885fb984030eace43ead42cf39d0e7f72
Reviewed-on: https://skia-review.googlesource.com/9734
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-03-16 13:36:06 +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
Brian Salomon
69225d0250 Make SkTArray not allocate unless reserve or initial count > 0
This also makes it so that it doesn't shrink back into preallocated storage and therefore doesn't need to store the reserve count.

Change-Id: Ia320fed04c329641a5494947db39cefd2fb6d80f
Reviewed-on: https://skia-review.googlesource.com/9531
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-03-16 13:08:04 +00:00
Hal Canary
0b83319b7f SkDynamicMemoryWStream::detachAsStream() returns unique_ptr
https://crrev.com/2747183002 must land first.
Change-Id: I65d1285a24d63c2c2f18662d511dea1c399511e1
Reviewed-on: https://skia-review.googlesource.com/9682
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2017-03-15 19:25:45 +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
Mike Reed
7d9f9e3020 Revert[2] "store vertices arrays inline with object""
This reverts commit 9e62df6ecd.

Reason for revert: behavior in reader32 fixed

Fix is here: https://skia-review.googlesource.com/c/9729/

Original change's description:
> Revert "store vertices arrays inline with object"
> 
> This reverts commit eaaebb19a1.
> 
> Reason for revert: may call SkReader32::read(null, 0) -- reader needs to handle this
> 
> Original change's description:
> > store vertices arrays inline with object
> > 
> > Also unify some of naming (esp. around texCoords)
> > 
> > BUG=skia:6366
> > 
> > Change-Id: I5a6793f029cccf0cd0a2c1d180b259ce4eab526f
> > Reviewed-on: https://skia-review.googlesource.com/9705
> > Commit-Queue: Mike Reed <reed@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > 
> 
> TBR=bsalomon@google.com,reed@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:6366
> 
> Change-Id: Ie421654bcd74d74f8be6676291e3d6e16e2a7a16
> Reviewed-on: https://skia-review.googlesource.com/9727
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
> 

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

Change-Id: I1f12108fff8f551d66455cfadd6d5dd9412e9aa8
Reviewed-on: https://skia-review.googlesource.com/9760
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-15 18:35:18 +00:00
Mike Reed
cd9ada5507 must check for zero-length in reader32::read() before calling memcpy
memcpy's behavior is undefined if the dst-ptr is null, but reader32 supports
null as long as the size is 0, so it needs to check explicitly before
calling memcpy. This is implemented (now) by calling sk_careful_memcpy.

BUG=skia:

Change-Id: I7033cc5e6d724f50f0aafd9808e297b953848aa7
Reviewed-on: https://skia-review.googlesource.com/9729
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-15 18:16:30 +00:00
Brian Osman
2f3865b508 Fix formatting error in test output
BUG=skia:

Change-Id: I36824a4a3fcae3a75157706b769047a82cb3c289
Reviewed-on: https://skia-review.googlesource.com/9728
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-03-15 18:06:33 +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
Mike Reed
9e62df6ecd Revert "store vertices arrays inline with object"
This reverts commit eaaebb19a1.

Reason for revert: may call SkReader32::read(null, 0) -- reader needs to handle this

Original change's description:
> store vertices arrays inline with object
> 
> Also unify some of naming (esp. around texCoords)
> 
> BUG=skia:6366
> 
> Change-Id: I5a6793f029cccf0cd0a2c1d180b259ce4eab526f
> Reviewed-on: https://skia-review.googlesource.com/9705
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> 

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

Change-Id: Ie421654bcd74d74f8be6676291e3d6e16e2a7a16
Reviewed-on: https://skia-review.googlesource.com/9727
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-15 17:32:48 +00:00
Mike Reed
eaaebb19a1 store vertices arrays inline with object
Also unify some of naming (esp. around texCoords)

BUG=skia:6366

Change-Id: I5a6793f029cccf0cd0a2c1d180b259ce4eab526f
Reviewed-on: https://skia-review.googlesource.com/9705
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-03-15 16:46:53 +00:00
Brian Osman
bd1f76fecf Emit dumpInfo string when processor opt test fails
Add missing implementation for ComposeTwo, and provide more information in
ComposeOne.

BUG=skia:

Change-Id: Id2406bcb51a6419a763ff9e6e572f5c6c70c4c76
Reviewed-on: https://skia-review.googlesource.com/9699
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-03-15 16:29:53 +00:00
Robert Phillips
296b1ccf9b Retract GrContext from src/gpu/effects
Change-Id: Iceb7263098286bafb2605ef17d1fe6bb25d71e97
Reviewed-on: https://skia-review.googlesource.com/9693
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-03-15 15:20:40 +00:00
Hal Canary
dabe8acb7f SkDynamicMemoryWStream::detachAsData more memory efficent
I did some testing with very large datasets, and the difference in max
RSS is measurable and significant.

Change-Id: I6bb2f795d5b4f6ebdba42c3089dc85a278355d48
Reviewed-on: https://skia-review.googlesource.com/9686
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2017-03-15 12:54:49 +00:00
Mike Reed
9a8065d34d add uniqueID
BUG=skia:6366

Change-Id: Ie3215a392040be645524a2294d824d953ba3a1b6
Reviewed-on: https://skia-review.googlesource.com/9703
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-15 01:32:38 +00:00
Robert Phillips
26c90e0479 Add GrRenderTargetContext::resourceProvider & GrResourceProvider::caps
and retract GrSurfaceContextPriv a bit

Change-Id: Id47af1052f9bda4fe7c85b3ce46b3ebe37797524
Reviewed-on: https://skia-review.googlesource.com/9647
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-03-14 21:23:44 +00:00
Brian Salomon
97180af7f5 Compute clipped draw bounds outside GrAppliedClip.
We will be storing GrAppliedClips alongside ops. The op already stores the
clipped bounds. If GrAppliedClip has draw bounds then as ops combine the
GrAppliedClip's bounds should be merged to be consistent. However, we won't
actually ever use those bounds again so it would be wasteful to merge them.

Change-Id: I4ef3010dc04761e256120a2e0e074bc3c6ff6ca1
Reviewed-on: https://skia-review.googlesource.com/9642
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2017-03-14 18:51:49 +00:00
Matt Sarett
6de1310981 Begin implementation of SkImage_Base::makeColorSpace
Originally:
https://skia-review.googlesource.com/9622

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Release,Test-Android-Clang-PixelC-CPU-TegraX1-arm64-Debug-Android

BUG=skia:

Change-Id: I7ef1daaab32892399e3333e4b2fc75d70a1900e4
Reviewed-on: https://skia-review.googlesource.com/9651
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
2017-03-14 18:44:36 +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
8f7d9b9784 Revert "Begin implementation of SkImage_Base::makeColorSpace"
This reverts commit 98629efdde.

Reason for revert: unittest failures
Failures:
	../../../tests/ImageTest.cpp:1099	0x28 == SkGetPackedR32(*p3Bitmap.getAddr32(0, 0))
	../../../tests/ImageTest.cpp:1100	0x40 == SkGetPackedG32(*p3Bitmap.getAddr32(0, 0))
	../../../tests/ImageTest.cpp:1101	0x5E == SkGetPackedB32(*p3Bitmap.getAddr32(0, 0))


Original change's description:
> Begin implementation of SkImage_Base::makeColorSpace
> 
> BUG=skia:
> 
> Change-Id: Idf946faa64dad32a28070a430926a8225dbf6e5a
> Reviewed-on: https://skia-review.googlesource.com/9622
> Commit-Queue: Matt Sarett <msarett@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> 

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

Change-Id: I6ce2a28ca581f7d01322588c2435133d8c6a2435
Reviewed-on: https://skia-review.googlesource.com/9649
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-14 16:42:21 +00:00
Matt Sarett
98629efdde Begin implementation of SkImage_Base::makeColorSpace
BUG=skia:

Change-Id: Idf946faa64dad32a28070a430926a8225dbf6e5a
Reviewed-on: https://skia-review.googlesource.com/9622
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-03-14 14:42:37 +00:00
Robert Phillips
4f7062378e Restore deferred GPU resources in Chrome
Change-Id: Ib52668b46e7d077175dcba12a3ccc8abc1f0c7a9
Reviewed-on: https://skia-review.googlesource.com/9552
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-03-13 16:25:45 +00:00
Brian Salomon
8d2f90b37b Changes to GrProcessorSet::FragmentProcessorAnalysis to prepare for deferred pipeline creation.
This compacts the object so that it is more efficient for ops to store it.

It also adds a new constructor and query that will allow ops to use the analysis to also store the GrPaint's color.

This has the side effect of limiting the number of color processors on a GrProcessorSet to 64K which is just under 64K more than should ever be needed.

Change-Id: I4e6bc8e3f81bb2ff6a73af685beb6fb928a3de67
Reviewed-on: https://skia-review.googlesource.com/8972
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-03-13 14:26:52 +00:00
Brian Osman
766fcbb01c Treat cross context images as Ganesh-created resources
Always create them budgeted, and register them with the cache (not as
wrapped resources).

Re-land (with fixes) of: https://skia-review.googlesource.com/9497

BUG=skia:

Change-Id: I2df7198adc99efa3eea99fc86b0b2930136f22c7
Reviewed-on: https://skia-review.googlesource.com/9544
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-03-13 14:07:46 +00:00
Florin Malita
3a9a7a310c Remove run count field from SkTextBlob.
We can flag the last run record instead.  Run iteration is always
sequential, so no penalty.

As a side effect, we can no longer allow instantiation of zero-run text
blobs - but that seems like a good idea anyway.

Change-Id: I7ca80c4780623d5a188f92dfe6d6fe152f20f666
Reviewed-on: https://skia-review.googlesource.com/9149
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
2017-03-13 13:36:54 +00:00
Florin Malita
d54639f768 Add SkSTArray move assignment operators
Change-Id: Ib655a8a4d62c27dee4f92fcb644237f6fbbdb75b
Reviewed-on: https://skia-review.googlesource.com/9510
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
2017-03-12 15:15:14 +00:00
Brian Osman
a6953f2a07 Revert "Treat cross context images as Ganesh-created resources"
This reverts commit cccda60aca.

Reason for revert: Android and Windows bot failures.

Original change's description:
> Treat cross context images as Ganesh-created resources
> 
> Always create them budgeted, and register them with the cache (not as
> wrapped resources).
> 
> BUG=skia:
> 
> Change-Id: Id18ecf6e9e512db4be21b4f2bfd8e8c060bbe805
> Reviewed-on: https://skia-review.googlesource.com/9497
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> 

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

Change-Id: Ib7bebcad33037dd206c9b06b5cb6c503b00accba
Reviewed-on: https://skia-review.googlesource.com/9541
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-03-10 20:14:19 +00:00
Ben Wagner
4d1955c43a Fix SkFILEStream.
Change-Id: I8c66e4e3e857227aed3d0bc497982f4c0d96d917
Reviewed-on: https://skia-review.googlesource.com/9498
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2017-03-10 19:58:46 +00:00
Mike Reed
dc9f0dbe4c Check for bad bounds in picture cullbounds
BUG=skia:

Change-Id: Icaed150fa005ba7539bcca4646710b42dfcbf94a
Reviewed-on: https://skia-review.googlesource.com/9536
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-10 19:58:14 +00:00
Brian Osman
cccda60aca Treat cross context images as Ganesh-created resources
Always create them budgeted, and register them with the cache (not as
wrapped resources).

BUG=skia:

Change-Id: Id18ecf6e9e512db4be21b4f2bfd8e8c060bbe805
Reviewed-on: https://skia-review.googlesource.com/9497
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-03-10 19:38:37 +00:00
Florin Malita
053730de73 Fix SkTHashTable dangling values
The element rearrange logic in SkTHashTable::remove() marks empty slots
as such, but does not reset their value.

When breaking out of the rearrange loop, we must also reset the last empty
slot value to avoid retaining unwanted copies.

Change-Id: I8ba2a25088c0aa5210277124e0917224cb295691
Reviewed-on: https://skia-review.googlesource.com/9533
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-03-10 17:28:04 +00:00
Mike Reed
566e53c700 re-guard against negative dimensions on no-draw canvas
We used to (incidentally) guard for this when we used bitmapdevice as our backnig.
Now that we have a (faster) nodrawdevice, we need to explicitly guard for it.

BUG=skia:

Change-Id: I9cbbf064cbfced78f0004a2e5aff60aa3ded6215
Reviewed-on: https://skia-review.googlesource.com/9530
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-10 16:29:32 +00:00
Brian Osman
0b791f57c4 Remove ownership aruments from render target wrap functions
We never adopt render targets (just borrow them).

BUG=skia:

Change-Id: Ie899b814a7a81339a8735bbd7ad9facc66e580d7
Reviewed-on: https://skia-review.googlesource.com/9525
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-03-10 15:41:38 +00:00
Brian Salomon
649a3411f9 Add a separate draw function to GrRenderTargetContext for GrMeshDrawOp derived classes.
The first phase of deferring GrPipeline creation until flush will apply only to GrDrawOp subclasses that do not derive from GrMeshDrawOp. This change prepares for that by creating separate draw functions on GrRenderTargetContext for GrMeshDrawOp-derived ops. This is temporary and will incrementally be undone as pipeline-creation deferral rolls out to the GrMeshDrawOps in a later phase of this work.


Change-Id: I0f5b71fe913f3273cfe9e965f7d8bbe7f01ad0ef
Reviewed-on: https://skia-review.googlesource.com/9481
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-03-09 19:26:13 +00:00
Florin Malita
c2d5bd0117 Fix SkTArray copy construction
We can't use memcpy for copy construction, even when MEM_COPY == true.

Change-Id: I50eb369f0fbf77e8f0ad5a148c67d46df0d3ab0e
Reviewed-on: https://skia-review.googlesource.com/9487
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
2017-03-09 19:17:16 +00:00
Mike Reed
84dd857935 make GrPaint.h private -- IWYU
prerequisit: https://codereview.chromium.org/2743533002/

BUG=skia:

Change-Id: I8c2f34a6df165744ddeaeabb562cd6d6a9679b6a
Reviewed-on: https://skia-review.googlesource.com/9461
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-09 14:59:32 +00:00
Brian Salomon
c65aec9761 Make GrClip.h private
BUG=skia:

Change-Id: I4aa3c2707811ece3a63d161035e316c3bbc1cd15
Reviewed-on: https://skia-review.googlesource.com/9482
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-03-09 14:39:24 +00:00
Cary Clark
4eed4c8850 limit addEndMoveSpans loop in pathops
Prevent addEndMoveSpans from looping
forever and abort with an error
if the loop count is crazy big.

R=kjlubick@google.com
BUG=684553

Change-Id: I16c250c0b2f88534f809aba17a18081aea4e1f44
Reviewed-on: https://skia-review.googlesource.com/9458
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2017-03-09 14:11:11 +00:00
Mike Reed
8310f0e051 Revert "remove SkClipVisitor"
This reverts commit 91b961d33d.

Reason for revert: need to update caller in android

Original change's description:
> remove SkClipVisitor
> 
> With new device clipping, this is unsupported on SkCanvas
> 
> BUG=skia:
> 
> Change-Id: I39443f213be1005b8b9208d604e4bfb31cbda424
> Reviewed-on: https://skia-review.googlesource.com/9349
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> 

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

Change-Id: I22df0c66ec564ca32355179d2ee5ea14bff7b1d5
Reviewed-on: https://skia-review.googlesource.com/9456
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-08 21:42:51 +00:00
Brian Osman
3b65598bce Make SkGr.h private and remove unused functions
BUG=skia:

Change-Id: I6699d00c5412ed9d9bf14b032a08b06b1c766bce
Reviewed-on: https://skia-review.googlesource.com/9398
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-03-08 20:55:21 +00:00
Herb Derby
3139de39d7 Remove SkChunckAlloc
Change-Id: Ia400dd2d8aa398cf53852acd71c4a45228752496
Reviewed-on: https://skia-review.googlesource.com/9328
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2017-03-08 20:06:15 +00:00
Mike Reed
91b961d33d remove SkClipVisitor
With new device clipping, this is unsupported on SkCanvas

BUG=skia:

Change-Id: I39443f213be1005b8b9208d604e4bfb31cbda424
Reviewed-on: https://skia-review.googlesource.com/9349
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-03-08 19:53:01 +00:00
Mike Reed
90b2005327 remove SkPictureUtils.h
BUG=skia:

Change-Id: Iab6e71f347fa34baf442e38ba7773058695f3e6d
Reviewed-on: https://skia-review.googlesource.com/9348
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2017-03-08 19:44:43 +00:00
Herb Derby
c3cc5fa6de Move from SkChunkAlloc to SkArenaAlloc for PathOps
Attempt two. Remove ~SkOpContour because it is handled by the SkArenaAlloc.

Change-Id: Id3049db97aebcc1009d403a031f2fac219f58f2f
Reviewed-on: https://skia-review.googlesource.com/9381
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2017-03-07 17:56:41 +00:00
Mike Reed
a1361364e6 Revert[6] "Remove SkDraw from device-draw methods, and enable device-centric clipping.""""""
Previous failure was failure to detect that the clip wasn't wide-open when
optimizing for retain-vs-discard in copy-on-write. gm:copy_on_write_retain
detected this. Now fixed by adding new method to SkBaseDevice.h

This reverts commit 27d07f0acb.

BUG=skia:6214

Change-Id: I532d16ec075a4525c2a550b1157bcec695dd8efd
Reviewed-on: https://skia-review.googlesource.com/9341
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-07 15:43:03 +00:00
Derek Sollenberger
c0a4c4f969 Revert "Move from SkChunkAlloc to SkArenaAlloc for PathOps"
This reverts commit 38c6018024.

Reason for revert: breaking ASAN run in TAP build

Original change's description:
> Move from SkChunkAlloc to SkArenaAlloc for PathOps
> 
> Change-Id: Iab111a4ebcae4e896b1fdfe285def9ef0ae2ab6b
> Reviewed-on: https://skia-review.googlesource.com/7314
> Reviewed-by: Cary Clark <caryclark@google.com>
> Commit-Queue: Herb Derby <herb@google.com>
> 

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

Change-Id: I6364254571bb1617a9f45ed08f2af4a59f9d5841
Reviewed-on: https://skia-review.googlesource.com/9335
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2017-03-07 11:15:10 +00:00
Mike Klein
f3b16d01e3 fix RecordOptsTest.cpp on Android framework
Change-Id: Iea45ece603cf0700860f55860b565c73088dca14
Reviewed-on: https://skia-review.googlesource.com/9333
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-03-07 01:43:10 +00:00
Yuqian Li
05a429614e Turn off savelayer optimization for Android framework
This is a simpler version of https://skia-review.googlesource.com/c/8970/

Note that we couldn't do the optimization and add back the clip effect by
another clipRect or clipPath call because the final matrix is not available at
recording time.

BUG=skia:6334

Change-Id: I3ca091bdc1ee1d265a79fb88d0a6f9afe2b27e58
Reviewed-on: https://skia-review.googlesource.com/9311
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2017-03-06 21:30:12 +00:00
Herb Derby
38c6018024 Move from SkChunkAlloc to SkArenaAlloc for PathOps
Change-Id: Iab111a4ebcae4e896b1fdfe285def9ef0ae2ab6b
Reviewed-on: https://skia-review.googlesource.com/7314
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2017-03-06 19:48:56 +00:00
Matt Sarett
d83545e490 Add SkColorSpace::isSRGB()
BUG=skia:

Change-Id: I124480a15e0c3cb01f4e22397c0a116f2d1c0d7d
Reviewed-on: https://skia-review.googlesource.com/9239
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-03-06 17:26:09 +00:00
Matt Sarett
0bb6f38e51 Add unit tests for SkImage::colorSpace()
BUG=skia:

Change-Id: I1cb4bd1b5ca02f37bd08679803cf645b4d5ecc00
Reviewed-on: https://skia-review.googlesource.com/9297
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-03-06 16:24:43 +00:00
Brian Salomon
1c10fddd1f Remove XP override color.
The only use case for this was using the blend constant for LCD text. Now instead of overriding the op's color with an alpha we upload the alpha as a uniform.

This also removes two unused parameters from GrXferProcessor::getOptimizations.

Change-Id: I8268da9904a5d26649c6ae81a5705b0930893904
Reviewed-on: https://skia-review.googlesource.com/9221
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-03-06 13:39:09 +00:00
Mike Reed
27d07f0acb Revert "Revert "Revert "Revert[2] "Remove SkDraw from device-draw methods, and enable device-centric clipping."""""
This reverts commit 025e2444c1.

Reason for revert: layouttest failures -- need to rebase these (tiny diffs in gradients)

https://storage.googleapis.com/chromium-layout-test-archives/linux_trusty_blink_rel/6018/layout-test-results/results.html

Original change's description:
> Revert "Revert "Revert[2] "Remove SkDraw from device-draw methods, and enable device-centric clipping.""""
> 
> This reverts commit baf06bc89a.
> 
> Reason for revert: reland to diagnose possible g3 failure
> 
> Original change's description:
> > Revert "Revert[2] "Remove SkDraw from device-draw methods, and enable device-centric clipping."""
> > 
> > This reverts commit cfaa63237b.
> > 
> > Reason for revert: speculative revert to fix Google3
> > 
> > Original change's description:
> > > Revert[2] "Remove SkDraw from device-draw methods, and enable device-centric clipping.""
> > > 
> > > passes new (augmented) CanvasClipType unittest
> > > fixed rasterclipstack::setnewsize
> > > 
> > > This reverts commit ea5e676a7b.
> > > 
> > > BUG=skia:
> > > 
> > > Change-Id: I004653e0f4d01454662f8516fccab0046486f273
> > > Reviewed-on: https://skia-review.googlesource.com/9185
> > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > Commit-Queue: Mike Reed <reed@google.com>
> > > 
> > 
> > TBR=bsalomon@google.com,reed@google.com,reviews@skia.org
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=skia:
> > 
> > Change-Id: Ibd7ee6383999f008eb6ee59c1c3f1c06a86044ea
> > Reviewed-on: https://skia-review.googlesource.com/9230
> > Reviewed-by: Cary Clark <caryclark@google.com>
> > Commit-Queue: Cary Clark <caryclark@google.com>
> > 
> 
> TBR=bsalomon@google.com,reviews@skia.org,caryclark@google.com,reed@google.com,mtklein@chromium.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
> 
> Change-Id: I093fa8788056be39af01191bbf3a9e5de9f73954
> Reviewed-on: https://skia-review.googlesource.com/9244
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
> 

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

Change-Id: I58f810a8ff241dbaf3133e2fe844548fcd0fa67a
Reviewed-on: https://skia-review.googlesource.com/9245
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-04 21:48:01 +00:00
Mike Reed
025e2444c1 Revert "Revert "Revert[2] "Remove SkDraw from device-draw methods, and enable device-centric clipping.""""
This reverts commit baf06bc89a.

Reason for revert: reland to diagnose possible g3 failure

Original change's description:
> Revert "Revert[2] "Remove SkDraw from device-draw methods, and enable device-centric clipping."""
> 
> This reverts commit cfaa63237b.
> 
> Reason for revert: speculative revert to fix Google3
> 
> Original change's description:
> > Revert[2] "Remove SkDraw from device-draw methods, and enable device-centric clipping.""
> > 
> > passes new (augmented) CanvasClipType unittest
> > fixed rasterclipstack::setnewsize
> > 
> > This reverts commit ea5e676a7b.
> > 
> > BUG=skia:
> > 
> > Change-Id: I004653e0f4d01454662f8516fccab0046486f273
> > Reviewed-on: https://skia-review.googlesource.com/9185
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Mike Reed <reed@google.com>
> > 
> 
> TBR=bsalomon@google.com,reed@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
> 
> Change-Id: Ibd7ee6383999f008eb6ee59c1c3f1c06a86044ea
> Reviewed-on: https://skia-review.googlesource.com/9230
> Reviewed-by: Cary Clark <caryclark@google.com>
> Commit-Queue: Cary Clark <caryclark@google.com>
> 

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

Change-Id: I093fa8788056be39af01191bbf3a9e5de9f73954
Reviewed-on: https://skia-review.googlesource.com/9244
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-04 19:43:35 +00:00
Brian Osman
32342f032e Rebase and fix chromium
Combine texture provider and resource provider

Largely mechanical. Only three places that were calling createApprox
via texture provider (ie without flags), so that was simple.

BUG=skia:

Change-Id: I876367bcdc6a8db736deedab1028de1972015509
Reviewed-on: https://skia-review.googlesource.com/9176
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-03-04 13:49:47 +00:00
Cary Clark
baf06bc89a Revert "Revert[2] "Remove SkDraw from device-draw methods, and enable device-centric clipping."""
This reverts commit cfaa63237b.

Reason for revert: speculative revert to fix Google3

Original change's description:
> Revert[2] "Remove SkDraw from device-draw methods, and enable device-centric clipping.""
> 
> passes new (augmented) CanvasClipType unittest
> fixed rasterclipstack::setnewsize
> 
> This reverts commit ea5e676a7b.
> 
> BUG=skia:
> 
> Change-Id: I004653e0f4d01454662f8516fccab0046486f273
> Reviewed-on: https://skia-review.googlesource.com/9185
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
> 

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

Change-Id: Ibd7ee6383999f008eb6ee59c1c3f1c06a86044ea
Reviewed-on: https://skia-review.googlesource.com/9230
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2017-03-03 20:27:22 +00:00
Mike Reed
cfaa63237b Revert[2] "Remove SkDraw from device-draw methods, and enable device-centric clipping.""
passes new (augmented) CanvasClipType unittest
fixed rasterclipstack::setnewsize

This reverts commit ea5e676a7b.

BUG=skia:

Change-Id: I004653e0f4d01454662f8516fccab0046486f273
Reviewed-on: https://skia-review.googlesource.com/9185
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-03 19:39:43 +00:00
Robert Phillips
2f49314227 Make GrSurface::MakeDeferred return sk_sp<GrTextureProxy>
This should make upcoming changes less tedious

Change-Id: I313ae9df724f109a64cf5708a974e8bfeb963025
Reviewed-on: https://skia-review.googlesource.com/9183
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-03-03 12:35:27 +00:00
Mike Reed
3b4c22d373 update cliptype test to exercise clipstack backend
BUG=skia:

Change-Id: Iaa54dd8d556db3cead723558e812d927376b08c0
Reviewed-on: https://skia-review.googlesource.com/9186
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-03 01:45:47 +00:00
Ben Wagner
373b538503 Release resources if SkMallocPixelRef::NewWithProc fails.
Change-Id: I29b96cd9f2d2311b4caae092102f501dbc6a4fe8
Reviewed-on: https://skia-review.googlesource.com/9182
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-03-02 23:11:42 +00:00
Mike Reed
cd667b6e58 add unittests for clip-state queries
BUG=skia:

Change-Id: I6f8d5a0e78c5b41caa6c6388f7f2ace050ed08ac
Reviewed-on: https://skia-review.googlesource.com/9171
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-02 21:02:39 +00:00
Mike Reed
ea5e676a7b Revert "Remove SkDraw from device-draw methods, and enable device-centric clipping."
This reverts commit c77e33f73d.

Reason for revert: breaks isClipRect
- this CL inspected the conservative clip for this, which is (by definition) a rect
- probably need to query the device for this info

Original change's description:
> Remove SkDraw from device-draw methods, and enable device-centric clipping.
> 
> BUG=skia:6214
> 
> Change-Id: I593900724310d09133ae4791ef68d38c43762fc2
> Reviewed-on: https://skia-review.googlesource.com/8806
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
> 

TBR=bsalomon@google.com,halcanary@google.com,msarett@google.com,robertphillips@google.com,fmalita@chromium.org,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:6214

Change-Id: I9090cbbb9f45b2dd204d9fdc187de2ff714b93f6
Reviewed-on: https://skia-review.googlesource.com/9172
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-02 20:22:48 +00:00
Derek Sollenberger
d7875f57bd Refactor SkLiteDL to no longer extend SkDrawable.
Change-Id: Ieaa849bceba0e98e4c99491c721fe945a0694e68
Reviewed-on: https://skia-review.googlesource.com/9111
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2017-03-02 20:16:17 +00:00
Mike Reed
c77e33f73d Remove SkDraw from device-draw methods, and enable device-centric clipping.
BUG=skia:6214

Change-Id: I593900724310d09133ae4791ef68d38c43762fc2
Reviewed-on: https://skia-review.googlesource.com/8806
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-02 18:57:45 +00:00
Brian Osman
655f347e28 Revert "Revert "Revert "Revert "Move GrTextureProvider to src""""
This reverts commit 580ffa0fb1.

Reason for revert: Okay, it landed.

Original change's description:
> Revert "Revert "Revert "Move GrTextureProvider to src"""
> 
> This reverts commit 2fe8373bb1.
> 
> Reason for revert: Google3 fix isn't landing.
> 
> Original change's description:
> > Revert "Revert "Move GrTextureProvider to src""
> > 
> > This reverts commit 13d7f5d7c2.
> > 
> > Reason for revert: Fixed client code. Re-landing.
> > 
> > Original change's description:
> > > Revert "Move GrTextureProvider to src"
> > > 
> > > This reverts commit 24429c68c5.
> > > 
> > > Reason for revert: Breaking a roll
> > > 
> > > Original change's description:
> > > > Move GrTextureProvider to src
> > > > 
> > > > With this hidden, we can make further simplification. Just want to test
> > > > this change against our external clients first, to make sure we're okay
> > > > to proceed.
> > > > 
> > > > BUG=skia:
> > > > 
> > > > Change-Id: I47f8c8f2912201c2890bc2f9a9d68aa92649a2d4
> > > > Reviewed-on: https://skia-review.googlesource.com/9072
> > > > Commit-Queue: Brian Osman <brianosman@google.com>
> > > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > > 
> > > 
> > > TBR=bsalomon@google.com,brianosman@google.com,benjaminwagner@google.com,reviews@skia.org
> > > NOPRESUBMIT=true
> > > NOTREECHECKS=true
> > > NOTRY=true
> > > BUG=skia:
> > > 
> > > Change-Id: I43cc135731245c29e24bbecf06ee46c562955c03
> > > Reviewed-on: https://skia-review.googlesource.com/9123
> > > Reviewed-by: Brian Osman <brianosman@google.com>
> > > Commit-Queue: Brian Osman <brianosman@google.com>
> > > 
> > 
> > TBR=bsalomon@google.com,benjaminwagner@google.com,reviews@skia.org,brianosman@google.com
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=skia:
> > 
> > Change-Id: Ibcb2ea34654315327c46ea8e4de5bf14376d9bdf
> > Reviewed-on: https://skia-review.googlesource.com/9127
> > Reviewed-by: Brian Osman <brianosman@google.com>
> > Commit-Queue: Brian Osman <brianosman@google.com>
> > 
> 
> TBR=bsalomon@google.com,benjaminwagner@google.com,reviews@skia.org,brianosman@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
> 
> Change-Id: If5c06c7608d76c45438d03fefb21c4edd7da4f36
> Reviewed-on: https://skia-review.googlesource.com/9128
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> 

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

Change-Id: I48da978fb73f914c09176e2fefa2882bc8a464a7
Reviewed-on: https://skia-review.googlesource.com/9150
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-03-02 18:37:00 +00:00
Robert Phillips
256c37bc9e Remove atlas creation from GrResourceProvider
This is pulled out of: https://skia-review.googlesource.com/c/6680/ (Make SkImage_Gpu be deferred) and is only tangentially related to the goal of that CL.

Change-Id: I6b6db4869597070f85ab3b9fea178fc88c104f87
Reviewed-on: https://skia-review.googlesource.com/9106
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-03-02 12:29:16 +00:00
Brian Osman
580ffa0fb1 Revert "Revert "Revert "Move GrTextureProvider to src"""
This reverts commit 2fe8373bb1.

Reason for revert: Google3 fix isn't landing.

Original change's description:
> Revert "Revert "Move GrTextureProvider to src""
> 
> This reverts commit 13d7f5d7c2.
> 
> Reason for revert: Fixed client code. Re-landing.
> 
> Original change's description:
> > Revert "Move GrTextureProvider to src"
> > 
> > This reverts commit 24429c68c5.
> > 
> > Reason for revert: Breaking a roll
> > 
> > Original change's description:
> > > Move GrTextureProvider to src
> > > 
> > > With this hidden, we can make further simplification. Just want to test
> > > this change against our external clients first, to make sure we're okay
> > > to proceed.
> > > 
> > > BUG=skia:
> > > 
> > > Change-Id: I47f8c8f2912201c2890bc2f9a9d68aa92649a2d4
> > > Reviewed-on: https://skia-review.googlesource.com/9072
> > > Commit-Queue: Brian Osman <brianosman@google.com>
> > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > 
> > 
> > TBR=bsalomon@google.com,brianosman@google.com,benjaminwagner@google.com,reviews@skia.org
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=skia:
> > 
> > Change-Id: I43cc135731245c29e24bbecf06ee46c562955c03
> > Reviewed-on: https://skia-review.googlesource.com/9123
> > Reviewed-by: Brian Osman <brianosman@google.com>
> > Commit-Queue: Brian Osman <brianosman@google.com>
> > 
> 
> TBR=bsalomon@google.com,benjaminwagner@google.com,reviews@skia.org,brianosman@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
> 
> Change-Id: Ibcb2ea34654315327c46ea8e4de5bf14376d9bdf
> Reviewed-on: https://skia-review.googlesource.com/9127
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> 

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

Change-Id: If5c06c7608d76c45438d03fefb21c4edd7da4f36
Reviewed-on: https://skia-review.googlesource.com/9128
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-03-02 01:17:12 +00:00
Brian Osman
2fe8373bb1 Revert "Revert "Move GrTextureProvider to src""
This reverts commit 13d7f5d7c2.

Reason for revert: Fixed client code. Re-landing.

Original change's description:
> Revert "Move GrTextureProvider to src"
> 
> This reverts commit 24429c68c5.
> 
> Reason for revert: Breaking a roll
> 
> Original change's description:
> > Move GrTextureProvider to src
> > 
> > With this hidden, we can make further simplification. Just want to test
> > this change against our external clients first, to make sure we're okay
> > to proceed.
> > 
> > BUG=skia:
> > 
> > Change-Id: I47f8c8f2912201c2890bc2f9a9d68aa92649a2d4
> > Reviewed-on: https://skia-review.googlesource.com/9072
> > Commit-Queue: Brian Osman <brianosman@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > 
> 
> TBR=bsalomon@google.com,brianosman@google.com,benjaminwagner@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
> 
> Change-Id: I43cc135731245c29e24bbecf06ee46c562955c03
> Reviewed-on: https://skia-review.googlesource.com/9123
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> 

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

Change-Id: Ibcb2ea34654315327c46ea8e4de5bf14376d9bdf
Reviewed-on: https://skia-review.googlesource.com/9127
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-03-01 21:54:16 +00:00
Brian Osman
13d7f5d7c2 Revert "Move GrTextureProvider to src"
This reverts commit 24429c68c5.

Reason for revert: Breaking a roll

Original change's description:
> Move GrTextureProvider to src
> 
> With this hidden, we can make further simplification. Just want to test
> this change against our external clients first, to make sure we're okay
> to proceed.
> 
> BUG=skia:
> 
> Change-Id: I47f8c8f2912201c2890bc2f9a9d68aa92649a2d4
> Reviewed-on: https://skia-review.googlesource.com/9072
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> 

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

Change-Id: I43cc135731245c29e24bbecf06ee46c562955c03
Reviewed-on: https://skia-review.googlesource.com/9123
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-03-01 20:56:49 +00:00
Brian Osman
24429c68c5 Move GrTextureProvider to src
With this hidden, we can make further simplification. Just want to test
this change against our external clients first, to make sure we're okay
to proceed.

BUG=skia:

Change-Id: I47f8c8f2912201c2890bc2f9a9d68aa92649a2d4
Reviewed-on: https://skia-review.googlesource.com/9072
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-03-01 19:20:05 +00:00
Robert Phillips
7928e76872 Disable deferred gpu resources for Chrome branch
Chrome's branch is coming up and it seems unlikely that I will be able to push instantiation all the way to flush time (where failure will be easier to deal with) before then. This CL should silence the P1 bug but could introduce layout test diffs.

Ideally this wouldn't land until after: https://codereview.chromium.org/2718353004/ (Add flag for upcoming Skia change) so the layout test differences will be visible on the DEPS roll

BUG=688811

Change-Id: I86c42ee02e6672834353aa7126b00ed4f3521948
Reviewed-on: https://skia-review.googlesource.com/9064
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-03-01 12:30:02 +00:00
Robert Phillips
32f2818c9d Clean up/remove unused GrFragmentProcessor-derived ctors
This is the simple (i.e., non-TextureAdjuster) portion of: https://skia-review.googlesource.com/c/8823/ (Remove GrFragmentProcessor-derived class' GrTexture-based ctors)

Change-Id: I8f673ebe922e03c69473c18c166bcf818507c662
Reviewed-on: https://skia-review.googlesource.com/8997
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-02-28 22:07:05 +00:00
Herb Derby
5990680a09 Remove SkDataTableBuilder. It is not used.
Change-Id: Ieae9adba73b8ada959e08d69a06d0f3d010209c6
Reviewed-on: https://skia-review.googlesource.com/9076
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2017-02-28 21:11:45 +00:00
Brian Osman
2c2bc11aea Add GrExternalTextureData and SkCrossContextImageData
GrExternalTextureData is an API for exporting the backend-specific
information about a texture in a type-safe way, and without pointing
into the GrTexture. The new detachBackendTexture API lets us release
ownership of a texture to the client.

SkCrossContextImageData is the public API that lets clients upload
textures on one thread/GrContext, then safely transfer ownership to
another thread and GrContext for rendering.

Only GL is implemented/supported right now. Vulkan support requires
that we add thread-safe memory pools, or otherwise transfer the
actual memory block containing the texture to the new context.

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

BUG=skia:

Change-Id: I48ebd57d1ea0cfd3a1db10c475f2903afb821966
Reviewed-on: https://skia-review.googlesource.com/8960
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-02-28 20:59:57 +00:00
Robert Phillips
c787e495e2 Allow GrSurfaceProxy-derived classes to use flags when instantiating (take 2)
In some instances proxies must be created that, when instantiated, have no pending IO.

This is split out of:

https://skia-review.googlesource.com/c/8679/ (Add per-Flush callback to GrDrawingManager)

and is a reland of:

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

Change-Id: I36f52a6d249e762bdfc1f0d7528aba6d4071e492
Reviewed-on: https://skia-review.googlesource.com/9070
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-02-28 17:21:55 +00:00
Herb Derby
e556bf76df Fix single leg Compose Shader crash.
R=halcanary@google.com

BUG=skia:6291

Change-Id: Ifa63dce2b06662e7b535a4f04e1f3f772c099122
Reviewed-on: https://skia-review.googlesource.com/9027
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
2017-02-28 16:49:41 +00:00
Brian Osman
c746bc15c1 Add another null check for the Vk NexusPlayer bot
That bot has flaky failures creating contexts, and it consistently fails
this test. It probably can't create two contexts at the same time.

BUG=skia:

Change-Id: If6363bff22882378f51281f1cbdac8b3ef510af2
Reviewed-on: https://skia-review.googlesource.com/9067
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-02-28 15:51:37 +00:00
Ethan Nicholas
af19769831 Re-land of skslc switch support
This reverts commit 7d975fc200.

BUG=skia:

Change-Id: I57521f7a291a35cfed58d623ea4f8da29582d2c5
Reviewed-on: https://skia-review.googlesource.com/8993
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-02-27 19:01:55 +00:00
Brian Osman
9eac2ea773 Fixes to shared context test API
Fixes a bug in Windows shared context creation, and makes the API
less fiddly.

BUG=skia:

Change-Id: Ia32b2e3b4816e0b8d7e9be92c22a182ca1393177
Reviewed-on: https://skia-review.googlesource.com/8965
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-02-27 02:29:24 +00:00
Leon Scroggins III
0354c62e0b Set a limit on the size for BMP images
This limit matches the limit used by Chromium. I am not aware of any
real world BMPs that are larger than this (or even close to it), but
there are some invalid BMPs that are larger than this, leading to
crashes when we try to read a row.

BUG:34778578
BUG=skia:3617

Change-Id: I0f662e8d0d7bc0b084e86d0c9288b831e1b296d7
Reviewed-on: https://skia-review.googlesource.com/8966
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-02-24 21:25:44 +00:00
Brian Salomon
b5cb6835c4 Use construct/init pattern with GrPipeline to replace CreateAt.
Change-Id: Ic6c7432a9a298a143ce4f2431e94c89a0ea79793
Reviewed-on: https://skia-review.googlesource.com/8938
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-02-24 18:39:58 +00:00
Brian Osman
aa1ab8905e Revert "Add GrExternalTextureData and SkCrossContextImageData"
This reverts commit 9ad1f92e2f.

Reason for revert: Breaking lots of bots

Original change's description:
> Add GrExternalTextureData and SkCrossContextImageData
> 
> GrExternalTextureData is an API for exporting the backend-specific
> information about a texture in a type-safe way, and without pointing
> into the GrTexture. The new detachBackendTexture API lets us release
> ownership of a texture to the client.
> 
> SkCrossContextImageData is the public API that lets clients upload
> textures on one thread/GrContext, then safely transfer ownership to
> another thread and GrContext for rendering.
> 
> Only GL is implemented/supported right now. Vulkan support requires
> that we add thread-safe memory pools, or otherwise transfer the
> actual memory block containing the texture to the new context.
> 
> BUG=skia:
> 
> Change-Id: I784a3a74be69807df038c7d192eaed002c7e45ca
> Reviewed-on: https://skia-review.googlesource.com/8529
> 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,reviews@skia.org,chinmaygarde@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Change-Id: If27d1f4c3a169efb6533170f67a172664c0fe8ce
Reviewed-on: https://skia-review.googlesource.com/8955
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-02-24 17:28:03 +00:00
Ben Wagner
fc497343cb Add SkTypeface::getVariationDesignPosition.
Allow users to query a typeface's position in variation design space.

Change-Id: Id7cae439e795b8c9586394f11359fb7fe55e1c0b
Reviewed-on: https://skia-review.googlesource.com/8861
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-02-24 16:59:05 +00:00
Brian Salomon
02baee973f Remove the skip-draw xp optimization
This seems like extra complexity for a impractical case. Also, if this is important a lot more work could be saved by catching this upstack (e.g. SkCanvas or SkPaintToGrPaint).

Change-Id: Ib47be9f3cdc8ce9e5b12d9e9eac5266f04c337a9
Reviewed-on: https://skia-review.googlesource.com/8949
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-02-24 16:16:34 +00:00
Brian Osman
9ad1f92e2f Add GrExternalTextureData and SkCrossContextImageData
GrExternalTextureData is an API for exporting the backend-specific
information about a texture in a type-safe way, and without pointing
into the GrTexture. The new detachBackendTexture API lets us release
ownership of a texture to the client.

SkCrossContextImageData is the public API that lets clients upload
textures on one thread/GrContext, then safely transfer ownership to
another thread and GrContext for rendering.

Only GL is implemented/supported right now. Vulkan support requires
that we add thread-safe memory pools, or otherwise transfer the
actual memory block containing the texture to the new context.

BUG=skia:

Change-Id: I784a3a74be69807df038c7d192eaed002c7e45ca
Reviewed-on: https://skia-review.googlesource.com/8529
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-02-24 16:09:33 +00:00
Robert Phillips
875218ebd8 Wrap cached GrTextures in GrTextureProxies (e.g., blur profiles, nine-patch blurs, etc.)
This is pulled out of: https://skia-review.googlesource.com/c/8823/ (Remove GrFragmentProcessor-derived class' GrTexture-based ctors)

Change-Id: I5feac04dc1bf54bd74c65febdf6bba9e7ce28f55
Reviewed-on: https://skia-review.googlesource.com/8942
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-02-24 14:21:50 +00:00
Ben Wagner
97043299cb Revert "Add SkTypeface::getVariationDesignPosition."
This reverts commit 0f3d0c37db.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Add SkTypeface::getVariationDesignPosition.
> 
> Allow users to query a typeface's position in variation design space.
> 
> Change-Id: I173ee9eefdddee6b2613435ebcc6b08c25b382ed
> Reviewed-on: https://skia-review.googlesource.com/8684
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> 

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

Change-Id: I484fe52c1f89e7b6d0024dcabf7c59d0e8b5b5e7
Reviewed-on: https://skia-review.googlesource.com/8929
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-02-23 20:48:53 +00:00
bungeman
0f3d0c37db Add SkTypeface::getVariationDesignPosition.
Allow users to query a typeface's position in variation design space.

Change-Id: I173ee9eefdddee6b2613435ebcc6b08c25b382ed
Reviewed-on: https://skia-review.googlesource.com/8684
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-02-23 18:41:57 +00:00
Brian Salomon
03e058414c Fix Chrome iOS no GPU build and block includes from src/gpu on our NoGpu bot.
Change-Id: I934f0d6096a6eb0305e24f06dfb6c49299a195a9
Reviewed-on: https://skia-review.googlesource.com/8919
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-02-23 18:01:10 +00:00
Ethan Nicholas
7d975fc200 Revert "skslc switch support"
This reverts commit 2b1e468dab.

Reason for revert: bot breakage

Original change's description:
> skslc switch support
> 
> BUG=skia:
> 
> Change-Id: Ida7f9e80139aa1e4f43804cafbcac640e47fab25
> Reviewed-on: https://skia-review.googlesource.com/8771
> 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: Iaaa35d10a15704279c6883d4d68f6d4ad5078320
Reviewed-on: https://skia-review.googlesource.com/8792
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-02-23 16:20:10 +00:00
Ethan Nicholas
2b1e468dab skslc switch support
BUG=skia:

Change-Id: Ida7f9e80139aa1e4f43804cafbcac640e47fab25
Reviewed-on: https://skia-review.googlesource.com/8771
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
2017-02-23 15:30:37 +00:00
Robert Phillips
30f9bc69cf Switch GrTextureStripAtlas over to GrTextureProxies
This is split out of: https://skia-review.googlesource.com/c/8823/ (Remove GrFragmentProcessor-derived class' GrTexture-based ctors)

Change-Id: I9f602985b6010fc58b595e2be6d4e67e50179747
Reviewed-on: https://skia-review.googlesource.com/8881
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-02-23 15:01:42 +00:00
Mike Reed
bcfb8f639e Revert "Revert "Revert[2] "hide deprecated underline and strikethru"""
This reverts commit cfd3d9ff8f.

Reason for revert: derek is fixing caller

Original change's description:
> Revert "Revert[2] "hide deprecated underline and strikethru""
> 
> This reverts commit aab68c56ef.
> 
> Reason for revert: android still broken RecordingCanvasTests.cpp
> 
> Original change's description:
> > Revert[2] "hide deprecated underline and strikethru"
> > 
> > android now updated.
> > 
> > This reverts commit e005edd3a5.
> > 
> > BUG=skia:6250
> > 
> > Change-Id: If08d344cdd863fde1d9955dc3fab671a83be0f73
> > Reviewed-on: https://skia-review.googlesource.com/8815
> > Commit-Queue: Mike Reed <reed@google.com>
> > Reviewed-by: Mike Reed <reed@google.com>
> > 
> 
> TBR=reed@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:6250
> 
> Change-Id: I954575a0e4b9aca8414e10901a7be03a2d7e6396
> Reviewed-on: https://skia-review.googlesource.com/8900
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
> 

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

Change-Id: Ie518b64219a0262cd343644754940774bf42faec
Reviewed-on: https://skia-review.googlesource.com/8901
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-02-23 14:19:40 +00:00
Mike Reed
cfd3d9ff8f Revert "Revert[2] "hide deprecated underline and strikethru""
This reverts commit aab68c56ef.

Reason for revert: android still broken RecordingCanvasTests.cpp

Original change's description:
> Revert[2] "hide deprecated underline and strikethru"
> 
> android now updated.
> 
> This reverts commit e005edd3a5.
> 
> BUG=skia:6250
> 
> Change-Id: If08d344cdd863fde1d9955dc3fab671a83be0f73
> Reviewed-on: https://skia-review.googlesource.com/8815
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> 

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

Change-Id: I954575a0e4b9aca8414e10901a7be03a2d7e6396
Reviewed-on: https://skia-review.googlesource.com/8900
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-02-23 14:06:19 +00:00
Brian Salomon
b16e8ac7f3 Make GrPipeline::CreateAt take GrRenderTarget and not GrRenderTargetContext
This is needed in order to create pipelines at flush time.

Change-Id: I0bcd64d503d45c3383dbb932b048e2d7faa07c67
Reviewed-on: https://skia-review.googlesource.com/8849
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-02-23 14:03:32 +00:00
Mike Reed
aab68c56ef Revert[2] "hide deprecated underline and strikethru"
android now updated.

This reverts commit e005edd3a5.

BUG=skia:6250

Change-Id: If08d344cdd863fde1d9955dc3fab671a83be0f73
Reviewed-on: https://skia-review.googlesource.com/8815
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-02-22 21:41:26 +00:00
Brian Osman
40540a7135 Actually test our ref-counting in release builds
BUG=skia:

Change-Id: I8df5c84bf961a3be68a642ba338fdc641e09df59
Reviewed-on: https://skia-review.googlesource.com/8889
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-02-22 21:31:29 +00:00
Brian Salomon
5298dc8bf3 Make GrPipelineAnalysis a nested class of GrProcessorSet.
It is renamed to FragmentProcessorAnalysis since it represents the outputs of the final FPs.

It now stores the analysis results that are subsequently needed rather than exposing GrProcOptInfo.

GrProcOptInfo is now only used on color FPs (not coverage).

Miscellaneous related renamings.


Change-Id: I95c518a7a76df6dc294a9fa67c611f8f653247bc
Reviewed-on: https://skia-review.googlesource.com/8534
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-02-22 19:41:30 +00:00
Mike Reed
3661bc9976 hide trivial helpers on canvas
BUG=skia:

Change-Id: I42d4ca92897bde5bd8e0575a0104b12b83134cef
Reviewed-on: https://skia-review.googlesource.com/8852
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-02-22 19:41:04 +00:00
Matt Sarett
e522f4c455 Enable legacy premuls in SkColorSpaceXform
***Will allow for simplified Android framework code, they typically
   want a color correct transform followed by a gamma encoded premul.
***Chrome does the same, so this will make it easier to replace their
   codecs.
***Will decrease code size.  Both types of premuls are moved off the
   fast path here - one is essentially unused in production and the
   other is not "encouraged".
***Will actually make the common case faster: sRGB->sRGB means no
   color xform, just premul in SkSwizzler.

BUG=skia:

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD

Change-Id: Ia4ec1d273b6f137151f951d37c0ebf975f6b9a3e
Reviewed-on: https://skia-review.googlesource.com/8848
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-02-22 18:51:33 +00:00
Hal Canary
58a1ea8d54 SkRegion: change serialization unit tests, better validation code
Also: Don't alloc before validation.

Change-Id: Ic2e007ecf4e06fb099366295b963f66df3f7903a
Reviewed-on: https://skia-review.googlesource.com/8728
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-02-22 14:08:28 +00:00
Brian Osman
60c774db3e Support shared GL contexts in GrContextFactory
Mostly plumbing, plus some minimal testing to make sure that
the platform APIs don't explode. I plan to add testing of
SkCrossContextImageData using this, which should verify that
textures are actually shared.

Also found a factory and some related code in the
CommandBuffer test context that was totally unused.
BUG=skia:

Change-Id: I05bbc22c4d1ef946b702a5cc7f67788785219c62
Reviewed-on: https://skia-review.googlesource.com/8808
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-02-22 13:32:56 +00:00
Robert Phillips
2c6d2bfced Remove SkSpecialImage's GrTexture-based ctors
Change-Id: Id71b8ab0477cd1d459089d97af27d63f9f08d21b
Reviewed-on: https://skia-review.googlesource.com/7889
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-02-21 21:50:27 +00:00
csmartdalton
e812d496aa Rename GrContextFactory::ContextOptions to ContextOverrides
Also changes the behavior of these flags to only override their             
corresponding context options when set, and to leave them unchanged    
when not set.  

BUG=skia:

Change-Id: I09f6be09997594fa888d9045dd4901354ef3f880
Reviewed-on: https://skia-review.googlesource.com/8780
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-02-21 21:45:45 +00:00
Brian Salomon
00b2cca300 Simplify GrPaint::isConstantBlendedColor to avoid FP analysis and XP virtual calls
This was the only non-test user of GrXPFactory::isConstantPreCoverageBlendedColor which is now removed.

Change-Id: Ic1c130d30a44e1a955b89f8912433a3c9df2e61e
Reviewed-on: https://skia-review.googlesource.com/8776
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-02-21 18:29:37 +00:00
Brian Salomon
cdcc33f7d6 Store GrRenderTarget rather than just its ID in GrRenderTargetOpList::RecordedOp.
This will allow us to feed the op's their render target when they don't have a pipeline before execution.

Change-Id: I01f16bec32e930c0152105a9179306159cb14dc4
Reviewed-on: https://skia-review.googlesource.com/8693
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-02-21 15:42:53 +00:00
Robert Phillips
8e1c4e6725 Remove asTextureRef from SkSpecialImage & update effects accordingly (take 2)
This CL also renames SkSpecialImage::asTextureProxy to asTextureProxyRef

This is a reland of: https://skia-review.googlesource.com/c/7995/ (Remove asTextureRef from SkSpecialImage & update effects accordingly)

It should be good to land since https://skia-review.googlesource.com/c/8701/ (Replace SkSpecialImage::makeTightSubset with asImage (take 2)) fixes the Chrome-side issue

Change-Id: I3d88b2b3d23fd69f3fb914a69dacca96cbc038a4
Reviewed-on: https://skia-review.googlesource.com/8450
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-02-20 19:21:53 +00:00
Robert Phillips
a5fdc974a9 Replace SkSpecialImage::makeTightSubset with asImage (take 2)
This is a reland of https://skia-review.googlesource.com/c/8498/ (Replace SkSpecialImage::makeTightSubset with asImage)

It must wait on https://codereview.chromium.org/2702703002/ (Add suppressions for upcoming Skia DEPS roll) due to minor layout test changes

This should allow the relanding of:

https://skia-review.googlesource.com/c/8450/ (Remove asTextureRef from SkSpecialImage & update effects accordingly (take 2))

Change-Id: I7086a419869dbeb62d9b9e9714c796d54e75ee49
Reviewed-on: https://skia-review.googlesource.com/8701
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-02-18 23:26:20 +00:00
Hal Canary
251bf3e089 SkRegion deserialization more robust
BUG=chromium:688987
Change-Id: Ide6d70330c8cd1fce814eb2c445da1fbff498ef6
Reviewed-on: https://skia-review.googlesource.com/8496
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2017-02-18 13:34:30 +00:00
Leon Scroggins
e005edd3a5 Revert "hide deprecated underline and strikethru"
This reverts commit a01bf9ab74.

Reason for revert: Breaking Android merge. They access setUnderlineText on their <shudder> subclass of SkPaint.

Original change's description:
> hide deprecated underline and strikethru
> 
> BUG=skia:6250
> 
> Change-Id: I85395e4960b16ab91237a74ff35e5b7588965512
> Reviewed-on: https://skia-review.googlesource.com/8600
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
> 

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

Change-Id: If55f69f061dc4439ca2faa62807a9c5694ebbeb4
Reviewed-on: https://skia-review.googlesource.com/8687
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-02-17 22:49:03 +00:00
Ethan Nicholas
52cad15d0b sksl support for geometry shaders
BUG=skia:

Change-Id: I8541b98aadcf4c2484fef73e2f49be3ee38bc1e2
Reviewed-on: https://skia-review.googlesource.com/8409
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-02-17 22:00:23 +00:00
Ben Wagner
7d07d46638 Revert "Add SkTypeface::getVariationDesignPosition."
This reverts commit 87e7f820f7.

Reason for revert: Failed a test on Mac

Original change's description:
> Add SkTypeface::getVariationDesignPosition.
> 
> Allow users to query a typeface's position in variation design space.
> 
> Change-Id: I5d80c8ff658708a5d1aa386ec5b7396dcb621198
> Reviewed-on: https://skia-review.googlesource.com/7130
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> 

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

Change-Id: Ia65792083642dbe9333a62eb75d162931b57cffd
Reviewed-on: https://skia-review.googlesource.com/8670
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-02-17 18:39:09 +00:00
Ben Wagner
87e7f820f7 Add SkTypeface::getVariationDesignPosition.
Allow users to query a typeface's position in variation design space.

Change-Id: I5d80c8ff658708a5d1aa386ec5b7396dcb621198
Reviewed-on: https://skia-review.googlesource.com/7130
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-02-17 18:05:47 +00:00
Mike Reed
a01bf9ab74 hide deprecated underline and strikethru
BUG=skia:6250

Change-Id: I85395e4960b16ab91237a74ff35e5b7588965512
Reviewed-on: https://skia-review.googlesource.com/8600
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-02-17 17:31:33 +00:00
Robert Phillips
e14349a754 Revert "Replace SkSpecialImage::makeTightSubset with asImage"
This reverts commit 5df6db15dc.

Reason for revert: Possibly blocking Chrome DEPS roll

Original change's description:
> Replace SkSpecialImage::makeTightSubset with asImage
> 
> This should allow the relanding of:
> 
> https://skia-review.googlesource.com/c/8450/ (Remove asTextureRef from SkSpecialImage & update effects accordingly (take 2))
> 
> Change-Id: I517af11036e3f44a280bbe6b9275f6c38f4a86a4
> Reviewed-on: https://skia-review.googlesource.com/8498
> 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: Ib5bebda78b2323e65a73504a61af918872ad231f
Reviewed-on: https://skia-review.googlesource.com/8607
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-02-17 13:29:00 +00:00
Robert Phillips
5df6db15dc Replace SkSpecialImage::makeTightSubset with asImage
This should allow the relanding of:

https://skia-review.googlesource.com/c/8450/ (Remove asTextureRef from SkSpecialImage & update effects accordingly (take 2))

Change-Id: I517af11036e3f44a280bbe6b9275f6c38f4a86a4
Reviewed-on: https://skia-review.googlesource.com/8498
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-02-16 21:40:32 +00:00
Ethan Nicholas
50afc17655 Fixed a couple of spots where sksl didn't have proper array support.
vec2 x[3] worked, but vec2[3] x didn't. Interface blocks also did
not work with array sizes.

BUG=skia:

Change-Id: I45b424891db46804f1e3c1f4793470b7b501a6de
Reviewed-on: https://skia-review.googlesource.com/8523
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
2017-02-16 20:27:43 +00:00
Jim Van Verth
c9f4b8c562 Disable DFPathRenderTest for now.
It's unclear what this test should be -- or even if it's valid any more.

Change-Id: I62b5d99ad19c9b2813ef5a3c34c9b11991c01c5f
Reviewed-on: https://skia-review.googlesource.com/8494
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2017-02-16 17:23:49 +00:00
Mike Klein
8729e5bbf7 Simplify more: remove SkRasterPipeline::compile().
It's easier to work on SkJumper if everything funnels through run().

I don't anticipate huge benefit from compile() without JITing,
but it's something we can always put back if we find a need.

Change-Id: Id5256fd21495e8195cad1924dbad81856416d913
Reviewed-on: https://skia-review.googlesource.com/8468
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-02-16 12:23:06 +00:00
Dominic Mazzoni
394d414452 Implement SkHighContrastFilter
This is a color filter to apply several contrast adjustments for users
with low vision, including inverting the colors (in either RGB or HSL
space), applying gamma correction, converting to grayscale, and increasing
the contrast.

BUG=skia:6235

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD

Change-Id: Icb8f3e290932d8bcd9387fb1f39dd20767e15cf6
Reviewed-on: https://skia-review.googlesource.com/7460
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-02-16 02:34:44 +00:00
Mike Reed
185130c643 return and take SkImageGenerator as unique_ptr
BUG=skia:

Change-Id: I4bc11042dd1dbf1eabd40af206027bc65acc3186
Reviewed-on: https://skia-review.googlesource.com/8444
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-02-15 20:51:28 +00:00
Robert Phillips
63c67461ed Tighten up GrSurfaceProxy typing
This may reduce the number of "why not GrTextureProxy" issues

Change-Id: I9e0e5042f5801ba9a933b697a380cb0cb54b4522
Reviewed-on: https://skia-review.googlesource.com/8510
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-02-15 20:17:29 +00:00
Stephen White
cc70083fbf GrTessellator (AA): null GrGeometryProcessor crash fix.
Add a null-check on geometry processor creation.

Add a test which exercises it: AA tessellator, with a non-invertible
matrix and a fragment processor which needs local coords (e.g., linear
gradient).

BUG=691902

Change-Id: I005b893aed58d3ad2500c41501045ac94b0b4b95
Reviewed-on: https://skia-review.googlesource.com/8462
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2017-02-15 17:42:26 +00:00
Brian Salomon
f3b995b628 Clarify when tweak alpha for coverage optimizaton can occur.
Also refer to it directly rather than using the term "modulate"

Change-Id: Ifa44a4d46e1be11b567943f58ead24e38f10d03b
Reviewed-on: https://skia-review.googlesource.com/8488
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-02-15 17:27:10 +00:00
Brian Osman
3f405985be Non linear blending flag for SkColorSpace
BUG=skia:6242

Change-Id: I63cce6019ce854ba807b2a819ef4fe3214898bee
Reviewed-on: https://skia-review.googlesource.com/8344
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
2017-02-15 14:25:35 +00:00
Matt Sarett
485c499a27 Rename SkConfig8888/SkPixelInfo to SkConvertPixels
BUG=skia:

Change-Id: I4f3c6370b3ef4247aa446716c7c154899925d089
Reviewed-on: https://skia-review.googlesource.com/8442
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-02-15 13:50:55 +00:00
Mike Reed
df85c38163 stop using SkScalarMul
BUG=skia:

Change-Id: Ie41d8665a1c62ba8eddc93d8cfefaf64ddc52ff8
Reviewed-on: https://skia-review.googlesource.com/8411
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-02-14 19:45:24 +00:00
Herb Derby
78c0c4c5a0 Remove SkSmallAllocator.
TBR=mtklein@google.com

Change-Id: I375af12c5de4397a682c1946404282da95ad42ec
Reviewed-on: https://skia-review.googlesource.com/8392
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2017-02-14 19:32:58 +00:00
Matt Sarett
8572d85351 Make raster pipeline support all pixel conversions
BUG=skia:

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD

Change-Id: Idc76999d0f5591a567b3976cb9db829c350e4be2
Reviewed-on: https://skia-review.googlesource.com/8304
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-02-14 17:50:52 +00:00
Brian Salomon
c6b7146eef Remove component flags from GrPipelineInput.
We don't use these anywhere downstream except to check for opaqueness.

Change-Id: I897137135d69004ed45c0f4c1e7297183f49fc6d
Reviewed-on: https://skia-review.googlesource.com/8402
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-02-14 16:34:59 +00:00
Brian Salomon
9a51498720 Remove component flags from GrXPFactory output analysis.
Change-Id: Ieb8dab564e6e593dca2e092d352756052dadfd90
Reviewed-on: https://skia-review.googlesource.com/8354
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-02-14 16:06:13 +00:00
Brian Salomon
a12c15376c Add preserves premul and modulate optimization to compose fragment processors.
Fixes out of range colors produced by matrix convolution and dither effects. Adds modulate optimization to matrix convolution.

Change-Id: I8424250a52e864f4b5feaf4474293695c26039d8
Reviewed-on: https://skia-review.googlesource.com/8351
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-02-13 18:14:12 +00:00
Mike Reed
267be7fbc3 Revert "Revert "IWYU""
This reverts commit 3c727d2386.

BUG=skia:

Change-Id: I72e9b40fec96d044e0ac12906669a52529e77882
Reviewed-on: https://skia-review.googlesource.com/8356
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-02-13 15:59:35 +00:00
Hal Canary
03a7f5fe2d Make header files idempotent; script to check
Change-Id: I960ded854e6bc7cdee029a7393cac2a686c41754
Reviewed-on: https://skia-review.googlesource.com/8308
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-02-13 15:52:59 +00:00
Brian Salomon
cb30bb2cb7 Remove GrFragmentProcessor::computeInvariantOutput
Change-Id: If475730103052c6097eb91be06808fb723b70bf8
Reviewed-on: https://skia-review.googlesource.com/8330
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-02-13 15:32:00 +00:00
Brian Salomon
d1a8bdfbb9 Initialize test textures for ProcessorOptimizationValidationTest.
Ensure the data in the RGBA texture is premul.

Reenable the "modulation" optimization flag on GrAlphaThresholdFragmentProcessor.

Change-Id: I49ef215cee83ea74526c589bcee4bc215bc28ba4
Reviewed-on: https://skia-review.googlesource.com/8323
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-02-13 15:21:34 +00:00
Ethan Nicholas
3865711259 Replaced all calls to fragmentPosition() with sk_FragCoord
Change-Id: I2ed4558aea74b3ae7ee11dfe4736cdbcb16ae49e
Reviewed-on: https://skia-review.googlesource.com/8278
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-02-13 14:49:09 +00:00
Robert Phillips
3c727d2386 Revert "IWYU"
This reverts commit 2aeae78a2c.

Reason for revert: It looks like this is breaking the android roll

out/target/product/angler/obj/SHARED_LIBRARIES/libandroid_runtime_intermediates/android_graphics_Canvas.o frameworks/base/core/jni/android_graphics_Canvas.cpp"
frameworks/base/core/jni/android_graphics_Canvas.cpp:178:15: error: incomplete type 'SkRegion' named in nested name specifier



Original change's description:
> IWYU
> 
> BUG=skia:
> 
> Change-Id: Ib6b4d52841dbe3fa69a86ddb6b97d6a5d0f004ee
> Reviewed-on: https://skia-review.googlesource.com/8231
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>
> 

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

Change-Id: If979c3dd9dc3fe08ac450ced113b3d1e9a86f02a
Reviewed-on: https://skia-review.googlesource.com/8346
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-02-11 01:25:19 +00:00
Brian Salomon
eec6f7be54 Use new fragment processor optimization queries.
This doesn't yet delete the old virtuals.

It still uses the color and component flags model for the pipeline input and blended output but I'm planning to change those as well.

Change-Id: I64e2ec0fe9ed9fae3aabf1ca8c9bc0582fc7565a
Reviewed-on: https://skia-review.googlesource.com/7760
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-02-10 20:02:32 +00:00