- Encoders and decoders always assume kIgnore.
- They are less opinionated about F16 and color space,
we just trust the color space that's passed in, and
put that directly in the image (no sRGB encoding).
- SkBitmap and SkPixmap read/write pixels functions were
defaulting to kResepct, those are now always kIgnore.
- Many other bits of plumbing are simplified, and I
added a default of kIgnore to SkImage::makeColorSpace,
so we can phase out that argument entirely.
- Still need to add defaults to other public APIs that
take SkTransferFunctionBehavior.
- This makes gold think that we've dramatically changed
the contents of all F16 images, but that's because
it doesn't understand the (now linear) color space
that's embedded. Once we triage them all once, they
will work fine (and they'll look perfect in the browser).
Bug: skia:
Change-Id: I62fa090f96cae1b67d181ce14bd91f34ff2ed747
Reviewed-on: https://skia-review.googlesource.com/140570
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
This adds a way for users to query the axis parameters for a typeface.
Change-Id: Idc2ac0d84bc7ae2ca484ae410cba5b01883418e5
Reviewed-on: https://skia-review.googlesource.com/137706
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Also add a GetProc function to the GrVkBackendContext which will be used
to create the GrVkInterface.
This change (and updating clients to use it), will allow us to move GrVkInterface
out of public which is needed to fix vulkan header issues.
Bug: skia:
Change-Id: Id8067943ae27cec8cad29fd31b05f0b8387412d4
Reviewed-on: https://skia-review.googlesource.com/140783
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Change-Id: I0204a9522e828c87bb7c6c20ae34ce51161442af
Reviewed-on: https://skia-review.googlesource.com/137895
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
This is a reland of f4c5bb9aba
Original change's description:
> Make GPU cache invalidation SkMessageBus messages go to one GrContext.
>
> Makes it so the template param to SkMessageBus must implement:
> bool shouldSend(uint32_t inboxID) const
>
> Updates all GPU backend message types to only go to the GrContext that
> is adding a cache entry.
>
> Bug: skia:
> Change-Id: I3e8a4eb90654b7b8ac57cac9fb508c0ef1d51058
> Reviewed-on: https://skia-review.googlesource.com/140220
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
Bug: skia:
Change-Id: I8402bfe3ed0170c99936d47050458817030b473b
Reviewed-on: https://skia-review.googlesource.com/140801
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This reverts commit f4c5bb9aba.
Reason for revert: Accidentally submitted without CQ
Original change's description:
> Make GPU cache invalidation SkMessageBus messages go to one GrContext.
>
> Makes it so the template param to SkMessageBus must implement:
> bool shouldSend(uint32_t inboxID) const
>
> Updates all GPU backend message types to only go to the GrContext that
> is adding a cache entry.
>
> Bug: skia:
> Change-Id: I3e8a4eb90654b7b8ac57cac9fb508c0ef1d51058
> Reviewed-on: https://skia-review.googlesource.com/140220
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
TBR=jvanverth@google.com,bsalomon@google.com,robertphillips@google.com
Change-Id: Iadb667d8027341703d254325320ddaa528fb33a1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/140800
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Makes it so the template param to SkMessageBus must implement:
bool shouldSend(uint32_t inboxID) const
Updates all GPU backend message types to only go to the GrContext that
is adding a cache entry.
Bug: skia:
Change-Id: I3e8a4eb90654b7b8ac57cac9fb508c0ef1d51058
Reviewed-on: https://skia-review.googlesource.com/140220
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
This reverts commit 2267a09235.
Reason for revert: It looks like Google 3 is failing to compile w/ this CL
Original change's description:
> SkDEBUGF: use __VA_ARGS__
>
> Change-Id: I42a47e821ff7a7f6cec65b38a8216cabbf0acfce
> Reviewed-on: https://skia-review.googlesource.com/139860
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Hal Canary <halcanary@google.com>
TBR=mtklein@google.com,halcanary@google.com,reed@google.com
Change-Id: I3aab490f3d2fea103fc915ca01cb0e294df86739
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/140660
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Change-Id: I42a47e821ff7a7f6cec65b38a8216cabbf0acfce
Reviewed-on: https://skia-review.googlesource.com/139860
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
The most common use-case for F16 is to draw things that are explicitly
outside of [0,1]. We can't prevent out-of-range values in general, users
could just draw out-of-range content in src mode. We've decided that
it's best to avoid surprising behavior, and trust the user in these
situations.
This effectively reverts https://skia-review.googlesource.com/c/skia/+/48183
Bug: skia:
Change-Id: I71c2dd925c567e2862d96ab70c752f19245a69c4
Reviewed-on: https://skia-review.googlesource.com/140500
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This led to removing a lot of transfer function behavior code. There is
more that could be done, and we need to add in decoding to dst color
space, but this CL is almost entirely mechanical.
Change-Id: I91b2169f95aadcfaacdd2b9821bb1a01ce53f9a6
Reviewed-on: https://skia-review.googlesource.com/140349
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: I1847a96cb8253a8bd047c06d24cba92c8dc04667
Reviewed-on: https://skia-review.googlesource.com/140440
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
SkVertices can now be "volatile", meaning they should not be cached.
SkVertices is volatile by default if the argument is not given.
Pulled from reverted CL: https://skia-review.googlesource.com/c/skia/+/138596
Docs-Preview: https://skia.org/?cl=139545
Bug: skia:
Change-Id: I92cf832efe1c0aaa8f432eedde2678582dd2454e
Reviewed-on: https://skia-review.googlesource.com/139545
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Ruiqi Mao <ruiqimao@google.com>
SkData and SkTextBlob overwrites delete operator in header file.
Which causes crash on Windows Debug DLL Builds.
Sample Solution can be found in https://github.com/DevHwan/SkiaDLLTest
Bug: skia:
Change-Id: I36bc9445f5cd17afdf852009a0695036ee18ecf0
Reviewed-on: https://skia-review.googlesource.com/139680
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Don't try to guess the pixel config to use for intermediates. Instead,
just make the intermediates in the same color type (and space) as the
final destination. This removes some no-longer-correct logic that was
using sRGB configs, resulting in linear blending and precision loss.
Change-Id: I627c47193a9f2889c3dc121170ff3e7d5d315fa0
Reviewed-on: https://skia-review.googlesource.com/139547
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
added caching of SkVertices
Docs-Preview: https://skia.org/?cl=138596
Bug: skia:
Change-Id: Ia750f55f5f6d0de250d9e9c5619f4d1ac856f9f5
Reviewed-on: https://skia-review.googlesource.com/138596
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Ruiqi Mao <ruiqimao@google.com>
changed bookmaker ParserCommon::writeBlockTrim limit to 20000
disabled broken SkPaint::containsText example
Docs-Preview: https://skia.org/?cl=138862
Bug: skia:8123
Change-Id: Ib4003bf7b9603bf652f86cd56e0975cd09bcbf71
Reviewed-on: https://skia-review.googlesource.com/138862
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: I07e0d0670dfc47602394daf68c30d561e543d826
Reviewed-on: https://skia-review.googlesource.com/138995
Commit-Queue: Hal Canary <halcanary@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This reverts commit a219419c9d.
Reason for revert: breaking things
Original change's description:
> Some scissor state cleanup.
>
> Separate flushing the enablement of scissor from the rect in GrGLGpu.
>
> Move GrPipeline::ScissorState to a global enum and use more broadly.
> Rename to GrScissorTest to avoid name conflict with existing
> GrScissorState.
>
> Change-Id: Ib32160b3300bc12de2d2e1761d152fd1bba8b683
> Reviewed-on: https://skia-review.googlesource.com/137395
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Chris Dalton <csmartdalton@google.com>
TBR=bsalomon@google.com,csmartdalton@google.com
Change-Id: If71a5c5efc86d4239b40675bad2a6cb1f77460f8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/138900
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Separate flushing the enablement of scissor from the rect in GrGLGpu.
Move GrPipeline::ScissorState to a global enum and use more broadly.
Rename to GrScissorTest to avoid name conflict with existing
GrScissorState.
Change-Id: Ib32160b3300bc12de2d2e1761d152fd1bba8b683
Reviewed-on: https://skia-review.googlesource.com/137395
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
SkCanvas::drawVertices now supports overloads that take an array of bone deformation matrices.
SkVertices::MakeCopy and SkVertices::Builder now support two additional optional attributes, boneIndices and boneWeights.
Bug: skia:
Change-Id: I30a3b11691e7cdb13924907cc1401ff86d127aea
Reviewed-on: https://skia-review.googlesource.com/137221
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Ruiqi Mao <ruiqimao@google.com>
This reverts commit 059a9ab4bc.
Reason for revert: Fix landed in Fuchsia
Original change's description:
> Revert "Make GrVkBackendContext no longer derive from SkRefCnt."
>
> This reverts commit 93ae233773.
>
> Reason for revert: <INSERT REASONING HERE>
>
> Original change's description:
> > Make GrVkBackendContext no longer derive from SkRefCnt.
> >
> > Also moves the helper Create functions to VkTestUtils since no clients
> > are using them anymore.
> >
> > Bug: skia:
> > Change-Id: I7e8e4912e7ef6fb00a7e2a00407aed5e83211799
> > Reviewed-on: https://skia-review.googlesource.com/135323
> > Reviewed-by: Jim Van Verth <jvanverth@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
>
> TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> Bug: skia:
> Change-Id: If7201917631dc22753ea3fa6e9d2984463e38e4c
> Reviewed-on: https://skia-review.googlesource.com/137903
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: skia:
Change-Id: Ia4b7c0bb2c7b5dba809d85c69f0b41b473140526
Reviewed-on: https://skia-review.googlesource.com/138181
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This reverts commit e2e52e46ca.
Reason for revert: See if this is blocking the Chrome roll
Original change's description:
> Remove drawTextBlob from device use drawGlyphRunList
>
> Convert all backends to use GlyphRunList instead of
> text blobs. If the device did not originally implement
> drawTextBlob it will be simulated by drawPosText on the
> device.
>
> Other changes:
> Change to using an origin from absolulte positioning. The GPU
> code uses origin change to update blobs under translation.
>
> Change cluster to use const uint32_t instead of just
> uint32_t.
>
> Add SkPaint to runs.
>
> The draw filter is hosted up to the canavas level and applied there.
>
> Change-Id: Ib105b6bd26b67db55f1c954e37c79fbdcaa9d4a2
> Reviewed-on: https://skia-review.googlesource.com/137224
> Reviewed-by: Herb Derby <herb@google.com>
> Reviewed-by: Khusal Sagar <khushalsagar@chromium.org>
> Reviewed-by: Hal Canary <halcanary@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: Herb Derby <herb@google.com>
TBR=jvanverth@google.com,halcanary@google.com,bungeman@google.com,herb@google.com,reed@google.com,khushalsagar@chromium.org,khushalsagar@google.com
Change-Id: I4d93a534990c89deee7d3aaa00ec40d47e0d2ece
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/138120
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Convert all backends to use GlyphRunList instead of
text blobs. If the device did not originally implement
drawTextBlob it will be simulated by drawPosText on the
device.
Other changes:
Change to using an origin from absolulte positioning. The GPU
code uses origin change to update blobs under translation.
Change cluster to use const uint32_t instead of just
uint32_t.
Add SkPaint to runs.
The draw filter is hosted up to the canavas level and applied there.
Change-Id: Ib105b6bd26b67db55f1c954e37c79fbdcaa9d4a2
Reviewed-on: https://skia-review.googlesource.com/137224
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Khusal Sagar <khushalsagar@chromium.org>
Reviewed-by: Hal Canary <halcanary@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Herb Derby <herb@google.com>
This reverts commit 93ae233773.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> Make GrVkBackendContext no longer derive from SkRefCnt.
>
> Also moves the helper Create functions to VkTestUtils since no clients
> are using them anymore.
>
> Bug: skia:
> Change-Id: I7e8e4912e7ef6fb00a7e2a00407aed5e83211799
> Reviewed-on: https://skia-review.googlesource.com/135323
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: skia:
Change-Id: If7201917631dc22753ea3fa6e9d2984463e38e4c
Reviewed-on: https://skia-review.googlesource.com/137903
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Also check in work in progress for blend modes,
round rects, and a placeholder for pictures.
One minor include change to add a parameter name
for SkBlendMode function.
TBR=reed@google.comR=caryclark@google.com
Docs-Preview: https://skia.org/?cl=134200
Bug: skia:6898
Change-Id: I5d2a9221d61edb32d9c7edbb3193401605b2b513
Reviewed-on: https://skia-review.googlesource.com/134200
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
This reverts commit 45c9dab4c3.
Reason for revert: fucshia uses GrVkBackendContext. Need to revert earlier changes
Original change's description:
> Let client pass in full extension to GrVkBackendContext.
>
> Bug: skia:
> Change-Id: I772ab4ccbca0f4f7e7d429d6c421b07d97f0606f
> Reviewed-on: https://skia-review.googlesource.com/131880
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com
Change-Id: I1a765ff406c83cb234c3614b804fbed677d5a382
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/137901
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Bug: skia:
Change-Id: I772ab4ccbca0f4f7e7d429d6c421b07d97f0606f
Reviewed-on: https://skia-review.googlesource.com/131880
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Draws basically the same as f16.
The existing load_f32, load_f32_dst, and store_f32 stages all had the
same bug that we'd never noticed because dy was always 0 until now.
Change-Id: Ibbd393fa1acc5df414be4cdef0f5a9d11dcccdb3
Reviewed-on: https://skia-review.googlesource.com/137585
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Bug: skia:8076
Move SkImageGeneratorCG and SkImageGeneratorWIC to include/ports/,
and make them SK_API.
Remove SkImageGeneratorCG::NewFromEncodedCG. No known clients are using
it, and it was a private API in src/. There is already a
MakeFromEncodedCG to replace it.
Similarly, switch WIC from New to Make.
Add a compile test for using them with
SetImageGeneratorFromEncodedDataFactory.
Change-Id: I897eb7a887b3736a6c614a68e38f38b6a1942cf1
Reviewed-on: https://skia-review.googlesource.com/137387
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Came across this unnecessary includes while experimenting with WASM
Change-Id: I68061c7bbd18ed5695b94b3b8de6dbb63407b8ee
Reviewed-on: https://skia-review.googlesource.com/137582
Reviewed-by: Mike Klein <mtklein@google.com>
Also moves the helper Create functions to VkTestUtils since no clients
are using them anymore.
Bug: skia:
Change-Id: I7e8e4912e7ef6fb00a7e2a00407aed5e83211799
Reviewed-on: https://skia-review.googlesource.com/135323
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
SkPaint::getTypeface() allows the caller to borrow a pointer to its
SkTypeface, it does not affect ownership. The existing documentation would
lead a user to beleive that getTypeface() increments the reference count,
but it does not.
TBR=reed@google.com
Change-Id: Ic1a660b026e3c4295f9f0de28abfde29c3f05524
Reviewed-on: https://skia-review.googlesource.com/137183
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
The SkFontMgr.h header has been moved to core/SkFontMgr.h and the
ports/SkFontMgr.h header is simply a forwarding header. Remove the
forwarding header now that users have been updated.
Change-Id: Icecef2ecb3ac20fc2c885429b06cdb306524303d
Reviewed-on: https://skia-review.googlesource.com/137130
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
This reverts commit 61582510ee.
Reason for revert: Chromium should now be fixed.
Original change's description:
> SkRefCnt, SkTypes: fix includes for clients
>
> Change-Id: I1cfdc03963eaab9687608974958d20411806cfeb
> Reviewed-on: https://skia-review.googlesource.com/136592
> Commit-Queue: Hal Canary <halcanary@google.com>
> Reviewed-by: Hal Canary <halcanary@google.com>
TBR=halcanary@google.com
Change-Id: I1a3588ed9e19ee5884f8a907abcfc2aa00cfe5e9
Reviewed-on: https://skia-review.googlesource.com/136700
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
temporarily copy SkBase64.h until flutter can
move to using the one in include/util
Copy TRACE_EVENT_PHASE_* into its own file
in include/util; the only part of SkTraceEventCommon.h
that flutter needs.
R=reed@google.com,chinmaygarde@google.com
Bug: skia:7741
Change-Id: I8671edbf1d6b6b868bde98aa9ad04abcb85a43a0
Reviewed-on: https://skia-review.googlesource.com/135870
Reviewed-by: Chinmay Garde <chinmaygarde@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Cary Clark <caryclark@skia.org>