Oopenharmony_ciCVE-490254124 CVE-488596746
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
AGTM: Add metadata parsing support Add parsing for the current version of the metadata structure, based on the current draft (which is subject to change). The SMPTE ST 2094-50 draft is divided into two sections: * syntax specifies the bitstream * semantics specifies the mapping of syntax elements to metadata items The skhdr::Agtm structure stores the metadata items. Add a separate private AgtmSyntax structure to store the syntax. The parsing and serialization functions are done in two steps. * going from/to a SkStream to/from an AgtmSyntax * going from/to an AgtmSyntax to/from an skhdr::Agtm Add tests of serialize<->deserialize, but not using hardcoded data just yet (that will wait until the format is certain not to change any more). Fuzzing tests need to be added. Bug: skia:456675139 Change-Id: I594c553fc00fa077bd5d6e35efd83182a02d3023 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1100336 Reviewed-by: Christopher Cameron <ccameron@google.com> Reviewed-by: Kaylee Lubick <kjlubick@google.com> Commit-Queue: Christopher Cameron <ccameron@google.com> | 7 个月前 | |
Make SkImage and SkImageGenerator return const SkData from refEncoded This behavior was implied (a shared pointer to SkData should always be treated as read-only) and is now made explicit. This also updates several places in our decoders where we promise not to modify the SkData that is passed in (since we will likely be caching it) and ask that the client not modify it either. This is partially guarded by SK_DISABLE_LEGACY_NONCONST_ENCODED_IMAGE_DATA so we can update Chromium and potentially other places. Change-Id: Id174dff4afa148745ad32dd7d5cd848931b77f9d Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1084056 Reviewed-by: Florin Malita <fmalita@google.com> | 7 个月前 | |
Move free functions in SkCodecPriv into class namespace As I was poking around the pdf code, I noticed a strange function SkPDFBitmap::GetEncodedInfo(). This felt like something that would go in SkCodecPriv (can't be part of the public API because SkEncodedInfo is private), but that apparently didn't exist. So I made one and moved all the free functions into that. I'm surprised we didn't run into problems earlier, given the fact we have other free functions with similar or same names (e.g. get_int, used in some font code). I also renamed these to align with our more modern naming conventions. Change-Id: Ib90ceee5e92bbebf8c5ff34b3af1973d89b0eb50 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/928517 Reviewed-by: Daniel Dilan <danieldilan@google.com> Commit-Queue: Kaylee Lubick <kjlubick@google.com> Owners-Override: Kaylee Lubick <kjlubick@google.com> | 1 年前 | |
[includes] Enforce IWYU on src/images Note: I had to change an implicit destructor to an explicit one in SkJpegCodec.h. Everything else was just a mechanical application of IWYU. Downstream changes: - http://ag/19595449 - https://crrev.com/c/3822658 - http://cl/466931845 - http://cl/466932551 Canary-Chromium-CL: 3822658 Canary-Android-Topic: skia-codec-includes-1 Bug: skia:13052 Change-Id: I33238e1443903982492830bc5ce242b8cbdb56ac Reviewed-on: https://skia-review.googlesource.com/c/skia/+/565005 Reviewed-by: Ben Wagner <bungeman@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com> | 3 年前 | |
Some build fixes Stragglers from https://skia-review.googlesource.com/c/skia/+/1084056 Change-Id: I9f911d83ed834426eeba042f0842e10aebbc04e5 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1111276 Reviewed-by: Kaylee Lubick <kjlubick@google.com> Commit-Queue: Florin Malita <fmalita@google.com> | 7 个月前 | |
Some build fixes Stragglers from https://skia-review.googlesource.com/c/skia/+/1084056 Change-Id: I9f911d83ed834426eeba042f0842e10aebbc04e5 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1111276 Reviewed-by: Kaylee Lubick <kjlubick@google.com> Commit-Queue: Florin Malita <fmalita@google.com> | 7 个月前 | |
[base] Move some files from include/private to include/private/base These ones were arbitrarily chosen among files that did not have any dependencies on include/core: include/private/SingleOwner.h include/private/SkDeque.h include/private/SkMalloc.h include/private/SkMutex.h include/private/SkOnce.h include/private/SkSemaphore.h include/private/SkStringView.h include/private/SkTFitsIn.h include/private/SkThreadAnnotations.h include/private/SkThreadID.h include/private/SkTo.h Change-Id: I32b945b459922e39e3e40c9f4af134b269d4958a Bug: skia:13983 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/626078 Commit-Queue: Kevin Lubick <kjlubick@google.com> Reviewed-by: Herb Derby <herb@google.com> Owners-Override: Kevin Lubick <kjlubick@google.com> | 3 年前 | |
Rename SkAutoFree -> UniqueVoidPtr and move to private Change-Id: I0a4385439ddd13dc6e6667c1a61d425be93a4c28 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/633576 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: Herb Derby <herb@google.com> | 3 年前 | |
Make SkImage and SkImageGenerator return const SkData from refEncoded This behavior was implied (a shared pointer to SkData should always be treated as read-only) and is now made explicit. This also updates several places in our decoders where we promise not to modify the SkData that is passed in (since we will likely be caching it) and ask that the client not modify it either. This is partially guarded by SK_DISABLE_LEGACY_NONCONST_ENCODED_IMAGE_DATA so we can update Chromium and potentially other places. Change-Id: Id174dff4afa148745ad32dd7d5cd848931b77f9d Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1084056 Reviewed-by: Florin Malita <fmalita@google.com> | 7 个月前 | |
Move some codec-related headers out of core - SkEncodedImageFormat.h -> include/codec - SkPngChunkReader.h -> include/codec - SkICC.h -> include/encode - SkICC.cpp -> src/encode - SkICCPriv.h -> src/encode Bug: skia:13983 Change-Id: I92d09820587804dc7e3abd3a88a7679e0b56b809 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/660381 Reviewed-by: Ben Wagner <bungeman@google.com> Owners-Override: Kevin Lubick <kjlubick@google.com> | 3 年前 | |
[base] Move more files into base Moved from include/private into include/private/base: - SkFloatingPoint.h - SkMacros.h - SkSafe32.h - SkTLogic.h - SkTPin.h - SkTemplates.h Moved from src/core into src/base: - SkDeque.cpp - SkFloatingPoint.cpp - SkTDArray.cpp - SkLeanWindows.h - SkMalloc.cpp - SkSafeMath.h - SkSemaphore.cpp - SkSafeMath.cpp* Some constants were moved from SkTypes.h into SkMath.h and the implementation of SkSafeMath was put into its own file (instead of being in SkMath.cpp) A shim was added for SkTemplates.h, due to a few uses lingering in Android. - frameworks/base/libs/hwui/SkiaCanvas.cpp - frameworks/base/libs/hwui/pipeline/skia/SkiaRecordingCanvas.cpp - frameworks/base/libs/hwui/jni/Graphics.cpp - vendor/...GIFDecode.cpp Client CLs: - http://ag/21017148 Suggested review order: - include/private/base/BUILD.bazel - include/private/BUILD.bazel - include/BUILD.bazel - gn/*.gni (these are generated from the BUILD.bazel files) - BUILD.gn - public.bzl - Everything else, mostly done with find and replace and cleaned up with the rewrite_includes.py script. Change-Id: If80cfac68fed4219c4ea144f428461d2426bed24 Bug: skia:13983 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/630545 Reviewed-by: Herb Derby <herb@google.com> Owners-Override: Kevin Lubick <kjlubick@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com> | 3 年前 | |
Move SkMasks from src/codec to src/core These are also used by some text code. Change-Id: Ia7cffc52791a5c9a7477f2215eae9218dd75d75c Bug: b/40045064 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/800597 Commit-Queue: Jim Van Verth <jvanverth@google.com> Auto-Submit: Kevin Lubick <kjlubick@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com> | 2 年前 | |
Move SkColorPriv from include to src We don't want this to leak into usage. Major clients have been updated. Change-Id: I4039a374b0aca002d55a6be6292d5def26d8bd1d Reviewed-on: https://skia-review.googlesource.com/c/skia/+/962277 Reviewed-by: Florin Malita <fmalita@google.com> Commit-Queue: Kaylee Lubick <kjlubick@google.com> | 1 年前 | |
Rename src/codec/SkColorTable to src/codec/SkColorPalette This is in preparation for adding a public SkColorTable for use with table color filters. Bug: chromium:1434335 Change-Id: Ida418399d509790423ad510b86ce2f70fb4f8090 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/707480 Commit-Queue: Michael Ludwig <michaelludwig@google.com> Reviewed-by: Brian Osman <brianosman@google.com> | 3 年前 | |
Move SkColorPriv from include to src We don't want this to leak into usage. Major clients have been updated. Change-Id: I4039a374b0aca002d55a6be6292d5def26d8bd1d Reviewed-on: https://skia-review.googlesource.com/c/skia/+/962277 Reviewed-by: Florin Malita <fmalita@google.com> Commit-Queue: Kaylee Lubick <kjlubick@google.com> | 1 年前 | |
Rename src/codec/SkColorTable to src/codec/SkColorPalette This is in preparation for adding a public SkColorTable for use with table color filters. Bug: chromium:1434335 Change-Id: Ida418399d509790423ad510b86ce2f70fb4f8090 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/707480 Commit-Queue: Michael Ludwig <michaelludwig@google.com> Reviewed-by: Brian Osman <brianosman@google.com> | 3 年前 | |
2026.03.30 arkweb_144代码蓝黄同步 Signed-off-by: jiujiaoxiaogula <sujiahao10@huawei.com> Change-Id: Id6b8f8e08796118f0ec7d7f82b8f2430ef3448e1 | 3 个月前 | |
Make SkImage and SkImageGenerator return const SkData from refEncoded This behavior was implied (a shared pointer to SkData should always be treated as read-only) and is now made explicit. This also updates several places in our decoders where we promise not to modify the SkData that is passed in (since we will likely be caching it) and ask that the client not modify it either. This is partially guarded by SK_DISABLE_LEGACY_NONCONST_ENCODED_IMAGE_DATA so we can update Chromium and potentially other places. Change-Id: Id174dff4afa148745ad32dd7d5cd848931b77f9d Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1084056 Reviewed-by: Florin Malita <fmalita@google.com> | 7 个月前 | |
Make SkImage and SkImageGenerator return const SkData from refEncoded This behavior was implied (a shared pointer to SkData should always be treated as read-only) and is now made explicit. This also updates several places in our decoders where we promise not to modify the SkData that is passed in (since we will likely be caching it) and ask that the client not modify it either. This is partially guarded by SK_DISABLE_LEGACY_NONCONST_ENCODED_IMAGE_DATA so we can update Chromium and potentially other places. Change-Id: Id174dff4afa148745ad32dd7d5cd848931b77f9d Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1084056 Reviewed-by: Florin Malita <fmalita@google.com> | 7 个月前 | |
Move SkColorData to src/core We don't want these to leak into the public API. Change-Id: Ibdfad8ffcb1764affc84696fc07ebac33c2bcdf4 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/957556 Commit-Queue: Greg Daniel <egdaniel@google.com> Auto-Submit: Kaylee Lubick <kjlubick@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> | 1 年前 | |
Rename src/codec/SkColorTable to src/codec/SkColorPalette This is in preparation for adding a public SkColorTable for use with table color filters. Bug: chromium:1434335 Change-Id: Ida418399d509790423ad510b86ce2f70fb4f8090 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/707480 Commit-Queue: Michael Ludwig <michaelludwig@google.com> Reviewed-by: Brian Osman <brianosman@google.com> | 3 年前 | |
Rename src/codec/SkColorTable to src/codec/SkColorPalette This is in preparation for adding a public SkColorTable for use with table color filters. Bug: chromium:1434335 Change-Id: Ida418399d509790423ad510b86ce2f70fb4f8090 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/707480 Commit-Queue: Michael Ludwig <michaelludwig@google.com> Reviewed-by: Brian Osman <brianosman@google.com> | 3 年前 | |
Some build fixes Stragglers from https://skia-review.googlesource.com/c/skia/+/1084056 Change-Id: I9f911d83ed834426eeba042f0842e10aebbc04e5 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1111276 Reviewed-by: Kaylee Lubick <kjlubick@google.com> Commit-Queue: Florin Malita <fmalita@google.com> | 7 个月前 | |
Make SkImage and SkImageGenerator return const SkData from refEncoded This behavior was implied (a shared pointer to SkData should always be treated as read-only) and is now made explicit. This also updates several places in our decoders where we promise not to modify the SkData that is passed in (since we will likely be caching it) and ask that the client not modify it either. This is partially guarded by SK_DISABLE_LEGACY_NONCONST_ENCODED_IMAGE_DATA so we can update Chromium and potentially other places. Change-Id: Id174dff4afa148745ad32dd7d5cd848931b77f9d Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1084056 Reviewed-by: Florin Malita <fmalita@google.com> | 7 个月前 | |
Make SkData in SkJpegDecoder be pointer-to-const Requires https://crrev.com/c/7199994 to land in Chromium first. Change-Id: I6916f13481b9e6ee479fd203596504b714ffb594 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1109338 Reviewed-by: Florin Malita <fmalita@google.com> Commit-Queue: Kaylee Lubick <kjlubick@google.com> | 7 个月前 | |
Introduce SkStreamPriv namespace Change-Id: I1c2ee49ca8a9456be077907803f93029acdaff33 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1109336 Reviewed-by: Florin Malita <fmalita@google.com> | 7 个月前 | |
Mark some private constructors explicit This is considered good practice by the style guide. https://google.github.io/styleguide/cppguide.html#Implicit_Conversions I don't expect this to break any clients, but I've made it a separate commit from the ones touching the public API. I asked Gemini CLI to help me with this one. I had it use a regex to find candidates and then it narrowed down the pool and applied the edits. Change-Id: I3b519698508b186438a4a185c92472dccfa15313 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1075876 Reviewed-by: Michael Ludwig <michaelludwig@google.com> Commit-Queue: Kaylee Lubick <kjlubick@google.com> | 8 个月前 | |
Introduce SkStreamPriv namespace Change-Id: I1c2ee49ca8a9456be077907803f93029acdaff33 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1109336 Reviewed-by: Florin Malita <fmalita@google.com> | 7 个月前 | |
Add skhdr::Agtm::applyGain and skhdr::Agtm::makeColorFilter functions The function Agtm::applyGain applys the gain for a specified targeted HDR headroom, taking an array of colors in the gain application color space. The function Agtm::applyGain::makeColorFilter returns a color filter that performs the same computation using the gain application color space as a working color space. Add an accessor for the gain application color space. Add a test that checks several different points using both methods and verifies them against hard-coded expectations. Bug: skia:456675139 Change-Id: Ia4878947fcfbca2c0bfa88439ff9b0735472c7ff Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1106437 Reviewed-by: Kaylee Lubick <kjlubick@google.com> Reviewed-by: Christopher Cameron <ccameron@google.com> Commit-Queue: Christopher Cameron <ccameron@google.com> | 7 个月前 | |
Introduce SkStreamPriv namespace Change-Id: I1c2ee49ca8a9456be077907803f93029acdaff33 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1109336 Reviewed-by: Florin Malita <fmalita@google.com> | 7 个月前 | |
Add skhdr::Agtm::applyGain and skhdr::Agtm::makeColorFilter functions The function Agtm::applyGain applys the gain for a specified targeted HDR headroom, taking an array of colors in the gain application color space. The function Agtm::applyGain::makeColorFilter returns a color filter that performs the same computation using the gain application color space as a working color space. Add an accessor for the gain application color space. Add a test that checks several different points using both methods and verifies them against hard-coded expectations. Bug: skia:456675139 Change-Id: Ia4878947fcfbca2c0bfa88439ff9b0735472c7ff Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1106437 Reviewed-by: Kaylee Lubick <kjlubick@google.com> Reviewed-by: Christopher Cameron <ccameron@google.com> Commit-Queue: Christopher Cameron <ccameron@google.com> | 7 个月前 | |
Introduce SkStreamPriv namespace Change-Id: I1c2ee49ca8a9456be077907803f93029acdaff33 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1109336 Reviewed-by: Florin Malita <fmalita@google.com> | 7 个月前 | |
Introduce SkStreamPriv namespace Change-Id: I1c2ee49ca8a9456be077907803f93029acdaff33 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1109336 Reviewed-by: Florin Malita <fmalita@google.com> | 7 个月前 | |
Fix some anti-patterns in SkIcoCodec, unique_ptr assignment - clang-tidy noticed the strange reset/release pattern, so I fixed that. - Then, I noticed the unnecessary use of explicit MEM_MOVE - After that, a few miscellaneous fixes Change-Id: I323075e80f8f688da0e9ef50b309918f8d8b2100 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/700219 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: John Stiles <johnstiles@google.com> | 3 年前 | |
Make SkImage and SkImageGenerator return const SkData from refEncoded This behavior was implied (a shared pointer to SkData should always be treated as read-only) and is now made explicit. This also updates several places in our decoders where we promise not to modify the SkData that is passed in (since we will likely be caching it) and ask that the client not modify it either. This is partially guarded by SK_DISABLE_LEGACY_NONCONST_ENCODED_IMAGE_DATA so we can update Chromium and potentially other places. Change-Id: Id174dff4afa148745ad32dd7d5cd848931b77f9d Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1084056 Reviewed-by: Florin Malita <fmalita@google.com> | 7 个月前 | |
Make SkData in SkJpegDecoder be pointer-to-const Requires https://crrev.com/c/7199994 to land in Chromium first. Change-Id: I6916f13481b9e6ee479fd203596504b714ffb594 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1109338 Reviewed-by: Florin Malita <fmalita@google.com> Commit-Queue: Kaylee Lubick <kjlubick@google.com> | 7 个月前 | |
Minor cleanups to SkJpegCodec Change-Id: I6e8facfbbdfa1cc343f53dc9b305847f1fca325e Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1106780 Commit-Queue: Florin Malita <fmalita@google.com> Auto-Submit: Kaylee Lubick <kjlubick@google.com> Reviewed-by: Florin Malita <fmalita@google.com> | 7 个月前 | |
Adds a method to retrieve JUMBF metadata. JUMBF metadata is stored with an APP11 marker. It's the format used to embed a C2PA manifest that makes claims about content authenticity inside a JPEG. Bug: b/385174885 Change-Id: I5d4cf81270c109ee7ca5980427e2f5d4e88e8763 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/956796 Commit-Queue: Brett Somocurcio <brettos@google.com> Reviewed-by: Daniel Dilan <danieldilan@google.com> Reviewed-by: Brett Somocurcio <brettos@google.com> | 1 年前 | |
Roll libjpeg-turbo to latest in Chromium This indirectly addresses an use-of-uninitialized value error discovered by MSAN fuzzer. We are updating libjpeg-turbo to 3.1.0 and this CL is based off of these rolls into chromium: - Compiling some source sets multiple times with different precision symbols [1] - jsimd_none.c was removed so now we control WITH_SIMD via defines [2] [1] https://chromium-review.googlesource.com/c/chromium/deps/libjpeg_turbo/+/6264683 [2] https://chromium-review.googlesource.com/c/chromium/deps/libjpeg_turbo/+/6318439 Bug: 388319486 Bug: 398911117 Change-Id: I4c12ee6416789d6be334ee38540beb6d55a562b1 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/959936 Reviewed-by: Florin Malita <fmalita@google.com> Commit-Queue: Daniel Dilan <danieldilan@google.com> | 1 年前 | |
Mark some private constructors explicit This is considered good practice by the style guide. https://google.github.io/styleguide/cppguide.html#Implicit_Conversions I don't expect this to break any clients, but I've made it a separate commit from the ones touching the public API. I asked Gemini CLI to help me with this one. I had it use a regex to find candidates and then it narrowed down the pool and applied the edits. Change-Id: I3b519698508b186438a4a185c92472dccfa15313 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1075876 Reviewed-by: Michael Ludwig <michaelludwig@google.com> Commit-Queue: Kaylee Lubick <kjlubick@google.com> | 8 个月前 | |
2026.03.30 arkweb_144代码蓝黄同步 Signed-off-by: jiujiaoxiaogula <sujiahao10@huawei.com> Change-Id: Id6b8f8e08796118f0ec7d7f82b8f2430ef3448e1 | 3 个月前 | |
Make SkData in SkJpegDecoder be pointer-to-const Requires https://crrev.com/c/7199994 to land in Chromium first. Change-Id: I6916f13481b9e6ee479fd203596504b714ffb594 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1109338 Reviewed-by: Florin Malita <fmalita@google.com> Commit-Queue: Kaylee Lubick <kjlubick@google.com> | 7 个月前 | |
CVE-490254124 CVE-488596746 TicketNo: DTS2026033112164 Description: CVE-490254124 CVE-488596746 Team:gitcode Feature or Bugfix: Binary Source: sync from gitcode PrivateCode(Yes/No):No ------ DO NOT MODIFY, AUTO-GENERATED! ------ gitcode-Issue: 120 Time: "2026-04-02T08:02:56.903574Z" PR-Num: 196 gitcode-PR: https://gitcode.com/openharmony-tpc/chromium_third_party_skia/merge_requests/196 UserId:30064525 cherry picked from commit 0d0c1b1d69cd5e72924d0cc92a1559a763125428 Change-Id: I1775116972011b611cafbad0bc674fb639c8d6ed Reviewed-by: l00842199 Approved-by: w00811046 Merged-on: https://open.codehub.huawei.com/OpenSourceCenter_CR/openharmony-tpc/chromium_third_party_skia/-/change_requests/159 Merged-by: public pjenkins Signed-off-by: wangshengwen333 <wangshengwen4@h-partners.com> | 28 天前 | |
SkGainmapEncoder: Add MP extensions to all individual images In CIPA DC-007, it is not completely clear if it is required that all images (the base image and the gainmap image) must include MP extensions (the APP2 marker with MPF metadata). It is also likely that we will need to include MP extensions if CIPA DC-007 is updated to include gainmap support. To be on the safe side, make SkJpegGainmapEncoder::MakeMPF add MP extensions to all individual images, not just the first one. To SkJpegMultiPictureParameters::serialize, add an individual image number parameter, and conditionalize which parts are written based on that (in particular only write the version for non-first individual images). Make SkJpegGainmapEncoder::MakeMPF add the MPF segment to all images. Then add a bunch of tests. Bug: b/338342146 Change-Id: I1f7fc59313fec478a243fddbbe6a6a02a104fb8d Reviewed-on: https://skia-review.googlesource.com/c/skia/+/857840 Commit-Queue: Christopher Cameron <ccameron@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Christopher Cameron <ccameron@google.com> | 2 年前 | |
Mark some private constructors explicit This is considered good practice by the style guide. https://google.github.io/styleguide/cppguide.html#Implicit_Conversions I don't expect this to break any clients, but I've made it a separate commit from the ones touching the public API. I asked Gemini CLI to help me with this one. I had it use a regex to find candidates and then it narrowed down the pool and applied the edits. Change-Id: I3b519698508b186438a4a185c92472dccfa15313 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1075876 Reviewed-by: Michael Ludwig <michaelludwig@google.com> Commit-Queue: Kaylee Lubick <kjlubick@google.com> | 8 个月前 | |
SkJpegCodec: Move more constants to SkJpegConstants.h Move several constants out of SkJpegSegmentScanner and into the common SkJpegConstants.h. Bug: skia:14031 Change-Id: I216ac056d0251e80247662557a60c9971c813edc Reviewed-on: https://skia-review.googlesource.com/c/skia/+/647396 Commit-Queue: ccameron chromium <ccameron@chromium.org> Commit-Queue: Christopher Cameron <ccameron@google.com> Reviewed-by: Brian Osman <brianosman@google.com> | 3 年前 | |
Mark some private constructors explicit This is considered good practice by the style guide. https://google.github.io/styleguide/cppguide.html#Implicit_Conversions I don't expect this to break any clients, but I've made it a separate commit from the ones touching the public API. I asked Gemini CLI to help me with this one. I had it use a regex to find candidates and then it narrowed down the pool and applied the edits. Change-Id: I3b519698508b186438a4a185c92472dccfa15313 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1075876 Reviewed-by: Michael Ludwig <michaelludwig@google.com> Commit-Queue: Kaylee Lubick <kjlubick@google.com> | 8 个月前 | |
Remove conditional compilation of SkJpegSourceMgr.cpp The only thing SK_CODEC_DECODES_JPEG should control is the legacy registration of decoding the JPEG codec. Other uses had been removed previously in http://review.skia.org/689016 Change-Id: Ib12eae183fb1e87747442807e55d6605e6230765 Bug: skia:13983 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/717077 Commit-Queue: Kevin Lubick <kjlubick@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com> | 2 年前 | |
Mark more single argument constructors explicit I had a more expansive search pattern and found a few more candidates this time around. Gemini CLI did most of the work here and it does not appear we were implicitly using the conversion. Change-Id: Ia51d127a099dca4f76f7e13012d9f19dd1038e50 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1076816 Auto-Submit: Kaylee Lubick <kjlubick@google.com> Reviewed-by: Florin Malita <fmalita@google.com> Commit-Queue: Florin Malita <fmalita@google.com> | 8 个月前 | |
Change instances of true/false to TRUE/FALSE for libjpeg The jpeg library defines its own boolean type, with TRUE and FALSE as constants. This type is distinct from C++'s bool, and the use of the native true and false values results in a type mismatch. Change-Id: Ie22661b1640a4de3583f41a8cc3b652dc3afac26 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/874576 Reviewed-by: Kaylee Lubick <kjlubick@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Kaylee Lubick <kjlubick@google.com> | 1 年前 | |
Annotate third_party imports See also http://cl/572542822 and http://cl/572540001 Some of these are not used in G3, but showed up in my search anyway, so might as well avoid future potential errors. Change-Id: I43711ee4c574e36a18f906f5f6d8aa72bde4a5db Bug: b/237076898 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/765256 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com> | 2 年前 | |
Make SkData in SkJpegDecoder be pointer-to-const Requires https://crrev.com/c/7199994 to land in Chromium first. Change-Id: I6916f13481b9e6ee479fd203596504b714ffb594 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1109338 Reviewed-by: Florin Malita <fmalita@google.com> Commit-Queue: Kaylee Lubick <kjlubick@google.com> | 7 个月前 | |
Make SkData in SkJpegDecoder be pointer-to-const Requires https://crrev.com/c/7199994 to land in Chromium first. Change-Id: I6916f13481b9e6ee479fd203596504b714ffb594 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1109338 Reviewed-by: Florin Malita <fmalita@google.com> Commit-Queue: Kaylee Lubick <kjlubick@google.com> | 7 个月前 | |
Introduce SkStreamPriv namespace Change-Id: I1c2ee49ca8a9456be077907803f93029acdaff33 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1109336 Reviewed-by: Florin Malita <fmalita@google.com> | 7 个月前 | |
Make SkImage and SkImageGenerator return const SkData from refEncoded This behavior was implied (a shared pointer to SkData should always be treated as read-only) and is now made explicit. This also updates several places in our decoders where we promise not to modify the SkData that is passed in (since we will likely be caching it) and ask that the client not modify it either. This is partially guarded by SK_DISABLE_LEGACY_NONCONST_ENCODED_IMAGE_DATA so we can update Chromium and potentially other places. Change-Id: Id174dff4afa148745ad32dd7d5cd848931b77f9d Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1084056 Reviewed-by: Florin Malita <fmalita@google.com> | 7 个月前 | |
Move SkColorData to src/core We don't want these to leak into the public API. Change-Id: Ibdfad8ffcb1764affc84696fc07ebac33c2bcdf4 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/957556 Commit-Queue: Greg Daniel <egdaniel@google.com> Auto-Submit: Kaylee Lubick <kjlubick@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> | 1 年前 | |
[includes] Enforce IWYU on src/images Note: I had to change an implicit destructor to an explicit one in SkJpegCodec.h. Everything else was just a mechanical application of IWYU. Downstream changes: - http://ag/19595449 - https://crrev.com/c/3822658 - http://cl/466931845 - http://cl/466932551 Canary-Chromium-CL: 3822658 Canary-Android-Topic: skia-codec-includes-1 Bug: skia:13052 Change-Id: I33238e1443903982492830bc5ce242b8cbdb56ac Reviewed-on: https://skia-review.googlesource.com/c/skia/+/565005 Reviewed-by: Ben Wagner <bungeman@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com> | 3 年前 | |
SkExif: Allow truncated input Many Exif parsers allow truncated output. That is, they will parse as much of the Exif that they can read until they hit the end of the metadata buffer, even if the metadata indicated that the buffer should have been longer. This was discovered when migrating Chromium to use the new parser, and WPT failures caught the change. The parser in blink has this property. Upon excavation, the parser previously used by Skia did as well (so this is restoring previously existing behavior). Update SkTiffImageFileDirectory::MakeFromOffset to have an allowTruncated parameter, and modify the SkExif parser to specify it. Also, update SkExif the use std::optional rather than a separate "is present" variable, since that makes things much shorter. Add tests to ensure that this doesn't regress. Bug: b/40283599 Change-Id: I048fd6c3f4acb81d70cc53fc58020d5e7a48a734 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/858616 Reviewed-by: Leon Scroggins <scroggo@google.com> Reviewed-by: Christopher Cameron <ccameron@google.com> Commit-Queue: Christopher Cameron <ccameron@google.com> | 2 年前 | |
SkCodec: Consolidate Tiff parsing functions Parsing of Apple HDR images will require extracting HDR parameters from the MakerNote section of Exif metadata. This MakerNote data is stored in a Tiff Image File Directory. That will make the third place that Tiff IFD parsing will need to be done (the other two being Exif and MPF). Chromium also has its own bespoke Tiff IFD parser (which would make four). Add the class SkTiffImageFileDirectory, which parses these structures, and change SkJpegMultiPictureParameters and SkParseEncodedOrigin to use them. Add the class SkExifMetadata, with the intention that it will replace the direct calls to SkParseEncodedOrigin, and will eventually be used by Chromium (much like SkXmp can be today). Bug: chromium:1488376 Change-Id: Ice1923dd98701ccaf2d790cff749bc4eac008796 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/762016 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: ccameron chromium <ccameron@chromium.org> | 2 年前 | |
Move SkSurface factories to SkSurfaces namespace * SkSurface::MakeFromAHardwareBuffer -> SkSurfaces::WrapAndroidHardwareBuffer * SkSurface::MakeFromBackendRenderTarget -> SkSurfaces::WrapBackendRenderTarget * SkSurface::MakeFromBackendTexture -> SkSurfaces::WrapBackendTexture * SkSurface::MakeFromCAMetalLayer -> SkSurfaces::WrapCAMetalLayer * SkSurface::MakeFromMTKView -> SkSurfaces::WrapMTKView * SkSurface::MakeGraphite -> SkSurfaces::RenderTarget * SkSurface::MakeGraphiteFromBackendTexture -> SkSurfaces::WrapBackendTexture * SkSurface::MakeRaster -> SkSurfaces::Raster * SkSurface::MakeRasterDirect -> SkSurfaces::WrapPixels * SkSurface::MakeRasterDirectReleaseProc -> SkSurfaces::WrapPixels * SkSurface::MakeRasterN32Premul -> SkSurfaces::Raster * SkSurface::MakeRenderTarget -> SkSurfaces::RenderTarget Suggested review order: - include/* - src/gpu/ganesh/surface/SkSurface_Ganesh.cpp - src/image/SkSurface_Raster.cpp - src/image/SkSurface.cpp - All other changes which were mostly find-replace followed by git clang-format origin/main Change-Id: Idb18ab5c2beb12d8b4ec6712e9abee286646424f Bug: skia:13983 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/687639 Commit-Queue: Kevin Lubick <kjlubick@google.com> Reviewed-by: Brian Osman <brianosman@google.com> | 3 年前 | |
Expose SkPixmapUtils SkPixmapUtils::Orient is a useful utility when dealing with exif data. See also https://github.com/flutter/engine/pull/41368 Bug: skia:13983 Change-Id: I69aeaa45f2b1fc44c2e9bad6afbb5d6361fa84ef Reviewed-on: https://skia-review.googlesource.com/c/skia/+/676116 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com> | 3 年前 | |
Make SkImage and SkImageGenerator return const SkData from refEncoded This behavior was implied (a shared pointer to SkData should always be treated as read-only) and is now made explicit. This also updates several places in our decoders where we promise not to modify the SkData that is passed in (since we will likely be caching it) and ask that the client not modify it either. This is partially guarded by SK_DISABLE_LEGACY_NONCONST_ENCODED_IMAGE_DATA so we can update Chromium and potentially other places. Change-Id: Id174dff4afa148745ad32dd7d5cd848931b77f9d Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1084056 Reviewed-by: Florin Malita <fmalita@google.com> | 7 个月前 | |
Update (some) callers to follow more strict span rules - allows us to migrate to std::span, keeping SkSpan (for now) as an alias. - idea is to land call-site-cleanups separately, so that when we do try to actually throw the switch, that CL only contains the switch (build-flag) itself. Change-Id: I5f9aaafeb297b7adc1d953019fdac6ffda95fe03 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1097896 Commit-Queue: Mike Reed <mike@reedtribe.org> Reviewed-by: Ben Wagner <bungeman@google.com> Reviewed-by: Florin Malita <fmalita@google.com> | 7 个月前 | |
[rust png] Prefer SkASSERT_RELEASE over SkASSERT. The most recent Chromium guidelines [1] say to "Prefer CHECK() and NOTREACHED() over DCHECK()". Following these guidelines, this CL changes most SkASSERTs in Rust-PNG-related code and changes them to SkASSERT_RELEASE. The modified assertions are not inside inner loops, so this CL assumes that the impact on runtime performance should be negligible. [1] https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/checks.md#invariant_verification-mechanisms Bug: 428205250 Change-Id: Ieb86320c962580f62dad5978f01e0c7c0a3d27f8 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1014196 Reviewed-by: Florin Malita <fmalita@google.com> Commit-Queue: Łukasz Anforowicz <lukasza@google.com> | 1 年前 | |
Update (some) callers to follow more strict span rules - allows us to migrate to std::span, keeping SkSpan (for now) as an alias. - idea is to land call-site-cleanups separately, so that when we do try to actually throw the switch, that CL only contains the switch (build-flag) itself. Change-Id: I5f9aaafeb297b7adc1d953019fdac6ffda95fe03 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1097896 Commit-Queue: Mike Reed <mike@reedtribe.org> Reviewed-by: Ben Wagner <bungeman@google.com> Reviewed-by: Florin Malita <fmalita@google.com> | 7 个月前 | |
Make underlying SkData in SkMemoryStream const There are several APIs I noticed where we take in or hold onto a non-const sk_sp<SkData> that we do not modify and likely should not modify. [1][2][3] Also, in SkImage::refEncodedData() we don't want the client to modify the data we return [4]. In order to change those APIs, we need to be able to pass a const SkData to SkMemoryStream, which should be fine given that's a read-only view into the underlying buffer. All cases inside of Skia that use getData() now only seem to use it in a read-only fashion anyway, but there's a lot of changes involved with that [5] and I want to roll them out more gradually. Thus, the introduction of getDataView(). [1] https://skia.googlesource.com/skia/+/479696a3c5bfeb263a18c9260cb581b20ea4b556/include/private/SkEncodedInfo.h#40 [2] https://skia.googlesource.com/skia/+/479696a3c5bfeb263a18c9260cb581b20ea4b556/include/codec/SkJpegDecoder.h#34 [3] https://skia.googlesource.com/skia/+/479696a3c5bfeb263a18c9260cb581b20ea4b556/include/ports/SkTypeface_fontations.h#21 [4] https://skia.googlesource.com/skia/+/479696a3c5bfeb263a18c9260cb581b20ea4b556/include/core/SkImage.h#742 [5] https://skia-review.googlesource.com/c/skia/+/1084056 Change-Id: I138017550a05a7ac003405902adf12323f403732 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1084037 Reviewed-by: Florin Malita <fmalita@google.com> Auto-Submit: Kaylee Lubick <kjlubick@google.com> Commit-Queue: Florin Malita <fmalita@google.com> | 8 个月前 | |
SkCodec/SkPngCodec/SkPngEncoder: Add HDR metadata support To SkEncodedInfo, add an skhdr::Metadata item. To SkCodec, add an accessor for the skhdr::Metadata in its SkEncodedInfo. In SkPngCompositeChunkReader, which currently reads the gainmap chunks, add support to read the MDCV and CLLI chunks. Store an skhdr::Metadata member in SkPngCompositeChunkReader and propagate it to the SkEncodedInfo of the SkPngCodec. In SkPngEncoderMgr, rename setV0Gainmap to setHdrMetadata, which will write the MDCV and CLLI chunks (in addition to the gainmap chunks). Slightly clean up this area. Do not add tests yet. They come with the Rust implementation. Bug: 376550658 Change-Id: Ibf90e237202b00d589e06fe05d25d59b99256ad0 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1055197 Reviewed-by: Christopher Cameron <ccameron@google.com> Commit-Queue: ccameron chromium <ccameron@chromium.org> Owners-Override: Kaylee Lubick <kjlubick@google.com> Commit-Queue: Christopher Cameron <ccameron@google.com> Reviewed-by: Kaylee Lubick <kjlubick@google.com> | 9 个月前 | |
rewrite includes to not need so much -Ifoo Current strategy: everything from the top Things to look at first are the manual changes: - added tools/rewrite_includes.py - removed -Idirectives from BUILD.gn - various compile.sh simplifications - tweak tools/embed_resources.py - update gn/find_headers.py to write paths from the top - update gn/gn_to_bp.py SkUserConfig.h layout so that #include "include/config/SkUserConfig.h" always gets the header we want. No-Presubmit: true Change-Id: I73a4b181654e0e38d229bc456c0d0854bae3363e Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209706 Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Hal Canary <halcanary@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org> | 7 年前 | |
[rust png] Restrict sBIT handling to 8-bit images. Bug: chromium:458852444 Change-Id: Id27c26f48e19453fc6d864cf3b368379bb5b3aff Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1103037 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Łukasz Anforowicz <lukasza@google.com> | 7 个月前 | |
Reland "[rustpng] Implement subsets for SkPngRustCodec" This is a reland of commit bc7f3891e84d4fb2c717b074c4c7e8010d41431e Original change's description: > [rustpng] Implement subsets for SkPngRustCodec > > For further feature parity with the libpng codec, implement subsets. We > don't support subsets for animated images for now, as our default png > codec doesn't support animated images. This means that our > implementation only has to worry about one frame, and that the frame's > dimensions will be equal to the image dimensions. > > For non-interlaced images, we don't have to do much as applyXform() and > SkSwizzler will adjust it correctly. We just have to note which rows to > copy to dst, using member variables fFirstRow and fLastRow. We still do > have to decode each row before fFirstRow, because of the rust crate api. > > For interlaced images, we have to decode into a buffer for the full > image. The rust crate expects the full row and whole dst buffer for > calls to expand_interlaced_row(). So we use fPreblendBuffer to read the > image into, then extract a subset into our final dst with > getSubsetFromFullImage(). We also wait before apply any transforms > before decoding the full image, because applyXForm may truncate data we > need later (I think this is also how SkPngCodec works as well). > > Adds a test to SkPngRustDecoderTest.cpp, which tests subsets on an > interlaced and non-interlaced image. This is based on test_in_stripes() > from CodecTest.cpp. This is another step in being able to run all > skia/tests through SkPngRustCodec, but for now I have added this test. > > Note: If we want to support subsets for apng in the future, we can add > another field to DecodingState, to have both fInterlacedBuffer and > fPreblendBuffer. > > Bug: 362830091 > Bug: 356875275 > Change-Id: I223b4f867efa3526b02fe3cafe87e00a20cd34f8 > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1054479 > Reviewed-by: Kaylee Lubick <kjlubick@google.com> > Commit-Queue: Daniel Dilan <danieldilan@google.com> > Reviewed-by: Łukasz Anforowicz <lukasza@google.com> Bug: 362830091 Bug: 356875275 Change-Id: Iaec562dd349a2cc6ec956a01e4d36eeab5ef1356 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1057456 Reviewed-by: Kaylee Lubick <kjlubick@google.com> Commit-Queue: Daniel Dilan <danieldilan@google.com> | 9 个月前 | |
[rust png] Move Rust PNG implementation to non-"experimental" dir. This CL moves the remaining experimental/rust_png/... files into non-experimental directories. Bug: chromium:444061405 Change-Id: I6a266f6d1823c08bef147c6334c3d735367dec6a Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1055756 Commit-Queue: Łukasz Anforowicz <lukasza@google.com> Auto-Submit: Łukasz Anforowicz <lukasza@google.com> Reviewed-by: Kaylee Lubick <kjlubick@google.com> Commit-Queue: Kaylee Lubick <kjlubick@google.com> Owners-Override: Kaylee Lubick <kjlubick@google.com> | 9 个月前 | |
Some build fixes Stragglers from https://skia-review.googlesource.com/c/skia/+/1084056 Change-Id: I9f911d83ed834426eeba042f0842e10aebbc04e5 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1111276 Reviewed-by: Kaylee Lubick <kjlubick@google.com> Commit-Queue: Florin Malita <fmalita@google.com> | 7 个月前 | |
Mark some private constructors explicit This is considered good practice by the style guide. https://google.github.io/styleguide/cppguide.html#Implicit_Conversions I don't expect this to break any clients, but I've made it a separate commit from the ones touching the public API. I asked Gemini CLI to help me with this one. I had it use a regex to find candidates and then it narrowed down the pool and applied the edits. Change-Id: I3b519698508b186438a4a185c92472dccfa15313 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1075876 Reviewed-by: Michael Ludwig <michaelludwig@google.com> Commit-Queue: Kaylee Lubick <kjlubick@google.com> | 8 个月前 | |
Move free functions in SkCodecPriv into class namespace As I was poking around the pdf code, I noticed a strange function SkPDFBitmap::GetEncodedInfo(). This felt like something that would go in SkCodecPriv (can't be part of the public API because SkEncodedInfo is private), but that apparently didn't exist. So I made one and moved all the free functions into that. I'm surprised we didn't run into problems earlier, given the fact we have other free functions with similar or same names (e.g. get_int, used in some font code). I also renamed these to align with our more modern naming conventions. Change-Id: Ib90ceee5e92bbebf8c5ff34b3af1973d89b0eb50 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/928517 Reviewed-by: Daniel Dilan <danieldilan@google.com> Commit-Queue: Kaylee Lubick <kjlubick@google.com> Owners-Override: Kaylee Lubick <kjlubick@google.com> | 1 年前 | |
[includes] Enforce IWYU on src/images Note: I had to change an implicit destructor to an explicit one in SkJpegCodec.h. Everything else was just a mechanical application of IWYU. Downstream changes: - http://ag/19595449 - https://crrev.com/c/3822658 - http://cl/466931845 - http://cl/466932551 Canary-Chromium-CL: 3822658 Canary-Android-Topic: skia-codec-includes-1 Bug: skia:13052 Change-Id: I33238e1443903982492830bc5ce242b8cbdb56ac Reviewed-on: https://skia-review.googlesource.com/c/skia/+/565005 Reviewed-by: Ben Wagner <bungeman@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com> | 3 年前 | |
Split out memset opts into separate cpp files These used to be in SkUtils_opts. I also renamed everything so that they're declared in SkMemset.h, and defined in SkMemset_opts.h. Bug: b/40045064 Bug: b/40045066 Change-Id: Idefa5b8d5f59595ddce907742f50e02174e42964 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/740638 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Kevin Lubick <kjlubick@google.com> | 2 年前 | |
Move free functions in SkCodecPriv into class namespace As I was poking around the pdf code, I noticed a strange function SkPDFBitmap::GetEncodedInfo(). This felt like something that would go in SkCodecPriv (can't be part of the public API because SkEncodedInfo is private), but that apparently didn't exist. So I made one and moved all the free functions into that. I'm surprised we didn't run into problems earlier, given the fact we have other free functions with similar or same names (e.g. get_int, used in some font code). I also renamed these to align with our more modern naming conventions. Change-Id: Ib90ceee5e92bbebf8c5ff34b3af1973d89b0eb50 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/928517 Reviewed-by: Daniel Dilan <danieldilan@google.com> Commit-Queue: Kaylee Lubick <kjlubick@google.com> Owners-Override: Kaylee Lubick <kjlubick@google.com> | 1 年前 | |
Add in several decode Bazel modules This also adds in the (forgotten) defines to the font manager modules, which allows us to detect the presence of them at compile time if we need. Bug: b/40045064 Change-Id: I17bc297dd93b7416ebe5f5ed2a43b72483bcce2d Reviewed-on: https://skia-review.googlesource.com/c/skia/+/805283 Reviewed-by: Ben Wagner <bungeman@google.com> | 2 年前 | |
Move SkColorPriv from include to src We don't want this to leak into usage. Major clients have been updated. Change-Id: I4039a374b0aca002d55a6be6292d5def26d8bd1d Reviewed-on: https://skia-review.googlesource.com/c/skia/+/962277 Reviewed-by: Florin Malita <fmalita@google.com> Commit-Queue: Kaylee Lubick <kjlubick@google.com> | 1 年前 | |
[rust png] Avoid doing alpha premultiplication twice. Before this CL, alpha premultiplication could be applied 2 times in SkPngCodecBase::createColorTable: * via SkCodecPriv::ChoosePackColorProc * via applyColorXform After this CL, alpha premultiplication happens only once. This issue was caught when comparing expectations against the non-Skia-based blink::PNGImageDecoder. See the BitmapImageTest.APNGDecoder19 test in blink_platform_unittests. Note that the changes in this CL are not yet sufficient to pass that tests. Bug: chromium:383580201 Change-Id: Ied8e4b05130a349cd4a1c2e9bac3ee1bbc914882 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/932018 Reviewed-by: Florin Malita <fmalita@google.com> Commit-Queue: Łukasz Anforowicz <lukasza@google.com> | 1 年前 | |
Miscellaneous code cleanup This addresses most of the complaints when compiling in Release (mainly unreachable-code-break). Bug: b/448789662 Change-Id: I514fdb3f4bf4c1e5cc2434a1ab1938ef5443fe7a Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1075477 Reviewed-by: Michael Ludwig <michaelludwig@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com> | 8 个月前 | |
Optionally write the orientation when encoding a JPEG. Originally, there would be no exif data present when encoding a JPEG. This CL adds exif data with an orientation. The orientation can be set, otherwise it will just be the default orientation. The test is rewritten from this CL: https://skia-review.googlesource.com/c/skia/+/60721. Bug: 310510975 Change-Id: I90ea305a38270d9316d00b41f2d0f2f419acff91 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/901166 Reviewed-by: Florin Malita <fmalita@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Daniel Dilan <danieldilan@google.com> | 1 年前 | |
Make SkImage and SkImageGenerator return const SkData from refEncoded This behavior was implied (a shared pointer to SkData should always be treated as read-only) and is now made explicit. This also updates several places in our decoders where we promise not to modify the SkData that is passed in (since we will likely be caching it) and ask that the client not modify it either. This is partially guarded by SK_DISABLE_LEGACY_NONCONST_ENCODED_IMAGE_DATA so we can update Chromium and potentially other places. Change-Id: Id174dff4afa148745ad32dd7d5cd848931b77f9d Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1084056 Reviewed-by: Florin Malita <fmalita@google.com> | 7 个月前 | |
[base] Move more files into base Moved from include/private into include/private/base: - SkFloatingPoint.h - SkMacros.h - SkSafe32.h - SkTLogic.h - SkTPin.h - SkTemplates.h Moved from src/core into src/base: - SkDeque.cpp - SkFloatingPoint.cpp - SkTDArray.cpp - SkLeanWindows.h - SkMalloc.cpp - SkSafeMath.h - SkSemaphore.cpp - SkSafeMath.cpp* Some constants were moved from SkTypes.h into SkMath.h and the implementation of SkSafeMath was put into its own file (instead of being in SkMath.cpp) A shim was added for SkTemplates.h, due to a few uses lingering in Android. - frameworks/base/libs/hwui/SkiaCanvas.cpp - frameworks/base/libs/hwui/pipeline/skia/SkiaRecordingCanvas.cpp - frameworks/base/libs/hwui/jni/Graphics.cpp - vendor/...GIFDecode.cpp Client CLs: - http://ag/21017148 Suggested review order: - include/private/base/BUILD.bazel - include/private/BUILD.bazel - include/BUILD.bazel - gn/*.gni (these are generated from the BUILD.bazel files) - BUILD.gn - public.bzl - Everything else, mostly done with find and replace and cleaned up with the rewrite_includes.py script. Change-Id: If80cfac68fed4219c4ea144f428461d2426bed24 Bug: skia:13983 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/630545 Reviewed-by: Herb Derby <herb@google.com> Owners-Override: Kevin Lubick <kjlubick@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com> | 3 年前 | |
Introduce SkStreamPriv namespace Change-Id: I1c2ee49ca8a9456be077907803f93029acdaff33 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1109336 Reviewed-by: Florin Malita <fmalita@google.com> | 7 个月前 | |
Fix stream decoding Webp from unrewindable stream Previous CL [1] changed SkWebpCodec to defer copying the stream data by owning the fStream. Comment suggested that deleting the stream was optional [2] but this actually was necessary to indicate to SkCodec that we didn't want to try to call rewind() [3]. This CL introduces a protected helper function rewindStream(), which returns true to indicate that we can rewind the fStream, but SkWebp's override of onRewind doesn't call this function since we have the SkData copy. Adds test case the reproduces this bug in just skia (bug was found in android). Tries to decode multiple frames of webp with unrewindable stream. [1] https://skia-review.googlesource.com/c/skia/+/989596 [2] https://source.chromium.org/chromium/_/skia/skia/+/c2f00d09af9834259ba596a8cc7c0f92c6ba148e:src/codec/SkWebpCodec.cpp;drc=a49594026be7fb586b18700e3b39a4cd2642ce7b;l=77 [3] https://source.chromium.org/chromium/chromium/src/+/main:third_party/skia/src/codec/SkCodec.cpp;drc=d3ff0fc4ed435f672bd7492f7b6e3063bac2dab2;l=329 Bug: 421351189 Change-Id: I274ea5055da2d0843457ff850f6d1071df0716f3 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1013978 Reviewed-by: Florin Malita <fmalita@google.com> Commit-Queue: Daniel Dilan <danieldilan@google.com> | 1 年前 | |
Introduce SkStreamPriv namespace Change-Id: I1c2ee49ca8a9456be077907803f93029acdaff33 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1109336 Reviewed-by: Florin Malita <fmalita@google.com> | 7 个月前 | |
SkJpegMetadataDecoderImpl: Clean up Apple gainmap rendering Change SkJpegMetadataDecoderImpl::findGainmapImage to parse the Exif metadata of the base image in search of the Apple MakerNote that indicates the HDR headroom to be used for rendering the image. Only accept gainmap images if the Apple MakerNote was present in the base image Exif. There exists a class of Apple gainmap images that have a rotation baked into the base image but not the gainmap image (and therefore have the gainmap oriented incorrectly). These images appear not to have the Apple MakerNote Exif data. This will happen to fix the bug where these would be rendered with an inappropriately rotated gainmap (by not checking for the gainmap). Resurrect the deprecated SkGainmapInfo::Type enum, and use it to indicate if an image has an Apple gainmap. Add a new path in SkGainmapShader to support transcoding Apple gainmaps to Adobe gainmaps on the fly. Add tests for extracting the Apple MakerNote HDR headroom parameter. Add tests for newer iPhone images. Add tests for the new shader path. Bug: b/338342146 Bug: b/338299886 Change-Id: Ifbdcd4adabd470a30ddbf7cd740d75e97174bf6f Reviewed-on: https://skia-review.googlesource.com/c/skia/+/849738 Commit-Queue: Christopher Cameron <ccameron@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: ccameron chromium <ccameron@chromium.org> Reviewed-by: Christopher Cameron <ccameron@google.com> | 2 年前 |