Commit Graph

8169 Commits

Author SHA1 Message Date
Mike Reed
1c5906f562 saturate some irect ops for fuzzers
Bug: skia:
Change-Id: I1c4f879a455048652abb619814841cd687a0474a
Reviewed-on: https://skia-review.googlesource.com/101881
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-01-30 21:50:30 +00:00
Leon Scroggins III
495e0f079c Simplify SkAnimatedImage
Bug: b/63908092

Rather than keeping track of the time and whether the animation is
running, leave that up to the client. Offer a single method to decode
the next frame, allowing the client to stay one frame ahead.

Change-Id: I546013e32e3a0874181b0dce1349bbec07aaadd4
Reviewed-on: https://skia-review.googlesource.com/101544
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2018-01-30 18:46:35 +00:00
Greg Daniel
6a0176bf03 Add ref counted wrapped around GrTexture ReleaseProc
Bug: skia:
Change-Id: I0cd11a539fd6b16d4b3f9512694f84e0a429518c
Reviewed-on: https://skia-review.googlesource.com/101341
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-01-30 14:50:00 +00:00
Robert Phillips
7f861927fc Revert "Drop support for unused MSAA extensions"
This reverts commit 7df27465c4.

Reason for revert: experimental revert to see if this is the cause of the tree redness

Original change's description:
> Drop support for unused MSAA extensions
> 
> Bug: skia:
> Change-Id: I113b80e3f991f195155148625ceb29242ea82776
> Reviewed-on: https://skia-review.googlesource.com/101403
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

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

Change-Id: I4fa4123e2d176bef88cd76a09a14053d9ac5809f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/101680
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-01-30 13:13:56 +00:00
Mike Reed
2f5b8d81c2 don't draw non-finite contexts in imagefilters
Bug: skia:7507
Change-Id: Ifc210951c17f74770f15de1c2e13b42117a3354e
Reviewed-on: https://skia-review.googlesource.com/101202
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-01-30 02:02:42 +00:00
Brian Salomon
e41e1769e7 Add kRGBX_8888, kRGBA_1010102, and kRGBX_1010102 color types. Unused for now.
BUG= skia:7533

Change-Id: I4b3f6b827fd833ba2d07895884d2abc9a3132366
Reviewed-on: https://skia-review.googlesource.com/99781
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-01-30 01:59:31 +00:00
Chris Dalton
7df27465c4 Drop support for unused MSAA extensions
Bug: skia:
Change-Id: I113b80e3f991f195155148625ceb29242ea82776
Reviewed-on: https://skia-review.googlesource.com/101403
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2018-01-29 23:37:51 +00:00
Brian Salomon
7f1a074600 Remove some unused sample count caps
Change-Id: I4acb620b4b7b4c5bd83d7c7d65808ca8ebbd6804
Reviewed-on: https://skia-review.googlesource.com/101360
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-01-29 19:46:31 +00:00
Brian Salomon
1c80e99dd5 Allow printf style var args for messages in REPORTER_ASSERT.
Remove REPORTER_ASSERT_MESSAGE.

Change-Id: I6d00715901159c93e22d182fe24aac92b5fdbcf4
Reviewed-on: https://skia-review.googlesource.com/100361
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2018-01-29 15:17:09 +00:00
Mike Klein
fbe6620284 add SkPicture::MakePlaceholder()
Bug: skia:7536

Change-Id: I6ca7c680ef4fd69419254dc7f1af27343dbb8e89
Reviewed-on: https://skia-review.googlesource.com/99664
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2018-01-28 00:18:37 +00:00
Mike Klein
88d90714fa Revert "hide picture virtuals (no public callers)"
This reverts commit 8005bff7e6.

Reason for revert: hwui, flutter, and headless blink in G3 all still using these.

Original change's description:
> hide picture virtuals (no public callers)
> 
> This prepares the way for a clean impl of a "placeholder" picture that never unrolls
> 
> Bug: skia:
> Change-Id: I3b5785c5c94432b54e9a7dc280b2a6e716592473
> Reviewed-on: https://skia-review.googlesource.com/100260
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Mike Klein <mtklein@chromium.org>

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

Change-Id: I385789dd420588ea9a9390c8a44c6ecb96c7f358
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/100880
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-01-27 17:30:15 +00:00
Mike Reed
8005bff7e6 hide picture virtuals (no public callers)
This prepares the way for a clean impl of a "placeholder" picture that never unrolls

Bug: skia:
Change-Id: I3b5785c5c94432b54e9a7dc280b2a6e716592473
Reviewed-on: https://skia-review.googlesource.com/100260
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2018-01-27 04:02:55 +00:00
Leon Scroggins III
da3e9ad894 Make SkAndroidCodec (optionally) respect origin
Bug: b/63909536

ImageDecoder will respect the origin, but BitmapFactory will maintain
its current behavior of not respecting it. Add an option to respect it.

In addition, add support for reading the EXIF data from a WEBP. This
seems to be an uncommon use case, but is occasionally used when
converting from a JPEG. Add 8 WEBPs, all converted (with cwebp) from
their analogous JPEG files already checked in.

Change-Id: I38afca58c86fa99ee9ab7d1dc83aaa4f23132c11
Reviewed-on: https://skia-review.googlesource.com/95300
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2018-01-26 22:13:34 +00:00
Leon Scroggins III
abe639caf4 Add SkAnimatedImage::getRepetitionCount
Bug: b/63908092

Android does not need to have its end listener attached if the
repetition count is infinite. Provide an accessor so it will know.

Change-Id: I481b048994a6e86ae88c913a5dcca3788b92bae2
Reviewed-on: https://skia-review.googlesource.com/99883
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2018-01-26 20:08:40 +00:00
Mike Klein
8f11d4dcaf eliminate SK_BUILD_FOR_WIN32
SK_BUILD_FOR_WIN and SK_BUILD_FOR_WIN32 have long meant the same thing.

Chrome fix is https://chromium-review.googlesource.com/c/chromium/src/+/884007

Change-Id: I0e907b1bcd2a358eabf776f414fd3aeb3c689561
Reviewed-on: https://skia-review.googlesource.com/99340
Reviewed-by: Mike Reed <reed@google.com>
2018-01-26 19:52:04 +00:00
Brian Salomon
33bf56d6b4 Remove GrContext::getRecommendedSampleCount and SkPictureContentInfo::suitableForGpuRasterization
Change-Id: I8c5521f87c5eae185e68622aa104cb8911efa8c8
Reviewed-on: https://skia-review.googlesource.com/100183
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-01-26 17:13:00 +00:00
Mike Reed
1bd556a177 use coverage modes instead of blend modes
Bug: skia:
Change-Id: Ib3aa0137644358173ea4087693f33dbc2118c6d2
Reviewed-on: https://skia-review.googlesource.com/99661
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-01-26 17:03:58 +00:00
Mike Reed
20dc672821 compose and combine maskfilters
Bug: skia:
Change-Id: Id470124021d00ee25cf4ae392a4ee345ced84110
Reviewed-on: https://skia-review.googlesource.com/97760
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2018-01-25 01:54:21 +00:00
Robert Phillips
a83d0132ba Misc guarding of enums in ImageFilter CreateProcs
Change-Id: I51886aaf2a4670f46ca489b2369dc00e60403c75
Reviewed-on: https://skia-review.googlesource.com/99328
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-01-24 21:54:30 +00:00
Cary Clark
745c398754 minor imageinfo fixes
teeny fixes to SkImageInfo.h to get
ready for documenting it. Selected
SkImageInfo.h as Herb discovered that
global enums (especially forward
declared ones) break bookmaker.

TBR=reed@google.com
Bug: skia:6898
Change-Id: I6ecf4f9dd7022c810f3d7a6cfee10fb07aa49aee
Reviewed-on: https://skia-review.googlesource.com/99342
Reviewed-by: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@skia.org>
2018-01-24 21:26:29 +00:00
Robert Phillips
b0ae566b23 Check enum values in SkDisplacementMapEffect's CreateProc
Bug: skia:5635
Change-Id: Iaa01d2207916d0e2a2e2623f124b2b4023b51b1b
Reviewed-on: https://skia-review.googlesource.com/99204
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2018-01-24 20:14:19 +00:00
Greg Daniel
f2336e4500 Add lazy proxy's for wrapping backend textures
Bug: skia:
Change-Id: I3bb557cefc35312adc9515b5683d2ed747bb4eb3
Reviewed-on: https://skia-review.googlesource.com/96862
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-01-24 15:12:30 +00:00
Leon Scroggins III
8524c30a97 Make SkAnimatedImage::update return sentinel when stopped
Bug: b/63908092
Change-Id: I585f3d3efde1db4d5be36b11f19fe6e88f131608
Reviewed-on: https://skia-review.googlesource.com/98062
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2018-01-23 22:21:40 +00:00
Herb Derby
980a48de64 Move glyph cache and descriptor functions off of SkPaint
BUG=skia:7515

Change-Id: If17b157db1077a9a3c0f9efd03929f62a3486419
Reviewed-on: https://skia-review.googlesource.com/98841
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Herb Derby <herb@google.com>
2018-01-23 21:55:50 +00:00
Chris Dalton
27059d36d6 ccpr: Use primitive restart feature on ARM
Bug: skia:
Change-Id: Ia7ab55f8b6ecdd674762f5197d35e8db58f07c01
Reviewed-on: https://skia-review.googlesource.com/98180
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-01-23 21:29:10 +00:00
Mike Reed
80747ef591 move the guts of SkMaskFilter.h into SkMaskFilterBase.h
Bug: skia:
Change-Id: I29ad0960156562867429542d3cfbf3d639529cab
Reviewed-on: https://skia-review.googlesource.com/98802
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-01-23 21:14:20 +00:00
Brian Salomon
ea26d6b816 Revert "Revert "Revert "Use GrOvalOpFactory ops to draw non-AA rrects, ovals, and arcs."""
This reverts commit b4e965c103.

Reason for revert: Thin stroke problems, chrome pixel test, g3 clang-tidy

Original change's description:
> Revert "Revert "Use GrOvalOpFactory ops to draw non-AA rrects, ovals, and arcs.""
> 
> This reverts commit befff6580e.
> 
> Bug: skia:
> Change-Id: Ia108408cd986c03783af5058845790f6b17201f4
> Reviewed-on: https://skia-review.googlesource.com/98703
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com

Change-Id: I785af7efdfc39680052f5721a55ecffbeaf1f0ad
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/98785
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-01-23 20:33:30 +00:00
Robert Phillips
bee273291f Fix some fuzzer bugs from Skia's image filter fuzzer
Change-Id: I432b3a351eecca0d36635e37f91d32c0e281b7d9
Reviewed-on: https://skia-review.googlesource.com/98384
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2018-01-23 19:54:00 +00:00
Brian Salomon
01b476a028 Start of adding GrContextOption that overrides driver workarounds.
This handles most of the GL driver workarounds but not Vulkan (yet). GL wokarounds related to config support are still not handled.

Change-Id: I3d0f62ac8a0f6e9ba13632ea82acdc493912c63d
Reviewed-on: https://skia-review.googlesource.com/98382
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-01-23 18:33:49 +00:00
Mike Reed
165fa634b7 check for valid vertices mode
Bug: skia:7512
Change-Id: I2ede2232f3807e7bad8562eb3bf6327ffc52a996
Reviewed-on: https://skia-review.googlesource.com/98760
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-01-23 18:28:47 +00:00
Brian Salomon
b4e965c103 Revert "Revert "Use GrOvalOpFactory ops to draw non-AA rrects, ovals, and arcs.""
This reverts commit befff6580e.

Bug: skia:
Change-Id: Ia108408cd986c03783af5058845790f6b17201f4
Reviewed-on: https://skia-review.googlesource.com/98703
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-01-23 18:28:46 +00:00
Herb Derby
d8327a8c8b Clean up SkScalerContext descriptor creation
Allow a descriptor creation using just a rec and effects.
This is the most complex part of the change.

Cleanup SkScalerContextFlags to be a real thing.
This has spread everywhere.

BUG=skia:7515

Change-Id: I67189c9aeb51f1777a1c60145216524d440cb890
Reviewed-on: https://skia-review.googlesource.com/98320
Commit-Queue: Herb Derby <herb@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2018-01-23 18:13:36 +00:00
Mike Reed
0331d37af9 remove unneeded SkFlattenableSerialization
Bug: skia:
Change-Id: I5cf40b88b05dcd8e83383f6271b046eac8d55e35
Reviewed-on: https://skia-review.googlesource.com/98642
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2018-01-23 18:13:35 +00:00
Mike Reed
75ae421c24 IWYU -- SkShader.h
Bug: skia:
Change-Id: I57bffc14c4888627a22158e35f3ac3b762138f02
Reviewed-on: https://skia-review.googlesource.com/98520
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-01-23 18:08:30 +00:00
Greg Daniel
48661b868f Make use of VkSemaphores thread safe assuming use of the same VkQueue.
This allows us to re-enable support for multiple GrContexts in
GrBackendTextureImageGenerator.

Bug: skia:
Change-Id: Ifd6ac1ad81cdfbd1fd986467d8beb359399d6588
Reviewed-on: https://skia-review.googlesource.com/98340
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-01-22 21:41:45 +00:00
Mike Reed
baafcdcd54 move zero-init to sk_malloc for masks
Bug: skia:
Change-Id: I75d557068bdcd9e9f7e380e4fa447f9d83dd1554
Reviewed-on: https://skia-review.googlesource.com/98200
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-01-22 20:50:47 +00:00
Leon Scroggins III
2cb6cb1f33 Add SkAnimatedImage::isFinished
Bug: b/63908092

Allows Android to know when to call onAnimationEnd.

Change-Id: I9cc102fb485e944ad5983eed9f0b941153128e88
Reviewed-on: https://skia-review.googlesource.com/97401
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2018-01-22 19:32:17 +00:00
Leon Scroggins III
4c11945a97 Respect repetition count in SkAnimatedImage
Bug: b/63908092

By default use the repetition count stored in the encoded data (if
any). Allow setting the repetition count manually, so that the
animation will stop after n+1 total cycles (unless -1 is used for
infinite).

If the animation is complete, make start reset it.

When the animation is not running, make update return max double (i.e.
no need to update any time soon).

Fix a bug where the first call to update returned -1.

Share write_bm with CodecAnimTest, for debugging.

Update Sample to check isRunning rather than keeping its own record
of whether the animation is running.

Change-Id: I883e4d7325f7a7b23a422fa9d756f9ea3018f0f8
Reviewed-on: https://skia-review.googlesource.com/97082
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2018-01-22 18:53:47 +00:00
Jim Van Verth
87d18ced0a Add Chinese zoom Sample.
Bug: skia:
Change-Id: Ibe5ffee64fe9fccd6b8d86c1310a78d2d51e424e
Reviewed-on: https://skia-review.googlesource.com/97065
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-01-22 18:20:27 +00:00
Robert Phillips
f35fd8d2f2 Move more internal methods from GrContext to GrContextPriv (take 3)
Change-Id: Ied630e61cf95780bf85032867e6ce663e1ef9c2f
Reviewed-on: https://skia-review.googlesource.com/98000
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-01-22 16:53:17 +00:00
Brian Salomon
dba65f95e4 Add a workaround for inaccurate interpolants on Adreno 3xx.
Also ensure that sk_FragCoord x and y values are at pixel centers when
workaround is used.

Change-Id: Ib748af9e496a406a50622e00e96e1346cbb5eb26
Reviewed-on: https://skia-review.googlesource.com/97064
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-01-22 14:14:18 +00:00
Mike Reed
a6cd625f49 Revert "declare SkRasterizer for android"
This reverts commit e168c3e8f9.

Reason for revert: fix in android landed

Original change's description:
> declare SkRasterizer for android
> 
> Bug: skia:
> Change-Id: Ibea090143c7fe21c21a5d98dc490eca0fc72ab99
> Reviewed-on: https://skia-review.googlesource.com/97665
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Mike Reed <reed@google.com>

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

Change-Id: I54b4dfdef9645605fbdb69bfdb0b03293cd4f4a8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/97880
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-01-22 12:35:49 +00:00
Mike Reed
e168c3e8f9 declare SkRasterizer for android
Bug: skia:
Change-Id: Ibea090143c7fe21c21a5d98dc490eca0fc72ab99
Reviewed-on: https://skia-review.googlesource.com/97665
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2018-01-21 21:20:13 +00:00
Mike Reed
8ad91a9bf8 remove unused SkRasterizer
Bug: skia:7500
Change-Id: Iaa683cf8f0b18887cce4ec676631d1e1efee1712
Reviewed-on: https://skia-review.googlesource.com/97400
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2018-01-21 18:24:11 +00:00
Mike Reed
bfadcf0224 Revert "Revert "use GrFPArgs for maskfilters""
This reverts commit 4f7f197c09.

Reason for revert: not needed for roll

Original change's description:
> Revert "use GrFPArgs for maskfilters"
> 
> This reverts commit a99b393995.
> 
> Reason for revert: try to unblock android roller
> 
> Original change's description:
> > use GrFPArgs for maskfilters
> > 
> > Bug: skia:
> > Change-Id: I8516a3b0f6d8301c51f0861c65b9fe8f692fc5e5
> > Reviewed-on: https://skia-review.googlesource.com/97260
> > Commit-Queue: Mike Reed <reed@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> 
> TBR=egdaniel@google.com,bsalomon@google.com,reed@google.com
> 
> Change-Id: Iefe8ed19bba75df86173dec53f5ed4f1ea8724d0
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/97581
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

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

Change-Id: I82c0e3234ff1b23c6d08259aae7dcb03087a415e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/97583
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-01-20 22:24:31 +00:00
Leon Scroggins
2914555e00 Revert "Move more internal methods from GrContext to GrContextPriv (take 2)"
This reverts commit c22e50bd31.

Reason for revert: Speculative fix for Android roll

Original change's description:
> Move more internal methods from GrContext to GrContextPriv (take 2)
> 
> Change-Id: I47108910517d61edeb52f82793d384fdb5605d45
> Reviewed-on: https://skia-review.googlesource.com/97241
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

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

Change-Id: I3a77ac33c5f48529357cf9c683d5f4cacaa2379f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/97582
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2018-01-20 17:09:10 +00:00
Mike Reed
4f7f197c09 Revert "use GrFPArgs for maskfilters"
This reverts commit a99b393995.

Reason for revert: try to unblock android roller

Original change's description:
> use GrFPArgs for maskfilters
> 
> Bug: skia:
> Change-Id: I8516a3b0f6d8301c51f0861c65b9fe8f692fc5e5
> Reviewed-on: https://skia-review.googlesource.com/97260
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

Change-Id: Iefe8ed19bba75df86173dec53f5ed4f1ea8724d0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/97581
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-01-20 14:49:30 +00:00
Vladimir Levin
ad6660a639 Use equal_range for factory lookups
This patch uses equal_range instead of linear search to look up a
factory entry by name. This does require a sort, but the expected usage
is that the sort happens once and look ups happen many times.

This improves performance on Chromium's oop deserialization of
flattenables by about 10%

R=reed@chromium.org

Change-Id: I907f457a2ffb7d5b6d8261343099d982260b8415
Reviewed-on: https://skia-review.googlesource.com/96820
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2018-01-19 21:17:56 +00:00
Mike Reed
a99b393995 use GrFPArgs for maskfilters
Bug: skia:
Change-Id: I8516a3b0f6d8301c51f0861c65b9fe8f692fc5e5
Reviewed-on: https://skia-review.googlesource.com/97260
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-01-19 19:39:16 +00:00
Robert Phillips
c22e50bd31 Move more internal methods from GrContext to GrContextPriv (take 2)
Change-Id: I47108910517d61edeb52f82793d384fdb5605d45
Reviewed-on: https://skia-review.googlesource.com/97241
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-01-19 19:26:46 +00:00
Robert Phillips
88260b549f Split GrContext into Normal/DDL flavors
Change-Id: If37d8a236bd71e2d7121eaafb9d7c7b08328b10f
Reviewed-on: https://skia-review.googlesource.com/84863
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-01-19 18:36:35 +00:00
Hal Canary
07320e46c0 Revert "Move more internal methods from GrContext to GrContextPriv"
This reverts commit f440cecbfd.

Reason for revert: breaking android builds. 

Original change's description:
> Move more internal methods from GrContext to GrContextPriv
> 
> TBR=bsalomon@google.com
> Change-Id: Ia8cf0e0d30451c69bc7a08215aafa6abe6e0ddbe
> Reviewed-on: https://skia-review.googlesource.com/97080
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

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

Change-Id: If263f8161f0fbe3fc6ee8f34bb09e237705c3694
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/97200
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-01-19 18:18:24 +00:00
Robert Phillips
f440cecbfd Move more internal methods from GrContext to GrContextPriv
TBR=bsalomon@google.com
Change-Id: Ia8cf0e0d30451c69bc7a08215aafa6abe6e0ddbe
Reviewed-on: https://skia-review.googlesource.com/97080
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-01-19 18:03:03 +00:00
Heather Miller
440f8382b0 Update Skia milestone to 66
TBR=reed@google.com

Bug: skia:
Change-Id: Ib011c6d4a6e54980d2e6e8b16a93551d99dcd948
Reviewed-on: https://skia-review.googlesource.com/97103
Reviewed-by: Heather Miller <hcm@google.com>
Commit-Queue: Heather Miller <hcm@google.com>
2018-01-19 17:07:13 +00:00
Jim Van Verth
b1b80f7de4 Remove tonal color from DrawShadow internals
Bug: b/71719631
Change-Id: I676c34dfe5ea9b5e184ea53dd49a8b835d4e8cb6
Reviewed-on: https://skia-review.googlesource.com/95741
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2018-01-19 16:32:13 +00:00
Mike Reed
5a0f345532 remove code from old picture serial guard
Bug: skia:
Change-Id: If50a76c7f570d6e88f6583d381d0354568398039
Reviewed-on: https://skia-review.googlesource.com/97060
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2018-01-19 14:30:33 +00:00
Mike Reed
6e87eee2a0 add shadermaskfilter
next steps:
- gpu impl (will look a lot like shader's asFragProcessor
- special-case rect-input (?)
- explore stages w/ mtklein

Bug: skia:7500
Change-Id: I71089e421d32443a3ddded6967b3e5bc67ed43f2
Reviewed-on: https://skia-review.googlesource.com/95104
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-01-18 21:24:38 +00:00
Mike Reed
e97e792c79 validate paint setters in readbuffer
Bug: skia:7425
Change-Id: I55213bc206cf5cfb8cbf4fbe8a682efd6eae59fa
Reviewed-on: https://skia-review.googlesource.com/96860
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2018-01-18 21:14:19 +00:00
Robert Phillips
adbe132878 Remove GrSurfaceProxy::MakeWrapped (take 2)
TBR=bsalomon@google.com
Change-Id: I26fd911da502fb00addacb8b2c1a263efc5aa4ec
Reviewed-on: https://skia-review.googlesource.com/95881
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-01-17 19:43:57 +00:00
Robert Phillips
e201ebc995 Revert "Remove GrSurfaceProxy::MakeWrapped"
This reverts commit 2ac5868f4a.

Reason for revert: Breaking Android
Original change's description:
> Remove GrSurfaceProxy::MakeWrapped
> 
> Change-Id: Ic44cf1745dc3be21cbbaa1dc4ac85c8b1b21c6bb
> Reviewed-on: https://skia-review.googlesource.com/94101
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

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

Change-Id: I312118106db1cf64fe959d36e65619a41d58e654
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/95860
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-01-17 18:12:57 +00:00
Leon Scroggins III
b1b7f70103 Add Android ImageDecoder features to SkAnimatedImage
Bug: b/63909536
Bug: b/63908092

- Scale to an arbitrary size, using the decoding library if it supports
  it, and Skia otherwise
- Crop to a subset
- Post-processing with an SkPicture, to facilitate circle masks etc
- isRunning, to implement Animatable2 interface in Java

Change-Id: I13dbabee8e4a22e5cc193856aa3e94ce23ae4cb5
Reviewed-on: https://skia-review.googlesource.com/94660
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2018-01-17 17:46:17 +00:00
Robert Phillips
2ac5868f4a Remove GrSurfaceProxy::MakeWrapped
Change-Id: Ic44cf1745dc3be21cbbaa1dc4ac85c8b1b21c6bb
Reviewed-on: https://skia-review.googlesource.com/94101
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-01-17 17:40:47 +00:00
Robert Phillips
777707be84 Move GrSurfaceProxy::MakeLazy to GrProxyProvider::createLazy
This is pretty much a straight up move of the GrSurfaceProxy code with some plumbing to get the ProxyProvider in the right places.

Change-Id: I63cecb242dada503f97dbd1c0ce7ede75323100d
Reviewed-on: https://skia-review.googlesource.com/94200
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-01-17 17:04:26 +00:00
Greg Daniel
e728f676d6 Update to GrBackendTexutreImageGenerator to support lazy texture proxies
Bug: skia:
Change-Id: I7cce869894e274250f49328550a0ae2d8e04de74
Reviewed-on: https://skia-review.googlesource.com/95022
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-01-17 16:27:17 +00:00
Jim Van Verth
c65b65dd81 Support scaled color emojis for SDF fallback
This patch enables scaling for overlarge color emojis when trying to
render with SDFs, i.e. between 162 and 324 point in normal text
rendering mode. Also ensures that we only try to render blobs with
bitmap/SDF when the text size will fit in the atlas.

Bug: skia:
Change-Id: Ib675d99ef22bf66368dc8737ef63db4a5d3d5a9f
Reviewed-on: https://skia-review.googlesource.com/94361
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2018-01-17 15:45:36 +00:00
Greg Daniel
94a6ce84ec Add ability for lazy proxy callback to free captured resources
This will be needed for DDLs that get recorded, but then deleted before
the proxies actually get instantiated.

Bug: skia:
Change-Id: I745366fc7a7edbcd43bc617220d3d4997baa8319
Reviewed-on: https://skia-review.googlesource.com/95101
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-01-17 14:58:26 +00:00
Mike Reed
279643019e move SkWriter32.h to src
Bug: skia:
Change-Id: If110f1716d2ad3b967aadca1c61d3e22386e17b1
Reviewed-on: https://skia-review.googlesource.com/94862
Commit-Queue: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2018-01-16 22:20:28 +00:00
Leon Scroggins III
07a722cdcf Add SkAndroidCodec::computeSampledSize
Bug: b/63909536

Android's ImageDecoder API takes as input an arbitrary width and height
to scale the image to. Internally, this uses SkAndroidCodec to sample,
and then (if not a perfect match) scales to the desired size with
drawing.

computeSampledSize is a modified version of what ImageDecoder currently
does to convert from arbitrary dimensions to a sampleSize. Moving it
here allows it to be shared by SkAnimatedImage. The modified version
also corrects two bugs:
- a client using the dimensions returned by getSampledDimensions
  previously may have resulted in ImageDecoder decoding to a larger
  size and then scaling it. (example found in tests: dog.jpg is
  180 x 180. getSampledDimensions(8) returns 23 x 23, but the old
  method resulted in using sampleSize of 7 and downscaling the resulting
  25 x 25 image.)
- recompute the sampleSize based on the size returned by
  getSampledDimensions.

Change-Id: I022040e8bac31c20988903a0452257f7ae902bc7
Reviewed-on: https://skia-review.googlesource.com/94620
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2018-01-16 21:23:08 +00:00
Robert Phillips
6be756b673 Move resourceProvider accessor to GrContextPriv (take 2)
TBR=bsalomon@google.com
Change-Id: I3fd46ebfad0d04b8a2bfa6190f81308f3a6be620
Reviewed-on: https://skia-review.googlesource.com/95121
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-01-16 20:53:28 +00:00
Leon Scroggins III
42ee284567 Use SkAndroidCodec in SkAnimatedImage
Bug: b/63909536
Bug: b/63908092

SkAnimatedImage is designed around a specific Android use case, so move
it into the android folders.

Make SkAnimatedImage hold an SkAndroidCodec (instead of an SkCodec).
Expose fCodec so that SkAnimatedImage can animate by using the internal
SkCodec.

Update the sample to use SkAndroidCodec.

Allow webp to decode a scaled down animation. For RestoreBG frames,
adjust the frameRect (which is erased) to account for the scaling. Add
a test to verify that we decode a webp with a RestoreBG frame
successfully. Disable scaling for later frames in other formats (GIF,
for now), since the code for erasing a RestoreBG frame is currently
unaware of the sampling.

Change-Id: I5dd2b86138f2c7f6adcd08dce1bd49040f7dc224
Reviewed-on: https://skia-review.googlesource.com/94621
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2018-01-16 20:36:09 +00:00
Hal Canary
be46e24d57 Revert "Move resourceProvider accessor to GrContextPriv"
This reverts commit 1f9ed8501b.

Reason for revert: 
 1. breaking android roll 
 2. breaking Build-Debian9-Clang-arm-Release-Android_API26



Original change's description:
> Move resourceProvider accessor to GrContextPriv
> 
> Change-Id: I5cddd620a7ec4b006b7359864ede58e9d4dd684e
> Reviewed-on: https://skia-review.googlesource.com/94340
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

Change-Id: I20b2d267c0925f20453b635663654967199a1197
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/94964
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-01-16 18:33:14 +00:00
Leon Scroggins III
fe3da02e76 Add a method to convert SkCodec::Result to a string
Bug: b/63909536
Change-Id: Ic91e3401359f80eadd9d1cd79aa8ef642c60b0fc
Reviewed-on: https://skia-review.googlesource.com/94781
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2018-01-16 17:17:58 +00:00
Robert Phillips
1f9ed8501b Move resourceProvider accessor to GrContextPriv
Change-Id: I5cddd620a7ec4b006b7359864ede58e9d4dd684e
Reviewed-on: https://skia-review.googlesource.com/94340
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-01-16 17:02:45 +00:00
Brian Osman
cd3261ac65 Revert "Revert "Added SkSL workaround for devices which cannot safely access gl_FragCoord""
This reverts commit 9d6929cccf.

Reason for revert: Re-landing, backfill reveals none of the red was related to this CL.

Original change's description:
> Revert "Added SkSL workaround for devices which cannot safely access gl_FragCoord"
> 
> This reverts commit 1001f843a4.
> 
> Reason for revert: Many failures.
> 
> Original change's description:
> > Added SkSL workaround for devices which cannot safely access gl_FragCoord
> > 
> > This is the root cause of https://github.com/flutter/flutter/issues/13216
> > I've got a GM that demonstrates the bug, but only in Viewer.
> > 
> > Bug: skia:7410
> > Change-Id: Iaa1f27b10166aa09e4dc5949e5a6ca1bd14c99ac
> > Reviewed-on: https://skia-review.googlesource.com/93920
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Brian Osman <brianosman@google.com>
> 
> TBR=bsalomon@google.com,brianosman@google.com,ethannicholas@google.com
> 
> Change-Id: I2a2edc0a8fa11fe9dac1045dc79ae91106518b02
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:7410
> Reviewed-on: https://skia-review.googlesource.com/94281
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

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

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

Bug: skia:7410
Change-Id: Ib22bda7ff25bb7c8630cc6fa6dc809bf628ea853
Reviewed-on: https://skia-review.googlesource.com/94800
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-01-16 14:12:31 +00:00
Robert Phillips
0bd24dc41f Funnel most proxy creation through GrProxyProvider
This is to provide a choke point for DDL to create Lazy Proxies.

Change-Id: If178da13bc6447b31b7601810236d34502d9efbd
Reviewed-on: https://skia-review.googlesource.com/93303
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-01-16 13:28:43 +00:00
Greg Daniel
befff6580e Revert "Use GrOvalOpFactory ops to draw non-AA rrects, ovals, and arcs."
This reverts commit 7cdabedc8b.

Reason for revert: Speculative revert for causing GLProgram failure on textureBarrierSupport assert

Original change's description:
> Use GrOvalOpFactory ops to draw non-AA rrects, ovals, and arcs.
> 
> This improves performance.
> 
> Bug: skia:
> Change-Id: Ie01170ec084be66ea166b2baffcdb415583aa523
> Reviewed-on: https://skia-review.googlesource.com/93321
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

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

Change-Id: I327e133c889207fb682bec7d6a95f9bf1403770b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/94161
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-01-12 20:58:14 +00:00
Brian Osman
9d6929cccf Revert "Added SkSL workaround for devices which cannot safely access gl_FragCoord"
This reverts commit 1001f843a4.

Reason for revert: Many failures.

Original change's description:
> Added SkSL workaround for devices which cannot safely access gl_FragCoord
> 
> This is the root cause of https://github.com/flutter/flutter/issues/13216
> I've got a GM that demonstrates the bug, but only in Viewer.
> 
> Bug: skia:7410
> Change-Id: Iaa1f27b10166aa09e4dc5949e5a6ca1bd14c99ac
> Reviewed-on: https://skia-review.googlesource.com/93920
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

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

Change-Id: I2a2edc0a8fa11fe9dac1045dc79ae91106518b02
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7410
Reviewed-on: https://skia-review.googlesource.com/94281
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-01-12 20:21:13 +00:00
Leon Scroggins III
7a10b332a3 Add an SkDrawable for animated images (e.g. GIF)
Bug: b/63909536

SkAnimatedImage is a simple drawable for animating a GIF. Thread-safety
is left up to the client. At most two bitmaps are stored in the
drawable; one for the current frame and one for a frame that may need to
be restored. The backup frame prevents some cases where we would
otherwise have to re-decode from the beginning of the image.

The API lets the client set the time value, and decodes to match that
time.

TODO:
- Callback for when the animation is complete
- Ability to use SkAndroidCodec
- Modify the loop count (or leave that up to client?)
- Better and/or client-specific caching

Other changes:
- Add a sample which animates a GIF
- Reenable SK_CODEC_PRINTF for debug builds and Android

Change-Id: I945ffbccdb6008f2a05ed4d9b2af869a261fb300
Reviewed-on: https://skia-review.googlesource.com/93420
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2018-01-12 19:36:11 +00:00
Greg Daniel
65fa8ca85e Updating lazy proxys to support the case where we know a lot more info about the texture.
This is needed for future DDL texture work.

Bug: skia:
Change-Id: I07e0b9c67509e63b9cac00adc355254d03784df8
Reviewed-on: https://skia-review.googlesource.com/91500
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2018-01-12 19:36:08 +00:00
Brian Salomon
7cdabedc8b Use GrOvalOpFactory ops to draw non-AA rrects, ovals, and arcs.
This improves performance.

Bug: skia:
Change-Id: Ie01170ec084be66ea166b2baffcdb415583aa523
Reviewed-on: https://skia-review.googlesource.com/93321
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-01-12 19:31:03 +00:00
Brian Osman
1001f843a4 Added SkSL workaround for devices which cannot safely access gl_FragCoord
This is the root cause of https://github.com/flutter/flutter/issues/13216
I've got a GM that demonstrates the bug, but only in Viewer.

Bug: skia:7410
Change-Id: Iaa1f27b10166aa09e4dc5949e5a6ca1bd14c99ac
Reviewed-on: https://skia-review.googlesource.com/93920
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-01-12 19:26:00 +00:00
Chris Dalton
8fd7955d03 Enable the GL_EXT_geometry_shader extension where necessary
Bug: skia:
Change-Id: I37bfb90efed28748d6c3e53be5c9703c291b036c
Reviewed-on: https://skia-review.googlesource.com/93460
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2018-01-11 19:27:39 +00:00
Mike Reed
d284949b59 restore intersect methods to use old-style empty-checks on their inputs
Bug introduced when we made isEmpty check for int32_t width/height

Bug:800804
Change-Id: I59799c88fb02f176c1545dd0edae050b510df079
Reviewed-on: https://skia-review.googlesource.com/93302
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2018-01-10 20:39:33 +00:00
Mike Reed
a766ca9af1 use 64bit math to compute is a rect is empty
Will work next to try to make isEmpty() private

Bug: skia:7470
Bug:799715
Change-Id: I7b43028ecd86dca68e0c67225712516d2f2f88a2
Reviewed-on: https://skia-review.googlesource.com/92620
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-01-09 16:54:52 +00:00
Hal Canary
99578d24c0 SkBitmap now *has* a SkPixmap.
Before:

    class SkBitmap {
        sk_sp<SkPixelRef> fPixelRef;
        void*             fPixels;
        SkImageInfo       fInfo;
        uint32_t          fRowBytes;
        uint8_t           fFlags;
    };

After:

    class SkBitmap {
        sk_sp<SkPixelRef> fPixelRef;
        SkPixmap          fPixmap;
        uint8_t           fFlags;
    };

Change-Id: I62d59ca3e702b7adea022cd3cfbf0cc3186af957
Reviewed-on: https://skia-review.googlesource.com/85560
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2018-01-09 16:46:22 +00:00
Mike Reed
185ffe916e make growToInclude private
Bug: skia:
Change-Id: Id55344ba2f33563d22c2bf4d5829a9a31095a47d
Reviewed-on: https://skia-review.googlesource.com/92143
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-01-08 22:32:51 +00:00
Hal Canary
c5980d0aa3 SkDocument: remove unused fDoneProc
Change-Id: I9a0739992e90a0a6d44a75b0b570097553343f1d
Reviewed-on: https://skia-review.googlesource.com/92141
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2018-01-08 20:53:41 +00:00
Mike Reed
274218ef01 move largest apis into private
Related to https://skia-review.googlesource.com/c/skia/+/91860

Bug: skia:
Change-Id: Ia8fd981b422bbab75541b078277d2e09e1fc9d41
Reviewed-on: https://skia-review.googlesource.com/91940
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-01-08 20:42:27 +00:00
Robert Phillips
1afd4cdb08 Add GrProxyProvider
This pulls all the proxy tracking & creation functionality out of the GrResourceCache and GrResourceProvider and consolidates it in the GrProxyProvider.

Change-Id: I7256f7c544319a70c1bd93dd5a9ccbe5fa0a544f
Reviewed-on: https://skia-review.googlesource.com/91501
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-01-08 19:05:31 +00:00
Hal Canary
3c7d882c48 SkBitmap::fPixelRefOrigin removed
Motivation: makes SkBitmap 8 bytes smaller.

fPixelRefOrigin is rarely used, and can be recaluated when needed.

Also, remove two of SkBitmap's private methods and fold in their
functions.

Change-Id: I2cddb9e4b5480404bf6da3edfb0155ab82cf47d2
Reviewed-on: https://skia-review.googlesource.com/91300
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-01-08 13:50:59 +00:00
Mike Reed
d23d8d1d98 remove guarded old malloc code
Bug: skia:
Change-Id: I045e3816f04accebffd86c4aaaa5da67f198186c
Reviewed-on: https://skia-review.googlesource.com/91405
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2018-01-07 14:49:58 +00:00
Mike Reed
8dc8dbc821 begin cleanup of malloc porting layer
1. Merge some of the allocators into sk_malloc_flags by redefining a flag to mean zero-init
2. Add more private helpers to simplify our call-sites (and handle some overflow mul checks)
3. The 2-param helpers rely on the saturating SkSafeMath::Mul to pass max_size_t as the request,
which should always fail.

Bug:508641
Change-Id: I322f1e6ed91113467e0fdb12c91c3dad33d890c8
Reviewed-on: https://skia-review.googlesource.com/90940
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Stephan Altmueller <stephana@google.com>
2018-01-05 21:29:35 +00:00
Brian Salomon
fa3783f17d Remove public version of SkMatrix::mapPointsWithStride.
Use private version already in SkMatrixPriv.

Change-Id: I6e9546afdf2b072402f9deecec99a6d236e2c7f4
Reviewed-on: https://skia-review.googlesource.com/91400
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-01-05 19:32:15 +00:00
Brian Salomon
88d99df31f [Viewer] Preserve gesture transformation matrix on slide/backend change
Change-Id: I417fb9b6d6b7c95884dff6871731883fe3736437
Reviewed-on: https://skia-review.googlesource.com/91460
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-01-05 18:18:39 +00:00
Brian Salomon
8fb3725acf Privatize separate src/dst version of SkMatrix::mapPointsWithStride.
Change-Id: I0bd6a4ded3667029c8c8336217e12eb93174911e
Reviewed-on: https://skia-review.googlesource.com/91380
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-01-05 18:03:27 +00:00
Leon Scroggins III
7397d7ade8 Add SkAndroidCodec::MakeFromCodec
Bug: b/71578461
Bug: b/63909536

This allows using APIs on SkCodec (e.g. the out-param result on
SkCodec::MakeFrom(Stream/Data), getOrigin) when an SkAndroidCodec is
ultimately desired without duplicating the APIs on SkAndroidCodec.
Change-Id: Ie9803278348acfb3955a795772d6472c15541646
Reviewed-on: https://skia-review.googlesource.com/90844
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2018-01-04 21:36:04 +00:00
Mike Reed
7edde238f7 don't include SkMalloc.h from SkTypes.h
Needed chrome CLs
https://chromium-review.googlesource.com/c/chromium/src/+/850741
https://chromium-review.googlesource.com/c/chromium/src/+/850920

Bug: skia:
Change-Id: Ic568174a56590a65bfa284c59fd104275ee78da9
Reviewed-on: https://skia-review.googlesource.com/90823
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2018-01-04 20:33:06 +00:00
Mike Reed
9fc53624a0 check for irect with overflow width/height
Bug:798066
Change-Id: Iac324ac5a32fae241a528751c84279ce60ac4baf
Reviewed-on: https://skia-review.googlesource.com/90544
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-01-03 21:01:54 +00:00
Mike Reed
c5166a9dcb Revert "Revert "remove legacy support for old old picture versions""
This reverts commit 6f1151140f.

Chrome has been updated, so this should be able to land.

Bug: skia:
Change-Id: I5a66782a39fecfac00edeb66fbd03dae4df1712c
Reviewed-on: https://skia-review.googlesource.com/90205
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-01-03 20:03:59 +00:00
Mike Reed
d1c65d6708 remove unneeded readbuffer flags
- buffers are always 'cross-process'
- readbuffer is always validating

Bug:796107
Change-Id: I59614e9c29490c0b029c60d2aafe2806671bc9e1
Reviewed-on: https://skia-review.googlesource.com/90560
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-01-03 18:13:39 +00:00
Cary Clark
2823f9f06c refresh public includes
Update includes to fix minor edits
and bookmaker bugs.

Also update SkPoint.h for the first
time to see if that sticks.

TBR=reed@google.com
Bug: skia:6898
Change-Id: I7d11dea45482602248e2d15b05699bb4c86ea4c6
Reviewed-on: https://skia-review.googlesource.com/90541
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-01-03 15:21:49 +00:00
Mike Reed
6f1151140f Revert "remove legacy support for old old picture versions"
This reverts commit f3504d430c.

Reason for revert: breaks unittest in Printing unittest in chrome

Original change's description:
> remove legacy support for old old picture versions
> 
> Bug: skia:
> Change-Id: Ieb97eabdb18e8c7bfa86e6a1fc6e0389cd096daa
> Reviewed-on: https://skia-review.googlesource.com/89860
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>

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

Change-Id: I9f90da5dcfb9543f2f575fa7dc3b9c82996b041d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/90020
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-29 04:35:31 +00:00
Mike Reed
f3504d430c remove legacy support for old old picture versions
Bug: skia:
Change-Id: Ieb97eabdb18e8c7bfa86e6a1fc6e0389cd096daa
Reviewed-on: https://skia-review.googlesource.com/89860
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-29 02:52:00 +00:00
Mike Reed
7557bbbe19 Revert "remove approxbytes api from SkPicture"
This reverts commit bfc11853a8.

Bug: skia:
Change-Id: Ied4baad0496a06a52bec6965f9c97e13ebe2ab0a
Reviewed-on: https://skia-review.googlesource.com/89442
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-25 02:51:32 +00:00
Mike Reed
bfc11853a8 remove approxbytes api from SkPicture
Bug: skia:
Change-Id: I292bc9ab52fe8df3ce97a2ad4b06085b0332b19d
Reviewed-on: https://skia-review.googlesource.com/89440
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-24 13:40:41 +00:00
Mike Reed
e4efc86293 remove unused header
Bug: skia:
Change-Id: I944962971e72f9dfa05473bf40f6328a92b7816a
Reviewed-on: https://skia-review.googlesource.com/89360
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-23 03:17:09 +00:00
Mike Reed
bdc453db78 remove dead code behind SK_SUPPORT_LEGACY_SERIALPROCS_REF
Bug: skia:
Change-Id: Iba5ad1e8d5c74c79627cabbbbe4e835278553609
Reviewed-on: https://skia-review.googlesource.com/88820
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-22 03:08:25 +00:00
Brian Osman
e9edf8cc50 Remove more functionality from SkColorSpace_Base
Push profile data into XYZ and A2B classes
Move SkColorSpace_Base::MakeRGB to SkColorSpace

Bug: skia:
Change-Id: I4782eb2a5c77b54d302e1982654755015dea7651
Reviewed-on: https://skia-review.googlesource.com/88560
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-12-21 21:01:35 +00:00
Cary Clark
f059e7ca18 fix bookmaker return value
crosscheck in bookmaker allows
discovery of multiple errors,
but fails to return that an
error occurred.

Fix SkSurface so it is up to date with includes.
Add include parameter name in SkSurface.
Allow longer parameter descriptions.

TBR=bsalomon@google.com,rmistry@google.com
Docs-Preview: https://skia.org/?cl=88041
Bug: skia:6898
Change-Id: I9daf83f7f6753b3d1dc996a76e4693b3b8d6798c
Reviewed-on: https://skia-review.googlesource.com/88041
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@google.com>
2017-12-21 20:56:30 +00:00
Mike Reed
47fdf6c85e add serialprocs to MultiDocument, hide redundant methods
Bug: skia:
Change-Id: I6521e93af79439bd8c1d2f5130a68492044a2ee9
Reviewed-on: https://skia-review.googlesource.com/87788
Reviewed-by: Wei Li <weili@chromium.org>
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-21 12:36:30 +00:00
Mike Reed
e3edf92744 remove unused typedef
Bug: skia:
Change-Id: I9e9268960bad9f47c9dd9bfc488f8c2ce31d8d7d
Reviewed-on: https://skia-review.googlesource.com/88360
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-21 11:40:30 +00:00
Mike Reed
b60c5ebf04 remove unused willPlayBackBitmaps from picture
and SkPictureAnalyzer

Bug: skia:
Change-Id: I394eca648234b1a69e6f9a0a88c407366a33d079
Reviewed-on: https://skia-review.googlesource.com/87791
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2017-12-20 20:27:06 +00:00
Mike Reed
e7a58321bb make InternalOnly_ functions actually private
Bug: skia:
Change-Id: Id06ad4283a0cd9835b3349c783b705b30435855a
Reviewed-on: https://skia-review.googlesource.com/87980
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-20 19:32:36 +00:00
Mike Reed
45e57732dd remove unused setter
Bug: skia:
Change-Id: I72340b4e11c9f2b53632baa4ab2d524e29be58f6
Reviewed-on: https://skia-review.googlesource.com/87960
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-20 19:22:58 +00:00
Brian Salomon
b5086961f3 Add matrix stack to SkAtlasTextTarget.
Makes SkAtlasTextRenderer::SDFVertex now has a 3 component position vector.

Change-Id: I7ec1a8068fb84388a82e1748d6e9d02820d55abd
Reviewed-on: https://skia-review.googlesource.com/84202
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2017-12-20 14:00:44 +00:00
Mike Reed
acd59ef085 move SkWriteBuffer.h to src
Need this to land first: https://chromium-review.googlesource.com/c/chromium/src/+/834714

Bug: skia:
Change-Id: I426bc3d9b5c4382b5b874b991e37fdd1725bd9a3
Reviewed-on: https://skia-review.googlesource.com/87301
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-20 03:20:43 +00:00
Mike Reed
f6eb1f9b63 simple version of serialization for SkTextBlob
Bug: skia:
Change-Id: I5c7d6a74ecf6079440fe5fc758e444a16764c7aa
Reviewed-on: https://skia-review.googlesource.com/87460
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-19 22:34:56 +00:00
Brian Salomon
0a241ce808 Don't canonicalize empty SkRRects. They stroke differently.
Make insetting greater than width or height collapse to a point/line.

SkPath::addRRect() doesn't ignore an empty SkRRect.


Change-Id: I933a3419a6d75be534f1d8328faa715772045f67
Reviewed-on: https://skia-review.googlesource.com/85680
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-12-19 21:10:36 +00:00
Mike Reed
92a2cfbcce macro to handle type-casting for SkFlattenable::Deserialize
Bug: skia:
Change-Id: If64f166cc03c32b7423361178d319474be063f19
Reviewed-on: https://skia-review.googlesource.com/87260
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-19 20:34:06 +00:00
Jim Van Verth
744cbb3888 Fix alpha contribution to tonal color.
Also adds a tonal color GM, a grayscale mode to shadowutils GM,
and animated alpha to SampleAndroidShadows.

Bug: skia:
Change-Id: I1dcb5cab7e53ffa7a3bf1a07b6ebfed38df1a9ed
Reviewed-on: https://skia-review.googlesource.com/85002
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2017-12-19 19:27:06 +00:00
Greg Daniel
faa095e984 Update SkSurface MakeFromBackend* factories to take an SkColorType.
Bug: skia:
Change-Id: Ib1b03b1181ec937843eac2e8d8cb03ebe53e32c1
Reviewed-on: https://skia-review.googlesource.com/86760
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-12-19 18:41:36 +00:00
Chris Dalton
040238bded Add a tools flag to suppress geometry shaders
Bug: skia:
Change-Id: I38736c5d49e3b281c2d23af3908575274ff97b5c
Reviewed-on: https://skia-review.googlesource.com/86282
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-12-19 17:26:56 +00:00
Mike Klein
6613cc5186 GOOGLE3 -> SK_BUILD_FOR_GOOGLE3
This is more consistent with our other SK_BUILD_FOR_... macros,
and less likely to collide with other preprocessor logic.

(Luckily, this was defined in public.bzl, so we can do this
all in one CL in the Skia repo.)

Change-Id: I5f232888288c9c53fad445545d983d0fb0b4add8
Reviewed-on: https://skia-review.googlesource.com/86940
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-12-19 14:42:16 +00:00
Greg Daniel
f226e66d75 Revert "Transform vertices for distance field glyphs on CPU."
This reverts commit 0215e39d7e.

Reason for revert: break intel 540 and HD2000 intel release bots on gltestthreading gm  dftext_blob_pers

Original change's description:
> Transform vertices for distance field glyphs on CPU.
> 
> This allows batching of DF draws with different view matrices.
> 
> For perspective matrices this means the transformed position vertex
> attribute must have w values. Currently, non-perspective DF draws still
> use 2 component positions, though this could be changed in the future.
> Consequently, perspective draws can batch with other perspective draws
> but not non-perspective draws.
> 
> Adds a GM to test batching and reusing the same blobs with both perspective
> and non-perspective matrices.
> 
> Change-Id: I0e42c5449ebf3a5a54025dbcdec824d904d5bd9e
> Reviewed-on: https://skia-review.googlesource.com/79900
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>

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

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

Change-Id: Idc658d9263976d5b5e00a5026c5d6d3c8f4bdc2d
Reviewed-on: https://skia-review.googlesource.com/86560
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-12-18 21:50:26 +00:00
Greg Daniel
de71572f65 Revert "move homogenous with stride to matrixpriv"
This reverts commit 2d53d98425.

Reason for revert: revert needed to revert previous cl

Original change's description:
> move homogenous with stride to matrixpriv
> 
> this appears to be needed only by Skia
> internally, so move it out of the public
> includes.
> 
> R=​bsalomon@google.com
> Bug: skia:6898
> Change-Id: Iebdda8f2c9a8fd953dd44bac9b74158d7491c21a
> Reviewed-on: https://skia-review.googlesource.com/85961
> Commit-Queue: Cary Clark <caryclark@skia.org>
> Commit-Queue: Cary Clark <caryclark@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,caryclark@google.com,caryclark@skia.org

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

Bug: skia:6898
Change-Id: Icbd15ee0b524c770a324c490ab0cadf6a045e0d5
Reviewed-on: https://skia-review.googlesource.com/86800
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-12-18 21:28:52 +00:00
Greg Daniel
f5d8758f29 Add new SkImage factory to create from GrBackendTexture with SkColorType
Bug: skia:
Change-Id: I46bdc54b6d9cdacc8f5a06644aa6b110837879f0
Reviewed-on: https://skia-review.googlesource.com/84342
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-12-18 21:17:46 +00:00
Brian Osman
ff50008305 Increase accuracy of float -> fixed in ICC code
Add a comment to SkFixed explaining the accuracy issues of the macros.
Re-land of: https://skia-review.googlesource.com/85742

Bug: skia:
Change-Id: I09cef45bdb858608a6afe6c30424d8046cac50ec
Reviewed-on: https://skia-review.googlesource.com/86540
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-12-18 19:49:12 +00:00
Mike Reed
ef03848357 remove deprecated SkPixelSerializer
Bug: skia:
Change-Id: I25d33517f1ec7c08551c79d03763c676d1a662f5
Reviewed-on: https://skia-review.googlesource.com/86360
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-16 14:21:32 +00:00
Mike Reed
594706566a remove dead SK_SUPPORT_LEGACY_IMAGEDESERIALIZER code
Bug: skia:
Change-Id: I76be4b179ff23c8584b62b1bb0fa7a964c2ee97e
Reviewed-on: https://skia-review.googlesource.com/86320
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-16 11:42:42 +00:00
Eric Karl
dd821bc564 Revert "Increase accuracy of float -> fixed in ICC code"
This reverts commit ef8dda227b.

Reason for revert: This is breaking WebKit layout tests on linux and blocking the autoroller. Probably just needs a rebase. See:
https://storage.googleapis.com/chromium-layout-test-archives/linux_trusty_blink_rel/20229/layout-test-results/results.html

Original change's description:
> Increase accuracy of float -> fixed in ICC code
> 
> Add a comment to SkFixed explaining the accuracy issues of the macros.
> 
> Bug: skia:
> Change-Id: Ibfecb16821fefe87822cc3acd1cf8498df10a492
> Reviewed-on: https://skia-review.googlesource.com/85742
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

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

Change-Id: I354327767bd59a6104b1431b053721c3102719be
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/86281
Reviewed-by: Eric Karl <ericrk@chromium.org>
Commit-Queue: Eric Karl <ericrk@chromium.org>
2017-12-16 00:40:13 +00:00
Eric Karl
aae533e418 Revert "Remove SkImage deferred texture image data APIs."
This reverts commit 4f5e1d4ff3.

Reason for revert: Unfortunately, we need this in Chrome for a bit longer. Working on understanding why the new path led to regressions. Will re-land this once the new path sticks.

Original change's description:
> Remove SkImage deferred texture image data APIs.
> 
> These APIs existed for Chrome. Chrome is no longer using them.
> 
> Change-Id: I15a5e2f88c7e8d1356188748fc68d4658f6f1849
> Reviewed-on: https://skia-review.googlesource.com/81021
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Cary Clark <caryclark@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org

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

Change-Id: Ic9f683f262f2e1d0469156360f5ffaee977ca44a
Reviewed-on: https://skia-review.googlesource.com/86280
Reviewed-by: Eric Karl <ericrk@chromium.org>
Commit-Queue: Eric Karl <ericrk@chromium.org>
2017-12-15 23:57:41 +00:00
Mike Reed
2e3f2e9b48 Revert "Revert "remove SK_SUPPORT_LEGACY_PDF_PIXELSERIALIZER dead code""
This reverts commit 800f5541bb.

Reason for revert: google3 updated

Original change's description:
> Revert "remove SK_SUPPORT_LEGACY_PDF_PIXELSERIALIZER dead code"
> 
> This reverts commit 7f846f273c.
> 
> Reason for revert: missed callsite in google3
> 
> Original change's description:
> > remove SK_SUPPORT_LEGACY_PDF_PIXELSERIALIZER dead code
> > 
> > Bug: skia:
> > Change-Id: Ia88f3e2fdf6d5c6e5128eaefda0d68c7042ae7a2
> > Reviewed-on: https://skia-review.googlesource.com/85500
> > Commit-Queue: Mike Reed <reed@google.com>
> > Reviewed-by: Hal Canary <halcanary@google.com>
> 
> TBR=halcanary@google.com,reed@google.com
> 
> Change-Id: I232dc24831bd8d52e9cbbc7ee58177af0617574a
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/85600
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

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

Change-Id: I6ccd032caf87020cba8d515ffb25d07b87267363
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/86101
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-15 20:43:10 +00:00
Mike Reed
a091a4bd78 Revert "Revert "hide SkImageDeserializer""
This reverts commit 36d7178792.

Reason for revert: google3 updated

Original change's description:
> Revert "hide SkImageDeserializer"
> 
> This reverts commit 834fb8ed90.
> 
> Reason for revert: broke google3
> 
> Original change's description:
> > hide SkImageDeserializer
> > 
> > Bug: skia:
> > Change-Id: I1cd4e8c626628a3e6426afd7d6bae628d58989c3
> > Reviewed-on: https://skia-review.googlesource.com/85743
> > Reviewed-by: Mike Reed <reed@google.com>
> > Commit-Queue: Mike Reed <reed@google.com>
> 
> TBR=reed@google.com,reed@chromium.org
> 
> Change-Id: I00679c8651817af1777785da6c8dac9411a2a7c2
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/85880
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

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

Change-Id: Icce36dfb9570ccf79f165076c59aa4de49fb6040
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/86100
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-15 20:42:21 +00:00
Brian Osman
ef8dda227b Increase accuracy of float -> fixed in ICC code
Add a comment to SkFixed explaining the accuracy issues of the macros.

Bug: skia:
Change-Id: Ibfecb16821fefe87822cc3acd1cf8498df10a492
Reviewed-on: https://skia-review.googlesource.com/85742
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-12-15 19:25:08 +00:00
Cary Clark
2d53d98425 move homogenous with stride to matrixpriv
this appears to be needed only by Skia
internally, so move it out of the public
includes.

R=bsalomon@google.com
Bug: skia:6898
Change-Id: Iebdda8f2c9a8fd953dd44bac9b74158d7491c21a
Reviewed-on: https://skia-review.googlesource.com/85961
Commit-Queue: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-12-15 18:37:39 +00:00
Mike Reed
36d7178792 Revert "hide SkImageDeserializer"
This reverts commit 834fb8ed90.

Reason for revert: broke google3

Original change's description:
> hide SkImageDeserializer
> 
> Bug: skia:
> Change-Id: I1cd4e8c626628a3e6426afd7d6bae628d58989c3
> Reviewed-on: https://skia-review.googlesource.com/85743
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

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

Change-Id: I00679c8651817af1777785da6c8dac9411a2a7c2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/85880
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-15 17:26:59 +00:00
Brian Salomon
0215e39d7e Transform vertices for distance field glyphs on CPU.
This allows batching of DF draws with different view matrices.

For perspective matrices this means the transformed position vertex
attribute must have w values. Currently, non-perspective DF draws still
use 2 component positions, though this could be changed in the future.
Consequently, perspective draws can batch with other perspective draws
but not non-perspective draws.

Adds a GM to test batching and reusing the same blobs with both perspective
and non-perspective matrices.

Change-Id: I0e42c5449ebf3a5a54025dbcdec824d904d5bd9e
Reviewed-on: https://skia-review.googlesource.com/79900
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2017-12-15 17:06:08 +00:00
Mike Reed
834fb8ed90 hide SkImageDeserializer
Bug: skia:
Change-Id: I1cd4e8c626628a3e6426afd7d6bae628d58989c3
Reviewed-on: https://skia-review.googlesource.com/85743
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-15 16:49:38 +00:00
Mike Reed
800f5541bb Revert "remove SK_SUPPORT_LEGACY_PDF_PIXELSERIALIZER dead code"
This reverts commit 7f846f273c.

Reason for revert: missed callsite in google3

Original change's description:
> remove SK_SUPPORT_LEGACY_PDF_PIXELSERIALIZER dead code
> 
> Bug: skia:
> Change-Id: Ia88f3e2fdf6d5c6e5128eaefda0d68c7042ae7a2
> Reviewed-on: https://skia-review.googlesource.com/85500
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Hal Canary <halcanary@google.com>

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

Change-Id: I232dc24831bd8d52e9cbbc7ee58177af0617574a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/85600
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-15 05:24:09 +00:00
Mike Reed
7f846f273c remove SK_SUPPORT_LEGACY_PDF_PIXELSERIALIZER dead code
Bug: skia:
Change-Id: Ia88f3e2fdf6d5c6e5128eaefda0d68c7042ae7a2
Reviewed-on: https://skia-review.googlesource.com/85500
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
2017-12-15 04:28:07 +00:00
Hal Canary
a088365e2f SkBitmap::pixmap
Change-Id: I6d062b9ae1d242970be140d5a1885639c8c45f77
Reviewed-on: https://skia-review.googlesource.com/85320
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-12-15 01:23:57 +00:00
Mike Reed
a4daf19319 Moving extra options/parameters into PDFMetadata
Bug: skia:
Change-Id: I29aa69e5765a7f8ba05b0361912d1f5276d77de3
Reviewed-on: https://skia-review.googlesource.com/84501
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-14 21:20:27 +00:00
Mike Klein
c38cce63b3 make SkColorSpace_New real
Some interesting things are starting to fall out already,
like the fact that I needed to add a gamma_dst stage to
be able to draw into gamma-transfer-fn destinations.

I've also had to pass an SkAlphaType through to the linearize
functions so that they can maintain premul invariants.  I'm not
sure this is actually a good idea... if you can, please double-
check my logic at SkRasterPipeline.cpp:128?

If it's correct logic, I'm going to need to do it all over the place.
But I imagine you don't do this and somehow get away with it.

Change-Id: I42cd9b161b54287d674225103ad9e19f8b388959
Reviewed-on: https://skia-review.googlesource.com/84680
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-12-14 19:02:17 +00:00
Jim Van Verth
474d687919 Send TextBlobCache purge messages only to owning cache.
Bug: 703297
Change-Id: I95cdaa5bdebadd5ce88ae3ee468c59baa08353c6
Reviewed-on: https://skia-review.googlesource.com/85046
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2017-12-14 18:52:49 +00:00
Mike Reed
af978a3428 pre-api change, preparing for expanding metadata
Bug: skia:
Change-Id: I367c728172f24166fb7f06a6e22fe37adb8adc4f
Reviewed-on: https://skia-review.googlesource.com/84880
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-14 15:37:23 +00:00
Mike Klein
4b6bde71ec add back purgeResourcesNotUsedInMs() temporarily
I think this will let Android roll.

Change-Id: If6b602d66bcecd711f4340a620d78cdf27ee825f
Reviewed-on: https://skia-review.googlesource.com/84960
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-12-14 13:02:09 +00:00
Robert Phillips
b67821da87 Add GrBackendTexture & GrBackendRenderTarget access methods to GrTexture and GrRenderTarget
Change-Id: I627fcc2cab1d04169f49e33a6c17e161e9a9772a
Reviewed-on: https://skia-review.googlesource.com/84621
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-12-13 21:34:20 +00:00
Mike Reed
b5213b88e8 document default serialization behavior (briefly)
Bug: skia:
Change-Id: Ic3cb3d6a211c7da173a3d637403f7e1c93902f2c
Reviewed-on: https://skia-review.googlesource.com/84740
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-13 19:42:10 +00:00
Robert Phillips
e42edcc8ef Add stubbed out GrContext
This CL mainly just:
   stores the GrContextOptions in GrContextThreadSafeProxy (so they can be passed on to a stubbed out GrContext)
   adds a method to create a stubbed out GrContext that has a GrStubGpu
      - the stubbed out GrContext isn't quite ready for prime time yet

Change-Id: I31be6763640e406c5963e6f0714489ac358339e4
Reviewed-on: https://skia-review.googlesource.com/79601
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-12-13 18:24:30 +00:00
Mike Reed
45ab630045 Revert "Revert "impl SkSerial picture procs""
This reverts commit 2a3009931d.

Implement SkSerialProcs for pictures

Bug: skia:
Change-Id: Icde2d912941a19999e204ac5213f519ed5387e12
Reviewed-on: https://skia-review.googlesource.com/84480
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-13 17:02:10 +00:00
Chris Dalton
dde37e5f66 Re-enable CCPR now that clipping is fixed
Bug: skia:7190
Change-Id: I6a0efb656ebcf7920782e37d93b26438f572251f
Reviewed-on: https://skia-review.googlesource.com/84180
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-12-13 16:45:10 +00:00
Robert Phillips
c25db63753 Update SkImage::MakeFromYUVTexturesCopy to GrBackendTexture
Change-Id: I7ba030c5d7856309709e892a2b1b625cf74c70b8
Reviewed-on: https://skia-review.googlesource.com/82823
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-12-13 15:20:12 +00:00
Mike Reed
2a3009931d Revert "impl SkSerial picture procs"
This reverts commit c822672854.

Reason for revert: broke old skps

Original change's description:
> impl SkSerial picture procs
> 
> The picture serialization code is a bit of a mess, with duplicated functions for streams and buffers.
> Could not see how to fix that and land this at the same time, but I will try to circle back and
> simplify if possible afterwards.
> 
> Bug: skia:
> Change-Id: I9053fdc476c60f483df013d021e248258181c199
> Reviewed-on: https://skia-review.googlesource.com/83943
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>

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

Change-Id: I68ae019a286691b65cc373cb29c941d6620fd34a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/84460
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-13 15:16:53 +00:00
Jim Van Verth
76d917cef1 Ensure we flush TextBlobCache message queue.
If we create and delete TextBlobs without actually renderering them,
their deletion messages can back up in the message queue. This adds
a routine to GrContext to ensure these messages get flushed.

Bug: 703297
Change-Id: Icc222373ac2a954dc3b77190cad79070ea562ba2
Reviewed-on: https://skia-review.googlesource.com/82686
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-12-13 14:54:42 +00:00
Mike Reed
c822672854 impl SkSerial picture procs
The picture serialization code is a bit of a mess, with duplicated functions for streams and buffers.
Could not see how to fix that and land this at the same time, but I will try to circle back and
simplify if possible afterwards.

Bug: skia:
Change-Id: I9053fdc476c60f483df013d021e248258181c199
Reviewed-on: https://skia-review.googlesource.com/83943
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-13 13:41:32 +00:00
Brian Osman
36703d9d36 Push much of the SkColorSpace_Base interface up to SkColorSpace
Some pieces still remain, but the next step looks less mechanical,
so I wanted to land this piece independently.

Bug: skia:
Change-Id: Ie63afcfa08af2f6e4996911fa2225c43441dbfb2
Reviewed-on: https://skia-review.googlesource.com/84120
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-12-12 19:34:29 +00:00
Chris Dalton
344e9037e1 Prefer fullscreen clears on Qualcomm/GL
Adds Qualcomm to the set of GL devices on which we prefer fullscreen
clears.

Renames fullscreenClearIsFree in GrCaps to preferFullscreenClears.

Replaces 'bool canIgnoreClip' on GrRenderTargetContext::clear with an
enum.

Bug: skia:
Change-Id: I5b30298c4d0b092c398b9fea6060f3e2bea91e46
Reviewed-on: https://skia-review.googlesource.com/83060
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-12-12 15:21:09 +00:00
Brian Salomon
94f509b504 Rename GrGLAssembleFooInterface to GrGLMakeAssembledFooInterface.
Add GrGLAssembleInterface with legacy bare pointer return.

This allows existing clients of GrGLAssembleInterface to roll Skia without
code changes.

Change-Id: I0764a9f4583e554fff5574889adcc6fe004db159
Reviewed-on: https://skia-review.googlesource.com/83564
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-12-11 22:03:38 +00:00
Mike Reed
58a3fcd4b3 add virtual to confirm flattenable type
meant to replace https://skia-review.googlesource.com/c/skia/+/83381

Bug:793639
Change-Id: I972dc80725bf5ce5be24769aafa23269735e089c
Reviewed-on: https://skia-review.googlesource.com/83444
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-12-11 18:50:00 +00:00
Stan Iliev
ca8c0953e8 Implement a fast path for solid color lattice rectangle
Add a flag that hints, which lattice rectangles are solid colors.
Draw solid rectangles and 1x1 rectangles with drawRect.

Test: Measured performance of a ninepatch drawn by HWUI
Bug: b/69796044
Change-Id: Ib3b00ca608da42fa9f2d2038cc126a978421ec7c
Reviewed-on: https://skia-review.googlesource.com/79821
Commit-Queue: Stan Iliev <stani@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2017-12-11 18:26:18 +00:00
Brian Salomon
3d6801eeee Add GrGLMakeNativeInterface factory that returns sk_sp<const GrGLInterface>.
Removes the concept of a configurable "default" interface and makes the default
always be the "native" interface.

Also removes unused functions: GrGLInterfaceAddTestDebugMarker and
GrGLInterface::NewClone.

Keeps around legacy GrGLCreateNativeInterface() until clients can be weened.

Change-Id: I4a3bdafa8cf8c68ed13318393abd55686b045ccb
Reviewed-on: https://skia-review.googlesource.com/83000
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-12-11 17:54:38 +00:00
Mike Reed
25eef6b342 centralize encoding to SkData
Bug: skia:
Change-Id: If3a9a6de54cf76d03e4d159b54b07a4ea6d5cda9
Reviewed-on: https://skia-review.googlesource.com/83020
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-09 01:36:48 +00:00
Hans Wennborg
42b6cffaad Fix tautological compare in GrSurfaceProxy.cpp
-1 is not a valid value for the GrSurfaceOrigin enum, and certain
versions of Clang warn that the comparison is effectively a no-op:

  ../../third_party/skia/src/gpu/GrSurfaceProxy.cpp:547:38: warning: comparison
  of constant -1 with expression of type 'GrSurfaceOrigin' is always true
  [-Wtautological-constant-out-of-range-compare]
      SkASSERT(kGrUnknownSurfaceOrigin != fProxy->origin());
	       ~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~

Instead of trying to force -1 in there, drop the assert and initialize with
top-left as origin.

Bug: chromium:793189
Change-Id: I4cb6720d567f6c5650a19df33d3c77f2d738a516
Reviewed-on: https://skia-review.googlesource.com/82961
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-12-09 01:31:48 +00:00
Mike Reed
8e74cbcd65 Revert "Revert "use serialprocs for typefaces""
This reverts commit 1a104bce20.

Change (from first version) is
- only signal error in readbuffer for corrupt stream, not default fonts
- change test to ensure a non-null typeface (i.e. MakeDefault())

Bug: skia:
Change-Id: I325445b56b0a402e1b89a2439df06e92314c793f
Reviewed-on: https://skia-review.googlesource.com/82687
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-08 18:50:41 +00:00
Brian Salomon
eace8cd22a Use sk_sp to own GrCaps in GrContext.
Change-Id: I46cd37132ecdf0f93be4509c6a06fb74cb185076
Reviewed-on: https://skia-review.googlesource.com/82625
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-12-08 18:42:52 +00:00
Mike Reed
64f73764b7 return data instead of bool
Bug: skia:
Change-Id: Id7c3044a2fce087703544c624c75a7756b9c62b4
Reviewed-on: https://skia-review.googlesource.com/82602
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-08 15:58:00 +00:00
Brian Salomon
f06c358267 Remove instanced rendering
Change-Id: I4219b1d23a647b849ee41fe71b53e1c45edfc3f4
Reviewed-on: https://skia-review.googlesource.com/82241
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-12-08 13:41:10 +00:00
Mike Reed
1a104bce20 Revert "use serialprocs for typefaces"
This reverts commit b681972e79.

Reason for revert: need to handle null typeface in new procs

Original change's description:
> use serialprocs for typefaces
> 
> Bug: skia:
> Change-Id: Ibf59a0fdcf68e8555bd4241e9473e733f6a30993
> Reviewed-on: https://skia-review.googlesource.com/81840
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>

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

Change-Id: Id69500fbc291ecee753e7ee6b80abc2a7cd60d18
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/82341
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-07 21:30:31 +00:00
Brian Salomon
990014d082 Temporarily readd old signature of GrContext::MakeGL
Change-Id: I9c785dd2fd14e422b7e84067053d0565a4d782b6
Reviewed-on: https://skia-review.googlesource.com/82340
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-12-07 21:29:03 +00:00
Greg Daniel
7af060a8bc Add gray_8_as_lum and _as_red private grpixelconfigs
Bug: skia:
Change-Id: I70cbd0bc9f7a7a16fb9f0688d272d7afa607700a
Reviewed-on: https://skia-review.googlesource.com/80622
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-12-07 20:52:40 +00:00
Mike Reed
b681972e79 use serialprocs for typefaces
Bug: skia:
Change-Id: Ibf59a0fdcf68e8555bd4241e9473e733f6a30993
Reviewed-on: https://skia-review.googlesource.com/81840
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-07 19:29:31 +00:00
Brian Salomon
04460ccee5 Make GrGLSLPrimitiveProcessor::emitTransforms take local coords as GrShaderVar.
Also remove unused position variable parameter.

Change-Id: I37f98a03ac1ca750810de13b08e3ffa11e41828c
Reviewed-on: https://skia-review.googlesource.com/81320
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-12-07 19:20:19 +00:00
Greg Daniel
afb7ec7a40 Revert "Revert "Add define to use customize vulkan header.""
This reverts commit b351817588.

Reason for revert: Relanding with android fixes

Original change's description:
> Revert "Add define to use customize vulkan header."
>
> This reverts commit a492eb0e1f.
>
> Reason for revert: Breaking Android roll (b/c builds tools?)
>
> Original change's description:
> > Add define to use customize vulkan header.
> >
> > Bug: skia:
> > Change-Id: Ia87c81a54603a02b2f8f51a735bf173a49afe6c7
> > Reviewed-on: https://skia-review.googlesource.com/81121
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
>
> TBR=egdaniel@google.com,bsalomon@google.com
>
> Change-Id: I80a685bf88af909865f274ffc61686be57e8c313
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/81740
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Change-Id: Ia701e884bfa3799dc73002f892feb2ecafe9da12
Reviewed-on: https://skia-review.googlesource.com/81742
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-12-07 18:29:39 +00:00
Brian Salomon
384fab467e sk_spification of GrGpu creation.
Make GrContext::MakeGL take interface as sk_sp.

Make GrContext::MakeVulkan take GrVkBackendContext as sk_sp.

Change-Id: I13c22a57bd281c51738f503d9ed3418d35a466df
Reviewed-on: https://skia-review.googlesource.com/81842
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-12-07 17:56:59 +00:00
Brian Salomon
b351817588 Revert "Add define to use customize vulkan header."
This reverts commit a492eb0e1f.

Reason for revert: Breaking Android roll (b/c builds tools?)

Original change's description:
> Add define to use customize vulkan header.
> 
> Bug: skia:
> Change-Id: Ia87c81a54603a02b2f8f51a735bf173a49afe6c7
> Reviewed-on: https://skia-review.googlesource.com/81121
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

Change-Id: I80a685bf88af909865f274ffc61686be57e8c313
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/81740
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-12-07 13:19:51 +00:00
Brian Salomon
4f5e1d4ff3 Remove SkImage deferred texture image data APIs.
These APIs existed for Chrome. Chrome is no longer using them.

Change-Id: I15a5e2f88c7e8d1356188748fc68d4658f6f1849
Reviewed-on: https://skia-review.googlesource.com/81021
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-12-07 13:13:20 +00:00
Mike Reed
fadbfcd4ab upgrade SkReadBuffer to always validate
Bug: skia:
Change-Id: I054560b66c6cde346d939015326d8547879d2c4b
Reviewed-on: https://skia-review.googlesource.com/81160
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-06 21:33:00 +00:00
Greg Daniel
a492eb0e1f Add define to use customize vulkan header.
Bug: skia:
Change-Id: Ia87c81a54603a02b2f8f51a735bf173a49afe6c7
Reviewed-on: https://skia-review.googlesource.com/81121
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-12-06 21:29:49 +00:00
Mike Reed
60691a5127 add serial procs to pictures
Bug: skia:7380
Change-Id: Ic1b7e437316c7913711cf5cb119e3fe904cd2c05
Reviewed-on: https://skia-review.googlesource.com/76980
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-12-05 20:33:18 +00:00
Leon Scroggins III
c8037dc5ed Reland "Hide SkEncodedInfo"
This partially reverts commit
1793e7bb46.

Hide SkEncodedInfo

Bug: skia:7353
Bug: skia:6839

This contains information that is not necessary for clients to know. The
Color enum tells the number of components in the input, but this is only
interesting internally (to the SkSwizzler).

Similarly, the Alpha enum differs from SkAlphaType in that it has
kBinary instead of kPremul. This is useful information only internally
for determining whether the SkColorSpaceXform needs to premultiply.

The bitsPerComponent is potentially useful for a client; Android (in
SkAndroidCodec) uses it to determine the SkColorType. Rather than
exposing bitsPerComponent, make SkAndroidCodec a friend so it can
access the SkEncodedInfo. A future change will change SkCodec to
recommend F16 for bitsPerComponent > 8, but that will be more involved;
it was the reason for the revert of this CL.

Switch conversionSupported to use an SkColorType, which is enough info.

Replace the SkEncodedInfo::Alpha field on SkCodec::FrameInfo with an
SkAlphaType.

SkCodec still needs an SkEncodedInfo, so move its header (which is
already not SK_API) to include/private.

TBR=mtklein@chromium.org,reed@google.com
Change-Id: I928b1f55317602cb37d29da63b53026c8d139cee
Reviewed-on: https://skia-review.googlesource.com/80860
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-12-05 19:28:08 +00:00
Chris Dalton
a32a3c32c3 Add analytic clip FPs that read from the CCPR atlas
Bug: skia:7190
Change-Id: Ie31d368f52910e6917efdeb1b024370b06fc11ee
Reviewed-on: https://skia-review.googlesource.com/77160
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-12-05 18:06:18 +00:00
Leon Scroggins
1793e7bb46 Revert "Hide SkEncodedInfo"
This reverts commit c6f7a4ffa9.

Reason for revert: Causing differences in Gold, stemming from the fact that this changes the recommended SkImageInfo for 16 bits-per-component PNG from N32 to F16.
- an F16 bitmap already png-encodes to a 16 bits-per-component PNG, but it does not encode a linear colorspace (possibly a bug?). when we decode this PNG using getInfo(), it fails because it has an F16 color type and non-linear colorspace. (In the encode-srgb-png gm, this results in blank results for F16.) We could correct this on the encoder side, but it seems possible that a 16 bits-per-component PNG could be encoded with a different color space. In that case, we'd want SkCodec to recommend F16/SRGBLinear, but I think we'd want the SkCodec to store the encoded SkColorSpace so that we can Xform between the two. Currently SkCodec only stores one color space, so that will require a refactor.
- When decoding 16-bits-per-component PNGs, we are now decoding them to F16. This shows differences in Gold. The srgb/gpu results now look more like F16. I think this is fine.

Original change's description:
> Hide SkEncodedInfo
> 
> Bug: skia:7353
> Bug: skia:6839
> 
> This contains information that is not necessary for clients to know. The
> Color enum tells the number of components in the input, but this is only
> interesting internally (to the SkSwizzler).
> 
> Similarly, the Alpha enum differs from SkAlphaType in that it has
> kBinary instead of kPremul. This is useful information only internally
> for determining whether the SkColorSpaceXform needs to premultiply.
> 
> The bitsPerComponent is potentially useful for a client; Android (in
> SkAndroidCodec) uses it to determine the SkColorType. Rather than
> exposing bitsPerComponent, use it to make the same decision that Android
> would have made - 16 bits per component means to set the info to F16. Add
> a test that computeOutputColorType behaves as expected.
> 
> Switch conversionSupported to use an SkColorType, which is enough info.
> 
> Replace the SkEncodedInfo::Alpha field on SkCodec::FrameInfo with an
> SkAlphaType.
> 
> SkCodec still needs an SkEncodedInfo, so move its header (which is
> already not SK_API) to include/private.
> 
> Change-Id: Ie2cf11339bf999ebfd4390c0f448f7edd6feabda
> Reviewed-on: https://skia-review.googlesource.com/79260
> Reviewed-by: Mike Reed <reed@google.com>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Leon Scroggins <scroggo@google.com>

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

Change-Id: I0c5dd1461e1b70d1e55349a8e7ee6b029c3f556e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7353, skia:6839
Reviewed-on: https://skia-review.googlesource.com/80660
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-12-05 15:38:22 +00:00
Leon Scroggins III
c6f7a4ffa9 Hide SkEncodedInfo
Bug: skia:7353
Bug: skia:6839

This contains information that is not necessary for clients to know. The
Color enum tells the number of components in the input, but this is only
interesting internally (to the SkSwizzler).

Similarly, the Alpha enum differs from SkAlphaType in that it has
kBinary instead of kPremul. This is useful information only internally
for determining whether the SkColorSpaceXform needs to premultiply.

The bitsPerComponent is potentially useful for a client; Android (in
SkAndroidCodec) uses it to determine the SkColorType. Rather than
exposing bitsPerComponent, use it to make the same decision that Android
would have made - 16 bits per component means to set the info to F16. Add
a test that computeOutputColorType behaves as expected.

Switch conversionSupported to use an SkColorType, which is enough info.

Replace the SkEncodedInfo::Alpha field on SkCodec::FrameInfo with an
SkAlphaType.

SkCodec still needs an SkEncodedInfo, so move its header (which is
already not SK_API) to include/private.

Change-Id: Ie2cf11339bf999ebfd4390c0f448f7edd6feabda
Reviewed-on: https://skia-review.googlesource.com/79260
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-12-05 00:52:42 +00:00
Mike Reed
f7ee95c3d0 helper api to force a raster image
Bug: skia:
Change-Id: I53f3d426e97f446b17dc965fa8dd6d6aae441ac9
Reviewed-on: https://skia-review.googlesource.com/79901
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-04 20:01:09 +00:00
Chris Dalton
1ef80942b3 turn on extended Clang warnings on Windows too
Plus some small rearrangements of the various warning lists.

Change-Id: Ied58f940341d69ddab971a529fd01b1e96b65641
Reviewed-on: https://skia-review.googlesource.com/67720
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-12-04 19:29:51 +00:00
Robert Phillips
8d1e67ed6b Add resource cache limits to SkSurfaceCharacterization
Change-Id: I4c3b2f1c6ecc39b2364cefae07d5dee5e3d20d60
Reviewed-on: https://skia-review.googlesource.com/79600
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-12-04 18:54:09 +00:00
Robert Phillips
7ffbcf909d Add unit test for SkDeferredDisplayLists (take 2)
Change-Id: I76a4c77d5b9418cb7fe677bd55ba32a2e336924d
Reviewed-on: https://skia-review.googlesource.com/79820
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-12-04 18:37:29 +00:00
Greg Daniel
e7d8da4b20 Add support for internal gl format in GrGLTextureInfo
This gives clients the ability to wrap GL textures with just the GL Format.
This enables us to distinquish between wrapping in Alpha8 texture that is
implented with Alpha or Red format

Bug: skia:
Change-Id: Iacbea60a149c436c270b7ff9ce5d019947678793
Reviewed-on: https://skia-review.googlesource.com/72600
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-12-04 16:43:39 +00:00
Robert Phillips
8172c0a24a Revert "Add unit test for SkDeferredDisplayLists"
This reverts commit 8458a2807b.

Reason for revert: ??
Original change's description:
> Add unit test for SkDeferredDisplayLists
> 
> Change-Id: I015094145cb0af6cfe368c570a5d5280c11c8f28
> Reviewed-on: https://skia-review.googlesource.com/78660
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

Change-Id: Iec3abb18d3ed41fcfbec72bc2de14603f659f8ce
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/79720
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-12-04 14:38:15 +00:00
Robert Phillips
8458a2807b Add unit test for SkDeferredDisplayLists
Change-Id: I015094145cb0af6cfe368c570a5d5280c11c8f28
Reviewed-on: https://skia-review.googlesource.com/78660
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-12-04 14:00:14 +00:00
Greg Daniel
10ed243e2e Add cap on intel to avoid calling abs and floor on the same line in a
shader.

This fixes a bug on some intel devices where we are failing
in the ProcessorOptimizationTest.

I've tried other "no op" type things between the floor call and abs which
also fixed the issue, as well as adding explicit checks to see if we are
less than -1 or greater than 1 where the clamp is. Thus the clamp itself
should be a no op and shouldn't secretly be fixing the problem outside
of forcing the floor and abs lines to be separate.

Bug: skia:
Change-Id: I85bf82e0e02607b78470b7a5f8f918e9f53f0154
Reviewed-on: https://skia-review.googlesource.com/76820
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-12-02 00:00:59 +00:00
Brian Osman
8ceee43de4 Remove more views code, just to simplify things
Bug: skia:
Change-Id: Ie31a3c764e4f88f2b08f4198bd253841a2d8c264
Reviewed-on: https://skia-review.googlesource.com/79100
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-12-01 17:12:49 +00:00
Brian Salomon
762d5e7e1c Revert "Revert "Use a dst size threshold for multitexturing images.""
This reverts commit be85ef2511.

Change-Id: Icc22eb5841fabc53232b360efaac2d6ebf72e358
Reviewed-on: https://skia-review.googlesource.com/79081
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-12-01 16:23:59 +00:00
Mike Reed
efe7c49201 remove read/write rawpixels
Bug: skia:
Change-Id: I000b70414119355fef0d45de4ae9ef996b8a5568
Reviewed-on: https://skia-review.googlesource.com/77903
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-11-30 21:43:08 +00:00
Brian Salomon
be85ef2511 Revert "Use a dst size threshold for multitexturing images."
This reverts commit edfa0d2f62.

Reason for revert: ubsan bug

Original change's description:
> Use a dst size threshold for multitexturing images.
> 
> TODO: Set thresholds based on GPU in use.
> 
> Change-Id: I0aeac596d11ab63922f2df0d76c668b4f8be5353
> Reviewed-on: https://skia-review.googlesource.com/77900
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Change-Id: Iea56ce73cf8f7bca265fe58907a72ecf96497d22
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/78542
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-11-30 19:10:43 +00:00
Robert Phillips
61e51012ee Flesh out SkSurfaceCharacterization
This should be it for now except for maybe a GrMipMapped field.

Change-Id: I8f20a1048eaa8cd2b5eab5f42ca58c61649f72e7
Reviewed-on: https://skia-review.googlesource.com/78440
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-11-30 17:10:38 +00:00
Chris Dalton
706a6ff60c Add "lazy" texture proxies
Adds ultra-deferred proxies that are instantiated by a user-supplied
callback during flush.

Bug: skia:7190
Change-Id: I75a7ac6dba953c3b0a99febc203a7f4d2f3789fc
Reviewed-on: https://skia-review.googlesource.com/76461
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-11-30 15:37:12 +00:00
Brian Salomon
edfa0d2f62 Use a dst size threshold for multitexturing images.
TODO: Set thresholds based on GPU in use.

Change-Id: I0aeac596d11ab63922f2df0d76c668b4f8be5353
Reviewed-on: https://skia-review.googlesource.com/77900
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-11-30 14:34:42 +00:00
Heather Miller
7c945ca656 Update Skia milestone to 65
NOTRY=TRUE
TBR=reed

Bug: skia:
Change-Id: I3dfe04202f48068bd04e7d64fa38913906af02ce
Reviewed-on: https://skia-review.googlesource.com/78201
Reviewed-by: Heather Miller <hcm@google.com>
Commit-Queue: Heather Miller <hcm@google.com>
2017-11-30 14:24:32 +00:00
Robert Phillips
8def8bffe9 Add a GrContextThreadSafeProxy to SkSurfaceCharacterization
Ganesh will require access to the GrCaps to make rendering decisions.

Change-Id: I6dee42a3f0dc638f052706b8d1ea6e02b589e062
Reviewed-on: https://skia-review.googlesource.com/77681
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-11-30 14:16:32 +00:00
Mike Klein
83c8dd9b1a devirtualize SkCanvas getClipBounds methods
We no longer have any subclasses overriding the virtual hooks,
and we've seen subtle bugs come up back when they did.

In all modes, SkCanvas can answer these queries itself.

BUG=chromium:781238

Change-Id: I37c7511c7bd00c638faacbe4bee89f785691453f
Reviewed-on: https://skia-review.googlesource.com/77202
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-11-29 22:43:41 +00:00
Chris Dalton
c3fd600c40 Revert "Make sure to visit clips and dst proxies during gather"
This reverts commit c666502bc6.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Make sure to visit clips and dst proxies during gather
> 
> Bug: skia:7190
> Change-Id: I6ba5bad6e155e9092dff9c2ad3241f603c333b4d
> Reviewed-on: https://skia-review.googlesource.com/76460
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

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

Change-Id: I4839594bb97472f5ac2057600a0889c8a9dff5f9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7190
Reviewed-on: https://skia-review.googlesource.com/77781
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-11-29 20:54:06 +00:00
Brian Salomon
7072e226ab Ignore deserialized path convexity and first direction.
Change-Id: Ib7bfff6225774b83d9b6e9c5baae254aab17353b
Reviewed-on: https://skia-review.googlesource.com/77680
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-11-29 20:38:56 +00:00
Chris Dalton
c666502bc6 Make sure to visit clips and dst proxies during gather
Bug: skia:7190
Change-Id: I6ba5bad6e155e9092dff9c2ad3241f603c333b4d
Reviewed-on: https://skia-review.googlesource.com/76460
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-11-29 19:02:45 +00:00
Brian Osman
ede860e91c Delete even more unused views code
Bug: skia:
Change-Id: I41480aa89dfcd8cb7e016e477cbabe354f35ce8a
Reviewed-on: https://skia-review.googlesource.com/75480
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-11-29 18:12:35 +00:00
Ben Wagner
e819e5f81e Update SkTLazy for move only types.
Change-Id: Id812d4f6ac47ae41e5a938310aa8f30eaf33a42d
Reviewed-on: https://skia-review.googlesource.com/76901
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-11-28 22:13:47 +00:00
Mike Reed
d395596165 remove writeBitmap from SkWriteBuffer -- unused
Bug: skia:
Change-Id: I8809e7e138d64cc30389e8efc76265011b287611
Reviewed-on: https://skia-review.googlesource.com/77060
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-11-28 20:12:08 +00:00
Chris Dalton
3b51df1211 Cleanup yes/no enums in Ganesh
Yes/no enums should have a base type of bool, and kYes should always
be true. Also, there is no need for a "GrEnumToBool()" function, as we
can just use the enum itself directly: e.g. "GrAA(bool)".

Bug: skia:
Change-Id: I7bb3c2983f717f3467fca4ce6b32920d71026894
Reviewed-on: https://skia-review.googlesource.com/74860
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-11-27 22:40:27 +00:00
Mike Reed
56536c42f5 saturate when converting float to fixed
Bug:783205
Change-Id: I30997e413f03f6ce2f8a8998efd78e350bdb43e3
Reviewed-on: https://skia-review.googlesource.com/75982
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-11-27 15:51:26 +00:00
Brian Osman
4f99e58252 Remove a huge pile of views code
All of this is dead when not using the old SkWindow framework.

TBR=reed@google.com

Bug: skia:
Change-Id: I0f6ab18987a98469bfd367d5bc10967300dfd3ca
Reviewed-on: https://skia-review.googlesource.com/75384
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-11-22 18:59:44 +00:00
Florin Malita
d923a71a11 Use SkSafeMath for text blob storage calculations
Change-Id: I028895dee81d99b1fa2a9acfa3db3f4bcb0f8f64
Reviewed-on: https://skia-review.googlesource.com/73823
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-11-22 18:54:14 +00:00
Jim Van Verth
53d863c18c Enable tonal color for shadows by default.
This change swaps the sense of the tonal color shadow flag, so
tonal color will always be on unless explicitly disabled.

Change-Id: I56ce4228022cf59b570cd7461327628cf7fe7173
Reviewed-on: https://skia-review.googlesource.com/73900
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2017-11-20 19:55:38 +00:00
Brian Salomon
a0ba714ad5 Require glyph positions in SkAtlasTextTarget::drawText
Change-Id: Idf0977befc8ed4fd9eb3b733db5e945457b2164c
Reviewed-on: https://skia-review.googlesource.com/73701
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-11-20 19:43:18 +00:00
Brian Salomon
0c1c2b39dd Make SkAtlasTextTarget use glyph IDs
Bug: skia:
Change-Id: Idefd69f02f62fea22c41a3476676773221c3ae81
Reviewed-on: https://skia-review.googlesource.com/73700
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-11-20 18:33:38 +00:00
Brian Salomon
cbcb0a12ad Revert "Revert "Add Atlas Text interface for rendering SDF glyphs.""
This reverts commit 9c2202ffc2.

Bug: skia:
Change-Id: I482ddf74f8e40d3d0908c840ba5c6ff981ccefbd
Reviewed-on: https://skia-review.googlesource.com/73345
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-11-19 18:55:18 +00:00
Greg Daniel
ef59d87ae8 Revert "Revert "Revert "Revert "Revert "Revert "Add private grpixelconfigs for alpha_8 and alpha_half""""""
This reverts commit b092cea5b1.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Revert "Revert "Revert "Revert "Revert "Add private grpixelconfigs for alpha_8 and alpha_half"""""
>
> This reverts commit 68ab18611a.
>
> Reason for revert: Command Buffer bot
>
> Original change's description:
> > Revert "Revert "Revert "Revert "Add private grpixelconfigs for alpha_8 and alpha_half""""
> >
> > This reverts commit 3b2f5b60ff.
> >
> > Reason for revert: more attempts at a fixed version
> >
> > Original change's description:
> > > Revert "Revert "Revert "Add private grpixelconfigs for alpha_8 and alpha_half"""
> > >
> > > This reverts commit b5fb7cf016.
> > >
> > > Reason for revert: breaking more devices
> > >
> > > Original change's description:
> > > > Revert "Revert "Add private grpixelconfigs for alpha_8 and alpha_half""
> > > >
> > > > This reverts commit 0fb6db4be6.
> > > >
> > > > Reason for revert: fixed bug
> > > >
> > > > Original change's description:
> > > > > Revert "Add private grpixelconfigs for alpha_8 and alpha_half"
> > > > >
> > > > > This reverts commit 33d17cbb00.
> > > > >
> > > > > Reason for revert: broke intel bots
> > > > >
> > > > > Original change's description:
> > > > > > Add private grpixelconfigs for alpha_8 and alpha_half
> > > > > >
> > > > > > Bug: skia:
> > > > > > Change-Id: I5191b6e045aea2a5af2b305b5972ad1e638a7ace
> > > > > > Reviewed-on: https://skia-review.googlesource.com/71763
> > > > > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > > > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > > > >
> > > > > TBR=egdaniel@google.com,bsalomon@google.com
> > > > >
> > > > > Change-Id: I6fff9241f7878f1ec7fad2663df9922c9cd8f628
> > > > > No-Presubmit: true
> > > > > No-Tree-Checks: true
> > > > > No-Try: true
> > > > > Bug: skia:
> > > > > Reviewed-on: https://skia-review.googlesource.com/72180
> > > > > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > > > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > > >
> > > > TBR=egdaniel@google.com,bsalomon@google.com
> > > >
> > > > Change-Id: Ie028961ecbf5934c53cb859e019e548935b3af79
> > > > Reviewed-on: https://skia-review.googlesource.com/72241
> > > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > > > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > >
> > > TBR=egdaniel@google.com,bsalomon@google.com
> > >
> > > Change-Id: Ieaac3eca2fc4919699c7de61a3c33348e92a7da0
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Reviewed-on: https://skia-review.googlesource.com/72660
> > > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> >
> > TBR=egdaniel@google.com,bsalomon@google.com
> >
> > Change-Id: Ifcf1b97c2a9493ce9a77a8aa0f4e5a8fb393def3
> > Reviewed-on: https://skia-review.googlesource.com/72802
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
>
> TBR=egdaniel@google.com,bsalomon@google.com
>
> Change-Id: Ie2277f59f5a1294392b5d153ce2429c20b3e4182
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/73320
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

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

Change-Id: Ibba9d2109f35ea710e313d604b3e5ee742916234
Reviewed-on: https://skia-review.googlesource.com/73360
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-11-18 13:36:27 +00:00
Greg Daniel
9c2202ffc2 Revert "Add Atlas Text interface for rendering SDF glyphs."
This reverts commit 39631f3df1.

Reason for revert: break google3 rool

Original change's description:
> Add Atlas Text interface for rendering SDF glyphs.
> 
> This new API is built upon SDF text atlas code from the GPU backend. Unlike using the GPU
> backend to draw text, this set of interfaces allows the client to render the SDF glyphs. The
> client issues text draws to potentially multiple targets and then the client flushes. The
> client then gets commands from Skia with data to put into a texture atlas and vertices to
> draw that reference the texture. The client is responsible for creating the texture, uploading
> the SDF data to the texture, and drawing the vertices provided by Skia.
> 
> Change-Id: Ie9447e19b85f0ce1c2b942e5216c787a74f335d3
> Reviewed-on: https://skia-review.googlesource.com/59360
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

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

Change-Id: I4aad0c99e645b476fd8ba25731f2a10e8802bb25
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/73420
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-11-18 13:32:08 +00:00
Brian Salomon
39631f3df1 Add Atlas Text interface for rendering SDF glyphs.
This new API is built upon SDF text atlas code from the GPU backend. Unlike using the GPU
backend to draw text, this set of interfaces allows the client to render the SDF glyphs. The
client issues text draws to potentially multiple targets and then the client flushes. The
client then gets commands from Skia with data to put into a texture atlas and vertices to
draw that reference the texture. The client is responsible for creating the texture, uploading
the SDF data to the texture, and drawing the vertices provided by Skia.

Change-Id: Ie9447e19b85f0ce1c2b942e5216c787a74f335d3
Reviewed-on: https://skia-review.googlesource.com/59360
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-11-17 20:35:06 +00:00
Brian Osman
b092cea5b1 Revert "Revert "Revert "Revert "Revert "Add private grpixelconfigs for alpha_8 and alpha_half"""""
This reverts commit 68ab18611a.

Reason for revert: Command Buffer bot

Original change's description:
> Revert "Revert "Revert "Revert "Add private grpixelconfigs for alpha_8 and alpha_half""""
> 
> This reverts commit 3b2f5b60ff.
> 
> Reason for revert: more attempts at a fixed version
> 
> Original change's description:
> > Revert "Revert "Revert "Add private grpixelconfigs for alpha_8 and alpha_half"""
> >
> > This reverts commit b5fb7cf016.
> >
> > Reason for revert: breaking more devices
> >
> > Original change's description:
> > > Revert "Revert "Add private grpixelconfigs for alpha_8 and alpha_half""
> > >
> > > This reverts commit 0fb6db4be6.
> > >
> > > Reason for revert: fixed bug
> > >
> > > Original change's description:
> > > > Revert "Add private grpixelconfigs for alpha_8 and alpha_half"
> > > >
> > > > This reverts commit 33d17cbb00.
> > > >
> > > > Reason for revert: broke intel bots
> > > >
> > > > Original change's description:
> > > > > Add private grpixelconfigs for alpha_8 and alpha_half
> > > > >
> > > > > Bug: skia:
> > > > > Change-Id: I5191b6e045aea2a5af2b305b5972ad1e638a7ace
> > > > > Reviewed-on: https://skia-review.googlesource.com/71763
> > > > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > > >
> > > > TBR=egdaniel@google.com,bsalomon@google.com
> > > >
> > > > Change-Id: I6fff9241f7878f1ec7fad2663df9922c9cd8f628
> > > > No-Presubmit: true
> > > > No-Tree-Checks: true
> > > > No-Try: true
> > > > Bug: skia:
> > > > Reviewed-on: https://skia-review.googlesource.com/72180
> > > > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > >
> > > TBR=egdaniel@google.com,bsalomon@google.com
> > >
> > > Change-Id: Ie028961ecbf5934c53cb859e019e548935b3af79
> > > Reviewed-on: https://skia-review.googlesource.com/72241
> > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > > Reviewed-by: Greg Daniel <egdaniel@google.com>
> >
> > TBR=egdaniel@google.com,bsalomon@google.com
> >
> > Change-Id: Ieaac3eca2fc4919699c7de61a3c33348e92a7da0
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Reviewed-on: https://skia-review.googlesource.com/72660
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> 
> TBR=egdaniel@google.com,bsalomon@google.com
> 
> Change-Id: Ifcf1b97c2a9493ce9a77a8aa0f4e5a8fb393def3
> Reviewed-on: https://skia-review.googlesource.com/72802
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

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

Change-Id: Ie2277f59f5a1294392b5d153ce2429c20b3e4182
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/73320
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-11-17 19:15:07 +00:00
Greg Daniel
68ab18611a Revert "Revert "Revert "Revert "Add private grpixelconfigs for alpha_8 and alpha_half""""
This reverts commit 3b2f5b60ff.

Reason for revert: more attempts at a fixed version

Original change's description:
> Revert "Revert "Revert "Add private grpixelconfigs for alpha_8 and alpha_half"""
>
> This reverts commit b5fb7cf016.
>
> Reason for revert: breaking more devices
>
> Original change's description:
> > Revert "Revert "Add private grpixelconfigs for alpha_8 and alpha_half""
> >
> > This reverts commit 0fb6db4be6.
> >
> > Reason for revert: fixed bug
> >
> > Original change's description:
> > > Revert "Add private grpixelconfigs for alpha_8 and alpha_half"
> > >
> > > This reverts commit 33d17cbb00.
> > >
> > > Reason for revert: broke intel bots
> > >
> > > Original change's description:
> > > > Add private grpixelconfigs for alpha_8 and alpha_half
> > > >
> > > > Bug: skia:
> > > > Change-Id: I5191b6e045aea2a5af2b305b5972ad1e638a7ace
> > > > Reviewed-on: https://skia-review.googlesource.com/71763
> > > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > >
> > > TBR=egdaniel@google.com,bsalomon@google.com
> > >
> > > Change-Id: I6fff9241f7878f1ec7fad2663df9922c9cd8f628
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Bug: skia:
> > > Reviewed-on: https://skia-review.googlesource.com/72180
> > > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> >
> > TBR=egdaniel@google.com,bsalomon@google.com
> >
> > Change-Id: Ie028961ecbf5934c53cb859e019e548935b3af79
> > Reviewed-on: https://skia-review.googlesource.com/72241
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
>
> TBR=egdaniel@google.com,bsalomon@google.com
>
> Change-Id: Ieaac3eca2fc4919699c7de61a3c33348e92a7da0
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/72660
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

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

Change-Id: Ifcf1b97c2a9493ce9a77a8aa0f4e5a8fb393def3
Reviewed-on: https://skia-review.googlesource.com/72802
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-11-17 18:50:46 +00:00
Robert Phillips
57e0828fad Add backend GPU objects to fiddle app
TBR=bsalomon@google.com
Change-Id: I8876a4657f837436322150925233e0f36c91e8f0
Reviewed-on: https://skia-review.googlesource.com/72641
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
2017-11-17 12:53:55 +00:00
Chris Dalton
584a79a1d5 Reland "Fold analytic clip FPs into GrReducedClip"
This is a reland of 4355b26b35
Original change's description:
> Fold analytic clip FPs into GrReducedClip
>
> Perf result on Pixel phone (sorted by impact):
>
>   GEOMEAN                              7.44 -> 6.92 ms   [ 93%]
>
>   keymobi_cnn_com.skp                  3.55 -> 3.59 ms   [101%]
>   keymobi_theverge_com.skp             4.08 -> 4.13 ms   [101%]
>   desk_skbug6850autoscroll.skp         1.21 -> 1.22 ms   [101%]
>   ...
>   top25desk_weather_com.skp            14.2 -> 11.5 ms   [ 81%]
>   keymobi_androidpolice_com_2012_.skp  3.84 -> 2.95 ms   [ 77%]
>   keymobi_shop_mobileweb_ebay_com.skp  2.94 -> 2.26 ms   [ 77%]
>   keymobi_boingboing_net.skp           3.08 -> 2.24 ms   [ 73%]
>   desk_jsfiddlebigcar.skp              1.90 -> 1.25 ms   [ 66%]
>   keymobi_m_youtube_com_watch_v_9.skp  13.5 -> 8.84 ms   [ 65%]
>   keymobi_sfgate_com_.skp              8.55 -> 5.55 ms   [ 65%]
>   keymobi_blogger.skp                  4.01 -> 2.60 ms   [ 65%]
>
> Cleaner code, improved skps, slightly better geometric mean time.
>
> Pixel C is mostly unaffected, presumably because it uses window
> rectangles.
>
> Bug: skia:7190
> Change-Id: Ia93f68b2f971ea66b3ab19dc73557ea602932a92
> Reviewed-on: https://skia-review.googlesource.com/67424
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com

Bug: skia:7190
Change-Id: I92f1ed21b6292feb3209fcbd1725487784d420da
Reviewed-on: https://skia-review.googlesource.com/72562
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-11-16 19:32:55 +00:00
Chris Dalton
47c8ed3c06 Reland "Fix precision caps and rrect/ellipse effect precisions"
This is a reland of e421800227
Original change's description:
> Fix precision caps and rrect/ellipse effect precisions
>
> Replaces all the complex precision caps with a single flag that says
> whether "float" == fp32. Updates the ellipse and rrect effects to
> use float coords, and use the scale workaround when float != fp32.
>
> Bug: skia:7190
> Change-Id: Ieccff9f38acd05e5cec78fe90d01a5da901a9307
> Reviewed-on: https://skia-review.googlesource.com/70961
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com

Bug: skia:7190
Change-Id: I7ced37a64164b83d86f6a957c35e10ce9085aba0
Reviewed-on: https://skia-review.googlesource.com/72760
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-11-16 19:29:56 +00:00
Greg Daniel
3b2f5b60ff Revert "Revert "Revert "Add private grpixelconfigs for alpha_8 and alpha_half"""
This reverts commit b5fb7cf016.

Reason for revert: breaking more devices

Original change's description:
> Revert "Revert "Add private grpixelconfigs for alpha_8 and alpha_half""
> 
> This reverts commit 0fb6db4be6.
> 
> Reason for revert: fixed bug
> 
> Original change's description:
> > Revert "Add private grpixelconfigs for alpha_8 and alpha_half"
> >
> > This reverts commit 33d17cbb00.
> >
> > Reason for revert: broke intel bots
> >
> > Original change's description:
> > > Add private grpixelconfigs for alpha_8 and alpha_half
> > >
> > > Bug: skia:
> > > Change-Id: I5191b6e045aea2a5af2b305b5972ad1e638a7ace
> > > Reviewed-on: https://skia-review.googlesource.com/71763
> > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> >
> > TBR=egdaniel@google.com,bsalomon@google.com
> >
> > Change-Id: I6fff9241f7878f1ec7fad2663df9922c9cd8f628
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: skia:
> > Reviewed-on: https://skia-review.googlesource.com/72180
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> 
> TBR=egdaniel@google.com,bsalomon@google.com
> 
> Change-Id: Ie028961ecbf5934c53cb859e019e548935b3af79
> Reviewed-on: https://skia-review.googlesource.com/72241
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

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

Change-Id: Ieaac3eca2fc4919699c7de61a3c33348e92a7da0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/72660
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-11-16 17:59:33 +00:00
Greg Daniel
b5fb7cf016 Revert "Revert "Add private grpixelconfigs for alpha_8 and alpha_half""
This reverts commit 0fb6db4be6.

Reason for revert: fixed bug

Original change's description:
> Revert "Add private grpixelconfigs for alpha_8 and alpha_half"
>
> This reverts commit 33d17cbb00.
>
> Reason for revert: broke intel bots
>
> Original change's description:
> > Add private grpixelconfigs for alpha_8 and alpha_half
> >
> > Bug: skia:
> > Change-Id: I5191b6e045aea2a5af2b305b5972ad1e638a7ace
> > Reviewed-on: https://skia-review.googlesource.com/71763
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
>
> TBR=egdaniel@google.com,bsalomon@google.com
>
> Change-Id: I6fff9241f7878f1ec7fad2663df9922c9cd8f628
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/72180
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

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

Change-Id: Ie028961ecbf5934c53cb859e019e548935b3af79
Reviewed-on: https://skia-review.googlesource.com/72241
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-11-16 17:37:12 +00:00
Mike Reed
47f6029d3d remove legacy Create from SkTextBlob
Bug: skia:
Change-Id: I8814ac9fb6bf75b5113bd78e140adadde57d3898
Reviewed-on: https://skia-review.googlesource.com/72121
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-11-16 16:30:52 +00:00
Brian Osman
24f9c19172 Revert "Fix precision caps and rrect/ellipse effect precisions"
This reverts commit e421800227.

Reason for revert: Also may be responsible for layout test failures? Playing it safe.

Original change's description:
> Fix precision caps and rrect/ellipse effect precisions
> 
> Replaces all the complex precision caps with a single flag that says
> whether "float" == fp32. Updates the ellipse and rrect effects to
> use float coords, and use the scale workaround when float != fp32.
> 
> Bug: skia:7190
> Change-Id: Ieccff9f38acd05e5cec78fe90d01a5da901a9307
> Reviewed-on: https://skia-review.googlesource.com/70961
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

Change-Id: Idca2f0390e7a0eb85010255183f2f27332b8d26d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7190
Reviewed-on: https://skia-review.googlesource.com/72540
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-11-16 14:02:23 +00:00
Brian Osman
554c1f0508 Revert "Fold analytic clip FPs into GrReducedClip"
This reverts commit 4355b26b35.

Reason for revert: Most likely CL for layout test failures on Chrome roll: https://bugs.chromium.org/p/chromium/issues/detail?id=785931

Original change's description:
> Fold analytic clip FPs into GrReducedClip
> 
> Perf result on Pixel phone (sorted by impact):
> 
>   GEOMEAN                              7.44 -> 6.92 ms   [ 93%]
> 
>   keymobi_cnn_com.skp                  3.55 -> 3.59 ms   [101%]
>   keymobi_theverge_com.skp             4.08 -> 4.13 ms   [101%]
>   desk_skbug6850autoscroll.skp         1.21 -> 1.22 ms   [101%]
>   ...
>   top25desk_weather_com.skp            14.2 -> 11.5 ms   [ 81%]
>   keymobi_androidpolice_com_2012_.skp  3.84 -> 2.95 ms   [ 77%]
>   keymobi_shop_mobileweb_ebay_com.skp  2.94 -> 2.26 ms   [ 77%]
>   keymobi_boingboing_net.skp           3.08 -> 2.24 ms   [ 73%]
>   desk_jsfiddlebigcar.skp              1.90 -> 1.25 ms   [ 66%]
>   keymobi_m_youtube_com_watch_v_9.skp  13.5 -> 8.84 ms   [ 65%]
>   keymobi_sfgate_com_.skp              8.55 -> 5.55 ms   [ 65%]
>   keymobi_blogger.skp                  4.01 -> 2.60 ms   [ 65%]
> 
> Cleaner code, improved skps, slightly better geometric mean time.
> 
> Pixel C is mostly unaffected, presumably because it uses window
> rectangles.
> 
> Bug: skia:7190
> Change-Id: Ia93f68b2f971ea66b3ab19dc73557ea602932a92
> Reviewed-on: https://skia-review.googlesource.com/67424
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

Change-Id: I86ff05196eaaeca4fb63836c9b449bbea76fe80b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7190
Reviewed-on: https://skia-review.googlesource.com/72480
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-11-16 13:57:01 +00:00
Chris Dalton
4355b26b35 Fold analytic clip FPs into GrReducedClip
Perf result on Pixel phone (sorted by impact):

  GEOMEAN                              7.44 -> 6.92 ms   [ 93%]

  keymobi_cnn_com.skp                  3.55 -> 3.59 ms   [101%]
  keymobi_theverge_com.skp             4.08 -> 4.13 ms   [101%]
  desk_skbug6850autoscroll.skp         1.21 -> 1.22 ms   [101%]
  ...
  top25desk_weather_com.skp            14.2 -> 11.5 ms   [ 81%]
  keymobi_androidpolice_com_2012_.skp  3.84 -> 2.95 ms   [ 77%]
  keymobi_shop_mobileweb_ebay_com.skp  2.94 -> 2.26 ms   [ 77%]
  keymobi_boingboing_net.skp           3.08 -> 2.24 ms   [ 73%]
  desk_jsfiddlebigcar.skp              1.90 -> 1.25 ms   [ 66%]
  keymobi_m_youtube_com_watch_v_9.skp  13.5 -> 8.84 ms   [ 65%]
  keymobi_sfgate_com_.skp              8.55 -> 5.55 ms   [ 65%]
  keymobi_blogger.skp                  4.01 -> 2.60 ms   [ 65%]

Cleaner code, improved skps, slightly better geometric mean time.

Pixel C is mostly unaffected, presumably because it uses window
rectangles.

Bug: skia:7190
Change-Id: Ia93f68b2f971ea66b3ab19dc73557ea602932a92
Reviewed-on: https://skia-review.googlesource.com/67424
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-11-16 03:57:25 +00:00
Chris Dalton
e421800227 Fix precision caps and rrect/ellipse effect precisions
Replaces all the complex precision caps with a single flag that says
whether "float" == fp32. Updates the ellipse and rrect effects to
use float coords, and use the scale workaround when float != fp32.

Bug: skia:7190
Change-Id: Ieccff9f38acd05e5cec78fe90d01a5da901a9307
Reviewed-on: https://skia-review.googlesource.com/70961
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-11-16 03:31:45 +00:00
Greg Daniel
0fb6db4be6 Revert "Add private grpixelconfigs for alpha_8 and alpha_half"
This reverts commit 33d17cbb00.

Reason for revert: broke intel bots

Original change's description:
> Add private grpixelconfigs for alpha_8 and alpha_half
> 
> Bug: skia:
> Change-Id: I5191b6e045aea2a5af2b305b5972ad1e638a7ace
> Reviewed-on: https://skia-review.googlesource.com/71763
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

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

Change-Id: I6fff9241f7878f1ec7fad2663df9922c9cd8f628
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/72180
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-11-15 20:49:03 +00:00
Brian Salomon
559f556d9d Remove support for image load/store
This isn't used and has become a maintenance burden.

Change-Id: I5f3af8f91e5c4f073fe4ea30e0a7f1f61efeea47
Reviewed-on: https://skia-review.googlesource.com/70640
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-11-15 20:06:12 +00:00
Greg Daniel
33d17cbb00 Add private grpixelconfigs for alpha_8 and alpha_half
Bug: skia:
Change-Id: I5191b6e045aea2a5af2b305b5972ad1e638a7ace
Reviewed-on: https://skia-review.googlesource.com/71763
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-11-15 20:02:43 +00:00
Greg Daniel
ab081ae7e4 Move static helper functions for GrPixelConfig to private.
Bug: skia:
Change-Id: I207cce77cbe46e0016afe932a06dba12e732c5da
Reviewed-on: https://skia-review.googlesource.com/71281
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-11-14 17:14:34 +00:00
Brian Osman
3e31e99bab Revert "Alloc glyph image correctly for SkMask::k3D_Format."
This reverts commit 1662257bda.

Reason for revert: Android still using this API

Original change's description:
> Alloc glyph image correctly for SkMask::k3D_Format.
> 
> Remove the no longer used outside Skia SK_SUPPORT_LEGACY_EMBOSSMASKFILTER
> define, and either delete the code it guards or update it to use the new
> emboss mask filter factory.
> 
> Re-enable the code to test the emboss mask filter.
> 
> Add a test to ensure that embossed text is drawn correctly, as before
> glyphs did not allocate the proper amount of memory for the k3D_Format
> which the emboss mask filter produces.
> 
> Fixes SkEmbossMask::Emboss to write the whole of the mul and add planes
> to avoid pixel differences and MemorySanitizer errors.
> 
> Update the GPU to understand the k3D_Format and use just the alpha
> plane, ignoring the mul and add plane which it currently cannot support.
> 
> Change-Id: Icac1a3f37d6e8c6be3151df570f5e14111e18585
> Reviewed-on: https://skia-review.googlesource.com/70260
> Reviewed-by: Herb Derby <herb@google.com>
> Reviewed-on: https://skia-review.googlesource.com/70962
> Commit-Queue: Ben Wagner <bungeman@google.com>

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

Change-Id: Id6625bae8d3bd70ce7aa3045348c04fdd146c637
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/71183
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-11-14 16:16:45 +00:00
Ben Wagner
1662257bda Alloc glyph image correctly for SkMask::k3D_Format.
Remove the no longer used outside Skia SK_SUPPORT_LEGACY_EMBOSSMASKFILTER
define, and either delete the code it guards or update it to use the new
emboss mask filter factory.

Re-enable the code to test the emboss mask filter.

Add a test to ensure that embossed text is drawn correctly, as before
glyphs did not allocate the proper amount of memory for the k3D_Format
which the emboss mask filter produces.

Fixes SkEmbossMask::Emboss to write the whole of the mul and add planes
to avoid pixel differences and MemorySanitizer errors.

Update the GPU to understand the k3D_Format and use just the alpha
plane, ignoring the mul and add plane which it currently cannot support.

Change-Id: Icac1a3f37d6e8c6be3151df570f5e14111e18585
Reviewed-on: https://skia-review.googlesource.com/70260
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-on: https://skia-review.googlesource.com/70962
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-11-14 14:10:22 +00:00
Ben Wagner
3ae1a307f6 Revert "Alloc glyph image correctly for SkMask::k3D_Format."
This reverts commit 6b26deb8d6.

Reason for revert: GPU bots failing

Original change's description:
> Alloc glyph image correctly for SkMask::k3D_Format.
> 
> This removes the no longer used outside Skia
> SK_SUPPORT_LEGACY_EMBOSSMASKFILTER define, and either deletes the code
> it guards or updates it to use the new emboss mask filter factory. This
> re-enables the code to test the emboss mask filter. Also added is a test
> to ensure that embossed text is drawn correctly, as before this glyphs
> did not allocate the proper amount of memory for the k3D_Format which
> this mask filter produces. This also fixes SkEmbossMask::Emboss to write
> the whole of the mul and add planes to avoid pixel differences and
> MemorySanitizer errors.
> 
> Change-Id: Ib492c72a19d6a27d140e3cd48179a3ca9ce313f5
> Reviewed-on: https://skia-review.googlesource.com/70260
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Reviewed-by: Herb Derby <herb@google.com>

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

Change-Id: I8a9db6c00e0cb84bdd4833474a9ffffa6ecc606c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/70920
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-11-13 20:43:06 +00:00
Greg Daniel
5254ccc181 Move pixel config getter to private in GrBackendSurface
We eventually want to remove pixel config from GrBackendSurface so this
helps to insure that clients don't rely on it.

Bug: skia:
Change-Id: I6b8435d12347fab62c0f9032addea1211aa703ca
Reviewed-on: https://skia-review.googlesource.com/70642
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-11-13 20:39:51 +00:00
Ben Wagner
6b26deb8d6 Alloc glyph image correctly for SkMask::k3D_Format.
This removes the no longer used outside Skia
SK_SUPPORT_LEGACY_EMBOSSMASKFILTER define, and either deletes the code
it guards or updates it to use the new emboss mask filter factory. This
re-enables the code to test the emboss mask filter. Also added is a test
to ensure that embossed text is drawn correctly, as before this glyphs
did not allocate the proper amount of memory for the k3D_Format which
this mask filter produces. This also fixes SkEmbossMask::Emboss to write
the whole of the mul and add planes to avoid pixel differences and
MemorySanitizer errors.

Change-Id: Ib492c72a19d6a27d140e3cd48179a3ca9ce313f5
Reviewed-on: https://skia-review.googlesource.com/70260
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2017-11-13 20:26:21 +00:00
Ethan Nicholas
aae47c878b sksl enum support
Bug: skia:
Change-Id: I4d505b31cf8b59de12bcdbca410aafc085977ba9
Reviewed-on: https://skia-review.googlesource.com/68621
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-11-13 14:36:40 +00:00
Robert Phillips
2d9cb57c83 Revert "Patch up ref counting of proxies"
This reverts commit 8d5ce2d9ed.

Reason for revert: ASAN failures

Original change's description:
> Patch up ref counting of proxies
> 
> Bug: skia:
> Change-Id: If746283d788368bf7aad6d285f181d8531768e61
> Reviewed-on: https://skia-review.googlesource.com/70024
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

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

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

Reason for revert: google3 updated (I think)

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

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

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

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

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

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

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

Reason for revert: broke google3

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

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

Change-Id: I3dec3d2c704e02b4db5977c27cc3e6d9f1c68ed5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/69500
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-11-09 18:44:17 +00:00