Commit Graph

9123 Commits

Author SHA1 Message Date
Mike Reed
172fff869b Reland "remove SK_SUPPORT_LEGACY_CANVAS_DRAW_TEXT flag"
This reverts commit 3b415a8910.

Reason for revert: guards should be in place...

Original change's description:
> Revert "remove SK_SUPPORT_LEGACY_CANVAS_DRAW_TEXT flag"
> 
> This reverts commit 1b87c6bc19.
> 
> Reason for revert: need guards in google3 (and possibly android)
> 
> Original change's description:
> > remove SK_SUPPORT_LEGACY_CANVAS_DRAW_TEXT flag
> > 
> > Bug: skia:
> > Change-Id: I89451ee399a59907a195237adc1b5dc59691150e
> > Reviewed-on: https://skia-review.googlesource.com/c/184381
> > Reviewed-by: Mike Reed <reed@google.com>
> > Commit-Queue: Mike Reed <reed@google.com>
> > Auto-Submit: Mike Reed <reed@google.com>
> 
> TBR=reed@google.com
> 
> Change-Id: I0e404f435079cc5a679d357ff28f215fef543718
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/c/184483
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=reed@google.com

Change-Id: I3df434eb7286bb9439640644d455509e58a120ba
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/184661
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-01-17 00:37:49 +00:00
Mike Reed
f738d4211c hide SkPaint::getFlags/setFlags, use bool acessors instead
Bug: skia:
Change-Id: Ib44859bf69a9dfaae7fbbd220b41af0c198797c6
Reviewed-on: https://skia-review.googlesource.com/c/184388
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-01-16 22:45:29 +00:00
Brian Salomon
1bf0ed8584 Make GrTexture caching for SkPromiseImageTexture work when same texture
fulfills a different SkImage.

Bug: skia:8613
Change-Id: I7ee14112c69f8aaef223a37dda455259b501a2bf
Reviewed-on: https://skia-review.googlesource.com/c/184440
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-01-16 22:06:53 +00:00
Herb Derby
081e6f3754 Rename GrGlyphCache -> GrStrikeCache
Change-Id: Ie6fdcc6ce1f2265783ebb4dcd1b1ce087a296ddf
Reviewed-on: https://skia-review.googlesource.com/c/184500
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2019-01-16 20:15:04 +00:00
Mike Reed
3b415a8910 Revert "remove SK_SUPPORT_LEGACY_CANVAS_DRAW_TEXT flag"
This reverts commit 1b87c6bc19.

Reason for revert: need guards in google3 (and possibly android)

Original change's description:
> remove SK_SUPPORT_LEGACY_CANVAS_DRAW_TEXT flag
> 
> Bug: skia:
> Change-Id: I89451ee399a59907a195237adc1b5dc59691150e
> Reviewed-on: https://skia-review.googlesource.com/c/184381
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
> Auto-Submit: Mike Reed <reed@google.com>

TBR=reed@google.com

Change-Id: I0e404f435079cc5a679d357ff28f215fef543718
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/184483
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-01-16 19:20:50 +00:00
Herb Derby
5fd955e36d Rename SkGlyphCache -> SkStrike
Change-Id: I51ca9f61feb0d4f7352ed634b7070327f31ccf05
Reviewed-on: https://skia-review.googlesource.com/c/184400
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2019-01-16 18:28:28 +00:00
Michael Ludwig
c39d0c850f Implement generic draw-as-clear fallback for color and stencil
This will likely have a perf hit for GL devices that trigger the clear-as-draw fallback since
the fillrectop cannot be as optimized as the direct GLSL shader. However, since the Metal
backend now needs to perform something very similar for scissored clears, I think this
improves code maintainability and is worth it.

Bug: skia:
Change-Id: Id87513784e5892c7ff3dc988115da1d39a46d8e0
Reviewed-on: https://skia-review.googlesource.com/c/182971
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2019-01-16 17:27:44 +00:00
Hal Canary
6dfb111c02 Documentation: SkFont::textToGlyphs()
+ When encoding is SkTextEncoding::kUTF8, SkTextEncoding::kUTF16, or
  + SkTextEncoding::kUTF32; then each Unicode codepoint is mapped to a
  + single glyph.  This function uses the default character-to-glyph
  + mapping from the SkTypeface.  It does not perform typeface fallback for
  + characters not found in the SkTypeface.

Change-Id: I3e84f996cccaf6b31c551ad027a62600d2510bc0
Reviewed-on: https://skia-review.googlesource.com/c/184385
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-01-16 16:04:08 +00:00
Mike Reed
1b87c6bc19 remove SK_SUPPORT_LEGACY_CANVAS_DRAW_TEXT flag
Bug: skia:
Change-Id: I89451ee399a59907a195237adc1b5dc59691150e
Reviewed-on: https://skia-review.googlesource.com/c/184381
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-01-16 14:52:48 +00:00
Mike Reed
47b7cd9a6b remove paint::glyphsToUnichars
Bug: skia:
Change-Id: I3f97a74f6d0a9da2711a50740d83d2181858bda8
Reviewed-on: https://skia-review.googlesource.com/c/184301
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-01-16 02:56:55 +00:00
Jim Van Verth
1676cb9282 Restore ETC1 compressed texture support.
Brings back GL ETC1 support and adds Vulkan support as well.

Bug: skia:8684
Change-Id: Ie65da0a3172793081f0e4072f161bfb9b14678bc
Reviewed-on: https://skia-review.googlesource.com/c/179724
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-01-15 19:56:28 +00:00
Brian Salomon
553610d792 Change how PromiseLazyInstantiationCallback calls Done proc.
Previously we used the texture's "release proc" mechanism to call
the client's Done proc for promise texture-backed images. There was also
an attempt to call the Done proc more aggresively when the callback is
destroyed and release was already called. Otherwise, Done won't get
called until the resource cache processes the cache key invalidation
message for the texture and releases the texture.

The new approach is to have the done proc be reffed by the lazy
instantiation callback and the idle callback that is used to call the
client's release callback. This is a bit simpler and means Done gets
called ASAP.


Bug: skia:
Change-Id: Id3928bafee68ee5e047917b34e3d39ba9d8d603b
Reviewed-on: https://skia-review.googlesource.com/c/183981
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-01-15 18:13:57 +00:00
Hal Canary
d1537036a1 Documentation: be explicit about non-shaping
Change-Id: I9078889dcd5a5d343185dceda8fd0a0feb531c62
Reviewed-on: https://skia-review.googlesource.com/c/183861
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-01-15 14:53:04 +00:00
Mike Reed
e9fd7ab76e don't say experimental if its documented in bmh
Bug: skia:
Change-Id: I829e65e2548d29d069fcec6f3c17a3ea5da7294f
Reviewed-on: https://skia-review.googlesource.com/c/184023
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-01-15 03:21:40 +00:00
Mike Reed
e922a9c0f6 Reland "remove SK_SUPPORT_LEGACY_PAINT_FONT_FIELDS"
This reverts commit 3e91b12354.

Reason for revert: should be able to support older skps now

Original change's description:
> Revert "remove SK_SUPPORT_LEGACY_PAINT_FONT_FIELDS"
> 
> This reverts commit e0e41efcfb.
> 
> Reason for revert: did this break loading old skps?
> 
> Original change's description:
> > remove SK_SUPPORT_LEGACY_PAINT_FONT_FIELDS
> > 
> > Bug: skia:
> > Change-Id: I756bf2e3e37d6f2bb1d4a786ce8f41a25f83ba67
> > Reviewed-on: https://skia-review.googlesource.com/c/183320
> > Reviewed-by: Mike Reed <reed@google.com>
> > Commit-Queue: Mike Reed <reed@google.com>
> > Auto-Submit: Mike Reed <reed@google.com>
> 
> TBR=reed@google.com
> 
> Change-Id: Iefec7a1fa52fcff4f937532de41f3828cdeaf186
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/c/183802
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=reed@google.com

Change-Id: I0a8e4f8787b812ff09d76354e295e3b296fa73cf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/184021
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-01-15 02:21:06 +00:00
Hal Canary
077dd3a5d4 Documentation: SkCanvas
Change-Id: Ibbbcc37c38178bca3b6cf7bd81eb0a1a4fc2a882
Reviewed-on: https://skia-review.googlesource.com/c/181560
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-01-14 22:14:51 +00:00
Brian Osman
f48c9965ec Revert "Revert "Add SkImage::makeColorTypeAndColorSpace""
This reverts commit 9a97c96c9c.

This works like makeColorSpace, but allows changing color type as well.
Added a GM to test, although the GM demonstrates several ways this can
fail (especially when using this on lazy images).

For simple use-cases (8888 <-> F16), everything should be fine.

For the reland, add logic to the GM to guard against context abandon
failures, and to ensure that lazy images can be decoded (by calling
makeRasterImage) before trying to draw them. That prevents the DDL
recorder from seeing them.

Bug: skia:
Change-Id: Ibc7b07c3399979b1a44d85a38424e5487e606607
Reviewed-on: https://skia-review.googlesource.com/c/183800
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-01-14 18:01:15 +00:00
Mike Reed
3e91b12354 Revert "remove SK_SUPPORT_LEGACY_PAINT_FONT_FIELDS"
This reverts commit e0e41efcfb.

Reason for revert: did this break loading old skps?

Original change's description:
> remove SK_SUPPORT_LEGACY_PAINT_FONT_FIELDS
> 
> Bug: skia:
> Change-Id: I756bf2e3e37d6f2bb1d4a786ce8f41a25f83ba67
> Reviewed-on: https://skia-review.googlesource.com/c/183320
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
> Auto-Submit: Mike Reed <reed@google.com>

TBR=reed@google.com

Change-Id: Iefec7a1fa52fcff4f937532de41f3828cdeaf186
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/183802
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-01-14 17:38:27 +00:00
Brian Salomon
3f4cd774e6 Make SkPromiseImageTexture ref counted.
This makes the API easier to use in Chrome.

It is no longer required to pass the SkPromiseImageTexture to the
release proc.

Bug: skia:
Change-Id: I6636401f6a7915d3ad15e890718638bc91a58cc4
Reviewed-on: https://skia-review.googlesource.com/c/183383
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-01-14 16:19:01 +00:00
Mike Reed
e0e41efcfb remove SK_SUPPORT_LEGACY_PAINT_FONT_FIELDS
Bug: skia:
Change-Id: I756bf2e3e37d6f2bb1d4a786ce8f41a25f83ba67
Reviewed-on: https://skia-review.googlesource.com/c/183320
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-01-14 16:16:01 +00:00
Michael Ludwig
a21d196602 Move clear-as-draw caps into GrCaps
Bug: skia:
Change-Id: Ib029f337f5e61366e2550e77dc99310b44d03f84
Reviewed-on: https://skia-review.googlesource.com/c/182970
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2019-01-14 15:27:44 +00:00
Hal Canary
a6854de5d8 SkCanvas: hide drawText behind SK_SUPPORT_LEGACY_CANVAS_DRAW_TEXT
Change-Id: I8c324c4eecdf90838ace625dc16cf0f1b17e5038
Reviewed-on: https://skia-review.googlesource.com/c/182664
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-01-14 15:22:39 +00:00
Mike Reed
160422338c allow flag defines for paint
Bug: skia:
Change-Id: I2c422ac2fe86d9205189119be3f0d51df994596b
Reviewed-on: https://skia-review.googlesource.com/c/183394
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-01-12 19:58:53 +00:00
Brian Osman
9a97c96c9c Revert "Add SkImage::makeColorTypeAndColorSpace"
This reverts commit f855c3c785.

Reason for revert: DDL and Abandon failures.

Original change's description:
> Add SkImage::makeColorTypeAndColorSpace
> 
> This works like makeColorSpace, but allows changing color type as well.
> Added a GM to test, although the GM demonstrates several ways this can
> fail (especially when using this on lazy images).
> 
> For simple use-cases (8888 <-> F16), everything should be fine.
> 
> Bug: skia:8618
> Change-Id: If4c173c0dd4abaf4f8e63b7ae0ffcf8a08c7e9ef
> Reviewed-on: https://skia-review.googlesource.com/c/183382
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>

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

Change-Id: I5d7a72e2b674224351e4b0c982408f89780708f8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8618
Reviewed-on: https://skia-review.googlesource.com/c/183392
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-01-12 17:38:21 +00:00
Brian Osman
f855c3c785 Add SkImage::makeColorTypeAndColorSpace
This works like makeColorSpace, but allows changing color type as well.
Added a GM to test, although the GM demonstrates several ways this can
fail (especially when using this on lazy images).

For simple use-cases (8888 <-> F16), everything should be fine.

Bug: skia:8618
Change-Id: If4c173c0dd4abaf4f8e63b7ae0ffcf8a08c7e9ef
Reviewed-on: https://skia-review.googlesource.com/c/183382
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-01-12 14:30:05 +00:00
Leon Scroggins III
e548161aba Add SkBlurDrawLooper::Make(SkColor4f, SkColorSpace)
Bug: b/120904891

This will allow adding android.graphics.Paint#setShadowLayer(
    float radius, float dx, float dy, @ColorLong long shadowColor).

Change-Id: Ic9256b10c82b56847802f209cf82b4e5c07a9069
Reviewed-on: https://skia-review.googlesource.com/c/182762
Auto-Submit: Leon Scroggins <scroggo@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-01-12 08:46:04 +00:00
Robert Phillips
27467658dd Reduce reliance on the SkImage_Gpu's GrContext pointer
The SkImages aren't guaranteed to have a full fledged GrContext (e.g., if they are promise images created outside of a DDL recorder). This CL starts the process if lessening Skia's reliance on what ever the SkImage has cached.

Change-Id: I0181d09417e1ea2ced7706a722e2815f3ceee870
Reviewed-on: https://skia-review.googlesource.com/c/182974
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-01-11 16:07:56 +00:00
Herb Derby
811a67270d Make single ctor for SkGlyph and remove reset
* Spruce up SkTLazy

Change-Id: Ice2b66009004a8d1894edd25790eca03ee451da2
Reviewed-on: https://skia-review.googlesource.com/c/183103
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-01-10 23:18:27 +00:00
Mike Reed
e5f9cfad7b expand flag to include all text-related paint fields
Bug: skia:
Change-Id: I8453a6d607df4902cd05c5c9bc6162feda04ef9c
Reviewed-on: https://skia-review.googlesource.com/c/182969
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-01-10 20:06:07 +00:00
Derek Sollenberger
e6fb76bbd2 Add additional information (e.g. colorspace) to the GpuDrawHandler
Bug: b/115613038
Change-Id: I375fc5f1bac13557b35e39658d678c61f70024c8
Reviewed-on: https://skia-review.googlesource.com/c/182900
Commit-Queue: Derek Sollenberger <djsollen@google.com>
Auto-Submit: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-01-10 18:49:52 +00:00
Brian Salomon
cdd8a0a0e8 Revert "Revert "Reuse GrTexture instances when the same GrBackendTexture is used to""
This reverts commit 426ba463d5.

Bug: skia:8613
Change-Id: Iacaf40549369110aa95015e8d4579ec41db22d13
Reviewed-on: https://skia-review.googlesource.com/c/182963
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-01-10 17:51:21 +00:00
Brian Salomon
426ba463d5 Revert "Reuse GrTexture instances when the same GrBackendTexture is used to"
This reverts commit 559c617137.

Reason for revert: breaking things

Original change's description:
> Reuse GrTexture instances when the same GrBackendTexture is used to
> repeatedly fulfill a promise SkImage.
> 
> Bug: skia:8613
> 
> Change-Id: I35c76435d630d2daa034e0c3efb59666bfd6882a
> Reviewed-on: https://skia-review.googlesource.com/c/175820
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

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

Change-Id: I7548809945d0a875fdb9387398bbc45e733c0846
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8613
Reviewed-on: https://skia-review.googlesource.com/c/182960
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-01-10 16:33:11 +00:00
Mike Reed
24c1cf086c hide more fields
Bug: skia:
Change-Id: Ib50f4f44c5d56a7bf85269c1e1a34c5adc67bbde
Reviewed-on: https://skia-review.googlesource.com/c/182815
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-01-10 16:27:21 +00:00
Brian Salomon
559c617137 Reuse GrTexture instances when the same GrBackendTexture is used to
repeatedly fulfill a promise SkImage.

Bug: skia:8613

Change-Id: I35c76435d630d2daa034e0c3efb59666bfd6882a
Reviewed-on: https://skia-review.googlesource.com/c/175820
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-01-10 16:10:59 +00:00
Brian Osman
c6444d2f26 Enable wide color support in CCPR
Unlike other ops, always use half-float colors. The logic around the
Instance struct makes dynamically switching color size tricky.
CCPR stores color in a per-instance attribute though, so the cost of
always using FP16 is much lower.

Bug: skia:
Change-Id: I9c0c64940f74f915a18417a5830030558e065d28
Reviewed-on: https://skia-review.googlesource.com/c/182760
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-01-10 13:53:31 +00:00
Hal Canary
292ece8024 SkCanvas::drawText: remove calls
Change-Id: Id5a870d9b94ce5510fd6e0fd75f52550e598139b
Reviewed-on: https://skia-review.googlesource.com/c/182449
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-01-09 19:26:53 +00:00
Mike Klein
4284ec6ba5 add SkTHashTable::LookupOrNull()
This should help avoid confusion from T**.

Change-Id: I1851baa2a55714721fa935d234b6a4a1c6d6504f
Reviewed-on: https://skia-review.googlesource.com/c/182562
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2019-01-09 18:51:22 +00:00
Mike Reed
33535cb642 remove legacy drawstring
Bug: skia:
Change-Id: Id3491dbc6cee3e5d06981284535a04639182e9dd
Reviewed-on: https://skia-review.googlesource.com/c/182450
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-01-09 17:38:04 +00:00
Greg Daniel
a870b46c79 Add ability to write out VkPipelineCache to gpu PersistentCache.
Bug: skia:
Change-Id: Id13d680401f69a074ae0c85f9ceaf3308fccb129
Reviewed-on: https://skia-review.googlesource.com/c/181403
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2019-01-08 21:18:51 +00:00
Florin Malita
07e4adf69e Remove SkCanvas::kPreserveLCDText_SaveLayerFlag
No longer used in Chromium.

Change-Id: I974fc345c78212fa0378bb3e5a57348c32319adc
Reviewed-on: https://skia-review.googlesource.com/c/181841
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-01-08 14:21:34 +00:00
Robert Phillips
832c931d5b Revert "Make SkBitmap/SkPixmap::erase* do so in sRGB"
This reverts commit 6f44647e52.

Reason for revert: checking to see if this is blocking the Chrome roll

Original change's description:
> Make SkBitmap/SkPixmap::erase* do so in sRGB
> 
> We generally consider untagged colors to be sRGB, so this makes us more
> consistent with other parts of the API.
> 
> Add a test.
> 
> Cq-Include-Trybots: luci.chromium.try:linux-blink-rel
> Change-Id: I5468c86ad92164797a65ffd9fbe471e01a97a2ca
> Reviewed-on: https://skia-review.googlesource.com/c/179245
> Commit-Queue: Leon Scroggins <scroggo@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

TBR=djsollen@google.com,mtklein@google.com,scroggo@google.com,brianosman@google.com,reed@google.com

Change-Id: Ia592adf2c790d294da1e32c1e83f9f34e81d79cc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Cq-Include-Trybots: luci.chromium.try:linux-blink-rel
Reviewed-on: https://skia-review.googlesource.com/c/182083
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-01-08 13:04:24 +00:00
Mike Reed
146902511a no more text encoding in paint
Bug: skia:
Change-Id: If6911f8b7c258546e5c9efa3e0bd0a83f8829687
Reviewed-on: https://skia-review.googlesource.com/c/181844
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-01-08 00:46:08 +00:00
Leon Scroggins III
6f44647e52 Make SkBitmap/SkPixmap::erase* do so in sRGB
We generally consider untagged colors to be sRGB, so this makes us more
consistent with other parts of the API.

Add a test.

Cq-Include-Trybots: luci.chromium.try:linux-blink-rel
Change-Id: I5468c86ad92164797a65ffd9fbe471e01a97a2ca
Reviewed-on: https://skia-review.googlesource.com/c/179245
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-01-07 22:13:39 +00:00
Cary Clark
26d173fee7 fix bookmaker
Illustrations calling SkTextUtils::DrawString must pass font
as well as paint.

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

Docs-Preview: https://skia.org/?cl=181562
Bug: skia:
Change-Id: I907c1c69026d3dc40282545b492a790b2349a8a0
Reviewed-on: https://skia-review.googlesource.com/c/181562
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-01-07 21:06:29 +00:00
Mike Reed
cb268f6416 document drawSimpleText
Bug: skia:
Change-Id: I9c7135447b5ddcb3eb84581529fc442472e2ceda
Reviewed-on: https://skia-review.googlesource.com/c/181664
Auto-Submit: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-01-07 19:27:22 +00:00
Mike Reed
023403ba99 hide setTextEncoding
Bug: skia:
Change-Id: Ia9d3acadc1ef8a9b3c175dba501a5324179d27e9
Reviewed-on: https://skia-review.googlesource.com/c/181566
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-01-07 18:34:55 +00:00
Brian Osman
b2fdcbf303 Add SkNamedGamut::kXYZ (ie, the identity matrix)
Sometimes useful when setting up transforms. And we didn't have a simple
way to reference/create an identity skcms_Matrix3x3 yet.

Bug: skia:
Change-Id: Ic35045f38e9c9a75133bf9167f165fcc6790bd69
Reviewed-on: https://skia-review.googlesource.com/c/181662
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-01-07 17:41:23 +00:00
Mike Reed
4de2f1fead add drawString to ease the pain of converting to skfont
Bug: skia:
Change-Id: I88418f87883b66204427fbdab471e74c78835ac4
Reviewed-on: https://skia-review.googlesource.com/c/181407
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-01-05 22:04:34 +00:00
Brian Osman
82ebe04caf Reland "Add SkColorSpace factory from 3x3 row-major gamut and transfer function"
Moved named common transfer functions and gamuts to constexpr values in
SkColorSpace.h, in SkNamedTransferFn and SkNamedGamut namespaces.

Converted nearly all SkColorSpace::MakeRGB calls within Skia to use the
new factory with the named values. Multiple clients want a way to
extract named transfer function and gamut - this still doesn't provide
that, but this may be a better path forward for honestly advertising how
SkColorSpace works internally.

Originally landed as:
https://skia.googlesource.com/skia/+/a9549ab31630fc244094e6f1692371cbaf87f666

Re-landing with a new serialization format, but maintaining ability to
load old serialized color spaces, for SKP compatibility.

Bug: skia:
Change-Id: Ib84a6e1cd5d7d9816175773fdbaff2ca32658667
Reviewed-on: https://skia-review.googlesource.com/c/181176
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-01-05 20:06:51 +00:00
Mike Reed
d5cdc2cd4d paint is losing its text-related fields
Bug: skia:
Change-Id: I187c290f30259564e8ff396b54070ca305da3954
Reviewed-on: https://skia-review.googlesource.com/c/181400
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-01-04 21:54:49 +00:00