Oopenharmony_ciCVE-513820666
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
Reapply "Factor out common pathiter" Fix: don't use new iter on AAHairLinePathRenderer.cpp (yet) This reverts commit d445371afee5ce3c307f416f8197c654831fa060. Change-Id: I753cb961aaf27b5f0fe7e93a80d794203b8e7d1f Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1039537 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Florin Malita <fmalita@google.com> Reviewed-by: Florin Malita <fmalita@google.com> | 10 个月前 | |
[includes] Prepare to remove SkColor<->SkImageInfo This breaks out the SkAlphaType and SkColorType enums into their own files, which lets us break the dependency between SkColor and SkImageInfo. It does not yet sever the link, but we plan to land this so as to migrate clients to the new enum files if necessary. This is estimated to save Chrome 230 MB of build size [1] (about 0.1%) http://screen/4dMqPC9rvAyCk6y [1] https://commondatastorage.googleapis.com/chromium-browser-clang/chrome_includes_2022-03-08_182556.html#view=edges&filter=%5Ethird_party%2Fskia%2Finclude%2Fcore%2FSkColor%5C.h%24&sort=asize&reverse=&includer=%5Ethird_party%2Fskia%2Finclude%2Fcore%2FSkColor%5C.h%24&included=&limit=1000 Change-Id: I331d414fe2996632ab11825c1092060ff5fe2ebd Bug: 242216 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/517678 Reviewed-by: Ben Wagner <bungeman@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com> | 4 年前 | |
[pdf] Differentiate text from byte strings. In PDF there are two different physical encodings of strings (as a sequence of bytes). There is the literal string encoding which is delimited by '(' and ') which stores the bytes as-is except for '(', ')', and the escape character '\' (which can introduce octal encoded bytes). There is also the hex string encoding delimited by '<' and '>' and the bytes are encoded in hex pairs (with an implicit '0' at the end for odd length encodings). The interpretation of these bytes depends on the logical string type of the dictionary key. There is a base abstract (well, almost abstract except for legacy purposes) string type. The subtypes of the string type are text string, ASCII string, and byte string. The text string is logically further subtyped into PDFDocEncoded string and UTF-16BE with BOM. In theory any of these logical string types may have its encoded bytes written out in either of the two physical string encodings. In practice for Skia this means there are two types of string to keep track of, since ASCII string and byte string can be treated the same (in this change they are both treated as byte string). If the type is text string then the bytes Skia has are interpreted as UTF-8 and may be converted to UTF-16BE with BOM or used directly as PDFDocEncoded string if that is valid. If the type is byte string then the bytes Skia has may not be converted and must be written as-is. This means that when Skia sets a dictionary key to a string value it must, at the very least, remember if the key's type was text string. This change replaces all String methods with ByteString and TextString methods and updates all the callers to the correct one based on the key being written. With the string handling corrected, the /ActualText string is now emitted with this new common code as well for better output and to reduce code duplication. A few no longer used public APIs involving these strings are removed. The documentation for the URI annotation is updated to reflect reality. This change outputs UTF-16BE with BOM with the hex string encoding only and does not attempt to fix the literal string encoding which always escapes bytes > 0x7F. These changes may be attempted in a separate change. Bug: chromium:1323159 Change-Id: I00bdd5c90ad1ff2edfb74a9de41424c4eeac5ccb Reviewed-on: https://skia-review.googlesource.com/c/skia/+/543084 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Herb Derby <herb@google.com> | 4 年前 | |
Add SkArc (in)equality operators Change-Id: Ibd5cc4cc868988b70e11e023222fb830323599a3 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/847476 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Florin Malita <fmalita@google.com> Auto-Submit: Brian Osman <brianosman@google.com> Commit-Queue: Florin Malita <fmalita@google.com> | 2 年前 | |
Add include to fix client Change-Id: I1ea2afb4dd4dbbfede9e4bd830fa86ee6e26029e Reviewed-on: https://skia-review.googlesource.com/c/skia/+/698759 Commit-Queue: Kevin Lubick <kjlubick@google.com> Owners-Override: Kevin Lubick <kjlubick@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: Kevin Lubick <kjlubick@google.com> Reviewed-by: Brian Osman <brianosman@google.com> | 3 年前 | |
Allow fiddle_examples in shared builds Most of Skia's tests are "big ball of mud" tests which test the internals of Skia and need access to all the symbols. These do not work in a shared build. However, the point of fiddle_examples is to demonstrate the use of only public API. Allow this to be built in a shared build configuration. This allows detection of use of unexported API in the examples, in particular when it was thought an API was exported but the defintition actually was not exported. Change-Id: Iab0550bb2b5bd03986bf309fb6b6ab51ee3c1632 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1013976 Reviewed-by: Florin Malita <fmalita@google.com> Auto-Submit: Ben Wagner <bungeman@google.com> Commit-Queue: Florin Malita <fmalita@google.com> | 1 年前 | |
Add kSkBlendModeCount I keep bumping into the need for this Change-Id: I69384f7d590c163fd6244bdc64cc5e48450fecd4 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540171 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Osman <brianosman@google.com> | 4 年前 | |
remove stale SkBlender documentation outdated with https://skia-review.googlesource.com/c/skia/+/421997 Change-Id: Id0da06f9a6c548168a42963c0ad7a9d80d39c99a Reviewed-on: https://skia-review.googlesource.com/c/skia/+/886497 Auto-Submit: Jorge Betancourt <jmbetancourt@google.com> Reviewed-by: Florin Malita <fmalita@google.com> Reviewed-by: Ben Wagner <bungeman@google.com> | 1 年前 | |
Remove unneeded SkTypes from base classes Change-Id: Ie12f80de58a8b4209bfd32be9aa964f9002ce9a4 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/603421 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Ben Wagner <bungeman@google.com> | 3 年前 | |
Add initial implementation of SkRasterContext and SkRasterRecorder There are a few objectives here: - Allow a better way to capture multiple instructions across multiple surfaces to allow us to have a better debugging and performance analysis story with big clients. - Reduce hard-coded global caches (configured at compile time) - Align our public APIs and behavior between Raster and Graphite (and Ganesh, sort of) - Enable frame-to-frame performance optimizations The first step is to mirror Graphite's concept of a Context (created once) [1] and Recorders [2] (created potentially multiple times). A surface is created from a recorder. When a draw call is made to that surface's canvas, it will get passed to the recorder and (eventually) sent to the context (e.g. "flushed"). Raster surfaces are currently immediate and synchronous, but we could have a SkRasterImmediateRecorder and SkRasterAsyncRecorder one day to have both options available. This CL introduces a SkRasterContext and SkRasterRecorder, both of which are intended to be opaque, with their actual implementations tucked away in src/core/SkRaster(Context|Recorder)_Base. This is plumbed into some places in the Raster backend and future CLs will add functionality to it. Suggested review order: - tests/RasterContextTest.cpp to get a sense of the new APIs as they would be called by clients (see how Graphite contexts and Ganesh contexts can make a raster recorder still, so clients only need the one type of context) - include/core/SkRaster* - Other changes to C++ files in include/core (e.g. Graphite) - src/core/SkRaster* - SkSurface_Raster.*, SkBitmapDevice.*, SkDrawBase.* to see how SkRasterRecorder (and eventually some of the things on it) will be piped through. - All other changes in any order. [1] https://github.com/google/skia/blob/2dbbb5680507ff00effa98e9e73dcb4dde5bfde3/include/gpu/graphite/Context.h [2] https://github.com/google/skia/blob/2dbbb5680507ff00effa98e9e73dcb4dde5bfde3/include/gpu/graphite/Recorder.h Change-Id: Ie19f1d836e47775c07778b872c117869718c9166 Bug: b/385170812 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/977817 Reviewed-by: Michael Ludwig <michaelludwig@google.com> Commit-Queue: Kaylee Lubick <kjlubick@google.com> | 1 年前 | |
[skcapture] add capture callbacks for SkSurface Adds callbacks that signal to the CaptureManager to snap an SkPicture and uses it in makeImageSnapshot b/412351769 Change-Id: I3696bc8c93ebbb72d715ddc89d7c1c17fc5ca1e4 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1053258 Commit-Queue: Jorge Betancourt <jmbetancourt@google.com> Reviewed-by: Michael Ludwig <michaelludwig@google.com> | 9 个月前 | |
Add [[nodiscard]] to various SkAuto* types Using these types without naming them creates a temporary that immediately goes out of scope, which is generally unexpected and not desirable. [[nodiscard]] means the compiler can generate a warning for this case, allowing presubmits to be simplified. Change-Id: Ifae7393700b41d04dbc4797d34ed66e20d6a0673 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1101396 Reviewed-by: Florin Malita <fmalita@google.com> Auto-Submit: Daniel Cheng <dcheng@chromium.org> Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Florin Malita <fmalita@google.com> | 7 个月前 | |
Pass sampling to drawImageSet Bug: skia:7650 Change-Id: I93d41ca6e5beb85e9924ea2f3e0a82c18ff51369 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/349617 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Reed <reed@google.com> | 5 年前 | |
Remove unneeded SK_GRAPHITE guards Change-Id: I672157554ccb7358b0a53f13eb7b350a3bc1affc Bug: b/256865569 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/896592 Auto-Submit: Kaylee Lubick <kjlubick@google.com> Owners-Override: Kaylee Lubick <kjlubick@google.com> Reviewed-by: Nolan Scobie <nscobie@google.com> | 1 年前 | |
Remove SK_SUPPORT_DEPRECATED_CLIPOPS and expanding clip op defs Bug: skia:10209 Change-Id: I72639b7e768742dcdec810a5a714ce21ff0f6e0a Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436565 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Michael Ludwig <michaelludwig@google.com> | 4 年前 | |
Combine SkColorShader and SkColor4Shader SkColorShader now holds an SkColor4f stored in sRGB. The Color factory that takes a color space now converts to sRGB up front so that it does not need to be retained. Fixes color space conversion in Graphite, which was being applied for SkColor4Shader but not SkColorShader. Bug: b/310924045 Bug: b/388496775 Change-Id: I5bbebb44699453b14ebf2cd513ee7ecfc8f53cf2 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/936438 Commit-Queue: Michael Ludwig <michaelludwig@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> | 1 年前 | |
Remove SkColorFilter::filterColor This has been marked deprecated for some time, and all callers have migrated to filterColor4f. Bug: 40040795 Change-Id: I400b5b29eb67ccd4c7065b2033c4269e3cdfb309 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/895176 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> Auto-Submit: Brian Osman <brianosman@google.com> | 1 年前 | |
Revert "SkColorSpacePrimaries: Add operator== and operator!=" This reverts commit d84a369255c4fe3c9c9d932f1113b94f0e43fa07. Reason for revert: Breaking a downstream Android build b/445166868 Original change's description: > SkColorSpacePrimaries: Add operator== and operator!= > > Add the preprocessor define SKIA_COLOR_SPACE_PRIMARIES_OPERATOR_EQUAL to > avoid breaking the Chromium build when rolling Skia. > > Bug: skia:40044808 > Change-Id: Ie26ff77debc1b9b81e8ae55c6710a0adfd00c6e5 > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1053419 > Reviewed-by: Kaylee Lubick <kjlubick@google.com> > Reviewed-by: Christopher Cameron <ccameron@google.com> > Owners-Override: Kaylee Lubick <kjlubick@google.com> > Commit-Queue: Christopher Cameron <ccameron@google.com> Bug: skia:40044808 Change-Id: I42203d2cb7d83229c8a4a5726483ca2921643969 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1055536 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Owners-Override: Kaylee Lubick <kjlubick@google.com> | 9 个月前 | |
Add explicit keyword to many public single argument constructors This is considered good practice by the style guide. https://google.github.io/styleguide/cppguide.html#Implicit_Conversions 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. This could break clients if they were relying on the auto-conversion. Change-Id: I25f9b294d34c2c967504c59f0389fddc27237dea Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1075696 Reviewed-by: Michael Ludwig <michaelludwig@google.com> | 8 个月前 | |
Add kR16_unorm_SkColorType * Adding support for this color type was requested by ccameron@ while looking into accelerated RGB to YUV conversion. * This CL adds kR16_unorm_SkColorType and subsequently updates all the relevant areas (Caps format tables, testing, raster pipeline ops, etc). Bug: b/452079352 Change-Id: I2629a89c498365a1d41a52e583c0043ac74ba80d Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1075756 Reviewed-by: Florin Malita <fmalita@google.com> Commit-Queue: Nicolette Prevost <nicolettep@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> | 7 个月前 | |
Change patheffect's virtual to take pathbuilder - this rippled into pathmeasure and stroking Plenty more to do after this: - more sites (internal) that can change to take builders - we might start passing PathRaw as const src&, so that the builder itself can be an input, rather than first snapping off a path. Change-Id: I689da01f58d4829a6cde0c60d18b2deaafa5a6fd Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1012818 Reviewed-by: Florin Malita <fmalita@google.com> Commit-Queue: Mike Reed <mike@reedtribe.org> Reviewed-by: Daniel Dilan <danieldilan@google.com> | 1 年前 | |
Remove unneeded SkTypes from base classes Change-Id: Ie12f80de58a8b4209bfd32be9aa964f9002ce9a4 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/603421 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Ben Wagner <bungeman@google.com> | 3 年前 | |
[includes] Enforce IWYU on SkCubicMap and SkGlyph I was curious if these actually depended on PathOps or not. SkCubicMap does not anymore, there was some #ifdef'd code that currently exists in CubicMapTest.cpp anyway. If we want SkGlyph in "core", we will want to remove the dependency on pathops. Change-Id: I9e2b7a37b5758d044575dad651d5bc1b203c070c Bug: skia:13052, skia:13983 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/621199 Commit-Queue: Kevin Lubick <kjlubick@google.com> Reviewed-by: Michael Ludwig <michaelludwig@google.com> Owners-Override: Kevin Lubick <kjlubick@google.com> | 3 年前 | |
Use SkSpan in SkData - clearup const / non-const behavior - clarify exactly what kind of subsetting the caller wants ... with new tests for both kinds of subsetting Change-Id: I53e6721f5a822de0772cb8e63ff0798669236279 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1009416 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Mike Reed <mike@reedtribe.org> Reviewed-by: Florin Malita <fmalita@google.com> | 1 年前 | |
Enforce IWYU on things needed for core build Client CLs: - http://ag/21408973 - https://crrev.com/c/4247679 - http://cl/509514434 - http://cl/509515755 non-trivial changes to: - SkBitmap.h to allow forward declares of SkShader and SkTileMode. - SkCanvas.h to allow SkSpecialImage to be forward-declared. Everything else was mechanical. Change-Id: I297fe955e1846cf3884da871a2a2a144bb7a9a42 Bug: skia:13983 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/642658 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com> | 3 年前 | |
Add explicit keyword to many public single argument constructors This is considered good practice by the style guide. https://google.github.io/styleguide/cppguide.html#Implicit_Conversions 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. This could break clients if they were relying on the auto-conversion. Change-Id: I25f9b294d34c2c967504c59f0389fddc27237dea Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1075696 Reviewed-by: Michael Ludwig <michaelludwig@google.com> | 8 个月前 | |
Remove SkDrawable::newPictureSnapshot entirely Follow-up to: https://skia-review.googlesource.com/c/skia/+/695958 Android code has been migrated to the newer makePictureSnapshot. Change-Id: I3d8f94f4048d55d2935023bd4922ff845c607371 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/698758 Reviewed-by: John Stiles <johnstiles@google.com> Commit-Queue: Brian Osman <brianosman@google.com> | 3 年前 | |
[graphite] Add multiple work lists to SkExecutor Bug: b/434712686 Change-Id: Ief1fe8b2f86ea0bb29e8b1a413edc07b68e839ce Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1056437 Reviewed-by: Michael Ludwig <michaelludwig@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Thomas Smith <thomsmit@google.com> | 9 个月前 | |
Remove SkDrawLooper entirely Bug: skia:40039965 Change-Id: I55710ddc627136cd7f7a80efd2e57fdee5dc5df2 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/838456 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Ben Wagner <bungeman@google.com> | 2 年前 | |
Refactor SkDraw and SkDrawBase into skcpu::Draw Merges the functionality of SkDrawBase into SkDraw to simplify the class hierarchy and improve code cohesion. - The SkDraw and SkDrawBase classes are consolidated into a single class, skcpu::Draw, located in src/core/SkDraw.h and src/core/SkDraw.cpp. - SkGlyphRunListPainterCPU is renamed to skcpu::GlyphRunListPainter to follow the new naming convention for CPU-specific code. Code from SkDrawBase.cpp was copied into SkDraw.cpp w/o changes in functionality. Change-Id: Ib780da653cb51a4a02ed4f89f9e48a4f07d4bf96 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1040756 Reviewed-by: Florin Malita <fmalita@google.com> Reviewed-by: Daniel Dilan <danieldilan@google.com> Commit-Queue: Kaylee Lubick <kjlubick@google.com> | 10 个月前 | |
Move SkFourByteTag to its own file SkSetFourByteTag felt a bit out of place in SkTypes.h Change-Id: Ie33406b0d0e6f75353933f3069a713269af6c90e Reviewed-on: https://skia-review.googlesource.com/c/skia/+/896594 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Kaylee Lubick <kjlubick@google.com> | 1 年前 | |
Make SkFontMetrics::operator== const Fixes C++20 ambiguous-reversed-operator warning. Change-Id: I1bfa7861447bd9220410c846122a85a6bf60cee3 Bug: b/311238827 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/779377 Auto-Submit: Ben Wagner <bungeman@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: John Reck <jreck@google.com> Reviewed-by: John Stiles <johnstiles@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com> | 2 年前 | |
修改字体加载流程 TicketNo:AR20260108590174 Description:修改字体加载流程 Team:Other Feature or Bugfix:Feature Binary Source: PrivateCode(Yes/No):NO Change-Id: Ie149a50e2b3bf2a041f09cf29e3edd44a02ee365 Reviewed-by: d00882844 Approved-by: l00587303 Merged-on: https://open.codehub.huawei.com/OpenSourceCenter_CR/openharmony-tpc/chromium_third_party_skia/-/change_requests/180 Merged-by: public pjenkins Signed-off-by: yp99ustc <yupeng74@huawei.com> | 30 天前 | |
Move SkFourByteTag to its own file SkSetFourByteTag felt a bit out of place in SkTypes.h Change-Id: Ie33406b0d0e6f75353933f3069a713269af6c90e Reviewed-on: https://skia-review.googlesource.com/c/skia/+/896594 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Kaylee Lubick <kjlubick@google.com> | 1 年前 | |
Fix style and axis scanning for variable fonts Have SkFontScanner::scanInstance be able to return the variation position of the instance. This allows the user to then merge in any requested variation position. Currently FreeType is getting the incorrect style and variation position for variable instances. This was being hidden by SkTypeface_FreeType::FaceRec::setupAxes ignoring any provided variable position when creating a named instance. This change also removes that. This re-enables the FontConfigInterface_MatchStyleNamedInstance test which was the only one requiring that the named instances and the style be correct. This forces a fix to the Skia side Fontations code. Change-Id: I8f375fc1d39f639b65c17bf6292776a391ff9901 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/926983 Reviewed-by: Julia Lavrova <jlavrova@google.com> Commit-Queue: Ben Wagner <bungeman@google.com> | 1 年前 | |
Set underlying type of SkFontStyle::Slant An enum only needs to support values that are in its range. An implicit underlying type may be of any bit length which can encode all the enumeration values. Therefore it is undefined behavior to store a value in the enum which requires more bits, leading to the UndefinedBehavior sanitizer complaining about values greater than four being read from an SkFontStyle::Slant. Fix such issues by explicitly stating the underlying type of SkFontStyle::Slant. Bug: 386547455 Change-Id: Ia6ccc64fdb1869bdc356f0bad2868f41194af641 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/935357 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> | 1 年前 | |
Remove SkTextEncoding and SkFontHinting macros. It appears all known users have been mirgrated to the new enums. Change-Id: Id64083c18bf8aa5f2ec935c80af3babebad90a2d Reviewed-on: https://skia-review.googlesource.com/c/skia/+/215459 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ben Wagner <bungeman@google.com> | 7 年前 | |
Move SkFourByteTag to its own file SkSetFourByteTag felt a bit out of place in SkTypes.h Change-Id: Ie33406b0d0e6f75353933f3069a713269af6c90e Reviewed-on: https://skia-review.googlesource.com/c/skia/+/896594 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Kaylee Lubick <kjlubick@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 个月前 | |
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 个月前 | |
Misc IWYU cleanups This removes SkFuzzLogging.h which had appeared unused as well as SkAutoTime which also appeared unused. I would like to remove SkTime.h from the public API in a future change. Change-Id: Iaea43df7f22581c19ae3b36793cb82b6e1ed6e63 Bug: b/40045064 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/749656 Commit-Queue: Kevin Lubick <kjlubick@google.com> Reviewed-by: Brian Osman <brianosman@google.com> | 2 年前 | |
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 个月前 | |
Reland "Add 16bit BT2020, YCGCO color space support" This is a reland of commit 5feca309571941ba047f1fafb77c0f28e077ac7d Original change's description: > Add 16bit BT2020, YCGCO color space support > > Similar to 8, 10, 12 bit, add color conversion matrix for 16 bit. > > Bug: chromium:347597908 > Change-Id: I46c748f2afb68628f2a9a0f2199d12833fc801df > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/869196 > Reviewed-by: Jim Van Verth <jvanverth@google.com> > Commit-Queue: Jim Van Verth <jvanverth@google.com> > Reviewed-by: Brian Osman <brianosman@google.com> Bug: chromium:347597908 Change-Id: Ifef04233068b3d7b13209c7d5e1c61faef024b00 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/870376 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com> | 2 年前 | |
Remove misleading consts from function parameters We intentionally are passing these by value because they are small structs, so remove the const from the definitions which are not adding any value. https://quuxplusone.github.io/blog/2019/01/03/const-is-a-contract Change-Id: I24aadd4e19876903a9d251cee2aef569af000edc Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1083058 Commit-Queue: Kaylee Lubick <kjlubick@google.com> Reviewed-by: Florin Malita <fmalita@google.com> | 8 个月前 | |
Enforce IWYU on more src/core files Change-Id: Id3562e32d7029cafea5c37853a7a91745eb36342 Bug: b/40044159 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/761716 Commit-Queue: Kevin Lubick <kjlubick@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> | 2 年前 | |
Remove approximateFilteredBounds from SkMaskFilter This appears to have been added experimentally, but ended up not being used by our major clients. To ease the effort to fold Mask filters into Image filters, let's remove it. Change-Id: I91df745ae69b88f73653fc71d6423209ce8a52eb Bug: b/40043187 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/934796 Commit-Queue: Kaylee Lubick <kjlubick@google.com> Reviewed-by: Michael Ludwig <michaelludwig@google.com> | 1 年前 | |
Can we remove SK_SUPPORT_LEGACY_APPLYPERSPECTIVECLIP Change-Id: I332cd3dae1584812768445388482f92df0d65324 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1072416 Reviewed-by: Florin Malita <fmalita@google.com> Reviewed-by: Eric Boren <borenet@google.com> Reviewed-by: Kaylee Lubick <kjlubick@google.com> Commit-Queue: Mike Reed <mike@reedtribe.org> | 8 个月前 | |
Add missing SK_API exports in SkMesh.h Export SkMesh and SkMeshSpecification. Change-Id: Ie90868cf9f804a762f04bca4d249d1fdeca3d114 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/806976 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Lei Zhang <thestig@chromium.org> | 2 年前 | |
Update Skia milestone to 144 Change-Id: I0c187365a4e57afa1bb1aaf02c2a2eed4b105790 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1086476 Reviewed-by: Eric Boren <borenet@google.com> Commit-Queue: Heather Miller <hcm@google.com> | 8 个月前 | |
Add optional OT-SVG support to FreeType Bug: skia:12290 Change-Id: I064bee781d3a714e46f102cb48494fbe8f3e46e8 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/516436 Reviewed-by: Florin Malita <fmalita@google.com> Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Ben Wagner <bungeman@google.com> | 4 年前 | |
Add explicit keyword to many public single argument constructors This is considered good practice by the style guide. https://google.github.io/styleguide/cppguide.html#Implicit_Conversions 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. This could break clients if they were relying on the auto-conversion. Change-Id: I25f9b294d34c2c967504c59f0389fddc27237dea Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1075696 Reviewed-by: Michael Ludwig <michaelludwig@google.com> | 8 个月前 | |
[pdf] Do not scale miterLimit In "[pdf] Reduce drawing glyphs as paths" [0] a new function scale_paint was introduced to reduce redundancy in the fonts that need to be embedded in the PDF. This function properly scaled the SkPaint::fWidth but it also incorrectly scaled SkPaint::fMiterLimit. The miter limit is already a ratio and so should not be scaled. Remove this incorrect scaling. This issue was introduced partially due to a lack of understanding of the units of the miter limit and that it is a ratio and not the max miter length. Update the documentation on SkPaint::setStrokeMiter to include some actually useful information. [0] https://skia.googlesource.com/skia/+/8884cb1822618b0ce95a25e2ef1560c98fa8b081 Bug: 379510433 Change-Id: Idab1074a4a41938f32c38b148e48b28981dd7c95 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/946917 Reviewed-by: Brett Somocurcio <brettos@google.com> Commit-Queue: Ben Wagner <bungeman@google.com> | 1 年前 | |
Hide methods that don't exist in pathdata mode Change-Id: I994239e1bc6e67ed9eecdf98f87fd2d3962e6d39 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1109856 Commit-Queue: Florin Malita <fmalita@google.com> Reviewed-by: Florin Malita <fmalita@google.com> Reviewed-by: Julia Lavrova <jlavrova@google.com> Reviewed-by: Thomas Smith <thomsmit@google.com> Commit-Queue: Mike Reed <mike@reedtribe.org> | 7 个月前 | |
Add SkPathBuilder::rMoveTo(x,y) All of the other r*To have versions which take scalers and forward to the structured versions. Add this for rMoveTo. Also update the r*To to take SkVector instead of SkPoint and rename the parameters with d to match the documentation. Bug: 40040287 Change-Id: I73e1cbd8c0cc44c88e1d1626dbb5a09d8ee9f8be Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1092936 Reviewed-by: Florin Malita <fmalita@google.com> Commit-Queue: Ben Wagner <bungeman@google.com> Auto-Submit: Ben Wagner <bungeman@google.com> Commit-Queue: Florin Malita <fmalita@google.com> | 8 个月前 | |
Change patheffect's virtual to take pathbuilder - this rippled into pathmeasure and stroking Plenty more to do after this: - more sites (internal) that can change to take builders - we might start passing PathRaw as const src&, so that the builder itself can be an input, rather than first snapping off a path. Change-Id: I689da01f58d4829a6cde0c60d18b2deaafa5a6fd Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1012818 Reviewed-by: Florin Malita <fmalita@google.com> Commit-Queue: Mike Reed <mike@reedtribe.org> Reviewed-by: Daniel Dilan <danieldilan@google.com> | 1 年前 | |
change hairliner to use pathraw related: https://skia-review.googlesource.com/c/skia/+/1044557 Change-Id: Iab0e36a7be9ec30ab339009c6b6b1583f4f6477f Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1044476 Reviewed-by: Florin Malita <fmalita@google.com> Reviewed-by: Daniel Dilan <danieldilan@google.com> Commit-Queue: Mike Reed <mike@reedtribe.org> | 10 个月前 | |
Change patheffect's virtual to take pathbuilder - this rippled into pathmeasure and stroking Plenty more to do after this: - more sites (internal) that can change to take builders - we might start passing PathRaw as const src&, so that the builder itself can be an input, rather than first snapping off a path. Change-Id: I689da01f58d4829a6cde0c60d18b2deaafa5a6fd Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1012818 Reviewed-by: Florin Malita <fmalita@google.com> Commit-Queue: Mike Reed <mike@reedtribe.org> Reviewed-by: Daniel Dilan <danieldilan@google.com> | 1 年前 | |
Some SkPath cleanups - use enum to store filltype - share function to toggle inverse-filltype - rm unused methods Change-Id: I806ff24664f9abb21825ddf6afd689b525953403 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1078596 Reviewed-by: Florin Malita <fmalita@google.com> Reviewed-by: Kaylee Lubick <kjlubick@google.com> Commit-Queue: Mike Reed <mike@reedtribe.org> | 8 个月前 | |
Change patheffect's virtual to take pathbuilder - this rippled into pathmeasure and stroking Plenty more to do after this: - more sites (internal) that can change to take builders - we might start passing PathRaw as const src&, so that the builder itself can be an input, rather than first snapping off a path. Change-Id: I689da01f58d4829a6cde0c60d18b2deaafa5a6fd Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1012818 Reviewed-by: Florin Malita <fmalita@google.com> Commit-Queue: Mike Reed <mike@reedtribe.org> Reviewed-by: Daniel Dilan <danieldilan@google.com> | 1 年前 | |
[graphite] Add PictureShader to Precompilation system Bug: b/238759147 Change-Id: I21bd0276919098f455679d1019c868f5c2e866ef Reviewed-on: https://skia-review.googlesource.com/c/skia/+/825720 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com> | 2 年前 | |
Rename existing SkRecorder -> SkRecordCanvas We are going to want a public class named SkRecorder for some of our refactorings of the CPU backend. This will disambiguate them. Change-Id: I4851c856182145d1b969e7c13a858745440a7364 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/979896 Auto-Submit: Kaylee Lubick <kjlubick@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com> | 1 年前 | |
Enforce IWYU on some core files Client CLs: - https://github.com/flutter/engine/pull/40533 - https://crrev.com/c/4362099 Canary-Chromium-CL: 4362099 Change-Id: I3fc720edf46b0df0b7f288a1278fd14639ae292f Bug: skia:13052 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/660296 Reviewed-by: Ben Wagner <bungeman@google.com> Owners-Override: Kevin Lubick <kjlubick@google.com> | 3 年前 | |
Update pixmap asserts to identify negative values explicitly This would have aided in debugging the linked bug. Change-Id: I930cce52f295d33643ff90eacd313cff0542e9bb Bug: b/447041289 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1065436 Commit-Queue: Kaylee Lubick <kjlubick@google.com> Reviewed-by: Florin Malita <fmalita@google.com> | 9 个月前 | |
Move SkPoint to base Change-Id: I8a08b14f4e1c1f1c6ac1611e44c2f3d2ea1c8ca0 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/712861 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Herb Derby <herb@google.com> | 3 年前 | |
Replace SkIsFinite with a parameter-pack implementation. This should be more ergonomic, and will generate slightly better code than SkIsFinite(a, b) && SkIsFinite(c, d). The algorithm has been slightly tweaked; it's now a hybrid of the previous approaches. The first element of the list is subtracted from itself (yielding zero or NAN) and multiplied against all the subsequent elements. Finally the value is compared against itself. This gives us one instruction per value, plus one comparison op, and does not require us to synthesize a constant zero. Change-Id: I7f87c09a74bc847f0afc10346b51211b17811c1c Reviewed-on: https://skia-review.googlesource.com/c/skia/+/842484 Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Michael Ludwig <michaelludwig@google.com> Reviewed-by: Brian Osman <brianosman@google.com> | 2 年前 | |
Add a SkRRect::MakeRectRadii helper Matching SkRRect::setRectRadii. Change-Id: I6a04ffc9999435bd9c4dc8ff638517e080107e17 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1081957 Reviewed-by: Eric Boren <borenet@google.com> Commit-Queue: Florin Malita <fmalita@google.com> | 8 个月前 | |
Enforce IWYU on more src/core files Client CLs: - https://r.android.com/2921485 Change-Id: I98f8be95e270b9974c5883e1d8a1b885b8a0d6c5 Bug: b/40044159 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/803438 Reviewed-by: Brian Osman <brianosman@google.com> | 2 年前 | |
Add SkSurfaceProps parameter to several APIs In general, SkSurfaceProps is only needed when rendering text. However, there are several existing APIs that don't allow SkSurfaceProps to be passed in by the user. This change adds new SkSurfaceProps parameters to several public-facing APIs: 1. SkRasterHandleAllocator::MakeCanvas -- The props are used by the canvas whenever text is rendered. 2. SkImage::MakeFromPicture and SkImageGenerator::MakeFromPicture -- The props are used to render any text in the SkPicture object. Change-Id: Ic48e8a30bb12b3170415c644de1a007b5eefb818 Bug: skia:13369 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/545396 Reviewed-by: Ben Wagner <bungeman@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com> | 4 年前 | |
[skcapture] add capture callbacks for SkSurface Adds callbacks that signal to the CaptureManager to snap an SkPicture and uses it in makeImageSnapshot b/412351769 Change-Id: I3696bc8c93ebbb72d715ddc89d7c1c17fc5ca1e4 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1053258 Commit-Queue: Jorge Betancourt <jmbetancourt@google.com> Reviewed-by: Michael Ludwig <michaelludwig@google.com> | 9 个月前 | |
More flexible rect->quad variants - take spans - allow Direction (cw/ccw) to be specified (inspired by SkPathData work) Change-Id: I459a130d3c3ed841817357e758d2a2a49b793dab Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1035517 Reviewed-by: Eric Boren <borenet@google.com> Reviewed-by: Daniel Dilan <danieldilan@google.com> Commit-Queue: Mike Reed <mike@reedtribe.org> Reviewed-by: Florin Malita <fmalita@google.com> | 10 个月前 | |
Add deduction guide for sk_sp Allows for writing sk_sp(new Foo()) without warnings. This is similar to writing sk_make_sp<Foo>() but slightly shorter and easier for finding constructor usage in code search. Change-Id: I360b841c1b79290db31dd0087b943c32f4dc2389 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/886836 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com> | 1 年前 | |
Reapply "SkRegion to use pathbuilder" Fix was to reverse the sense of the ifdef around the old API. This reverts commit 05374bbe5377ecc581f503b04d0c5fba79a79b4c. Change-Id: Id0f4c4372bbf1cb8d2c14c0dbca067af705ebcf1 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1016998 Reviewed-by: Florin Malita <fmalita@google.com> Reviewed-by: Daniel Dilan <danieldilan@google.com> Commit-Queue: Mike Reed <mike@reedtribe.org> | 11 个月前 | |
SkSamplingOptions ctors not explicit Change-Id: Ifb7c153bc48020892347278048b9298efa9b982c Reviewed-on: https://skia-review.googlesource.com/c/skia/+/704917 Commit-Queue: Michael Ludwig <michaelludwig@google.com> Reviewed-by: Brian Osman <brianosman@google.com> | 3 年前 | |
Replace SkScalarAve with sk_float_midpoint After [1], SkScalarAve can underflow with denormalized values and yield results outside the input range. Instead of attempting to further tweak SkScalarAve, use the existing sk_float_midpoint which avoids these issues by using double precision. [1] https://skia-review.googlesource.com/c/skia/+/1073436 Bug: b/452701616 Change-Id: I2ed47c6fc91f32ef7b14411af3c5f9a68b36a7d2 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1078076 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Florin Malita <fmalita@google.com> | 8 个月前 | |
CVE-513820666 Signed-off-by: hwt00888022 <huwentao21@huawei.com> | 23 天前 | |
Add output colorspace parameter to SkShader::makeWithWorkingColorSpace Internally, this updates the SkWorkingColorSpaceShader to hold state for working in unpremul values, and adjusts the backend handling to use this information. However, since working in unpremul will also require all inputs to convert or produce unpremul values, this aspect of the feature does not work completely correctly. It is not exposed in the public API yet (just the input/output CS parameters), but the GM contains cases for working in unpremul to show the current failures. Bug: b/431253869 Change-Id: Ie45286389c033249ce84a1746dae5f7bed0c8d76 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1021417 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Michael Ludwig <michaelludwig@google.com> Reviewed-by: Florin Malita <fmalita@google.com> | 10 个月前 | |
Fix potential overflow in SkISize::area. Change-Id: I0eff9878f4fa30699c0b3feedf4b0aa0ae42a514 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/833813 Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Commit-Queue: John Stiles <johnstiles@google.com> | 2 年前 | |
[base] Move many files into base Moved from include/private into include/private/base: - SkAlignedStorage.h - SkContainers.h - SkFloatBits.h - SkPathEnums.h - SkTArray.h - SkTDArray.h - SkTypeTraits.h - SkVx.h - SkCPUTypes.h* Moved from include/core into include/private/base: - SkMath.h - SkSpan.h We still want SkSpan.h to be a part of the public API, so include/core/SkSpan.h still exists, it just includes include/private/base/SkSpan_impl.h We want to remove SkMath.h from the public API (most client uses have been removed already), but for now it too has a shim header file in include/core/SkMath.h As per the design of base, there are no includes inside of base on Skia files not also in base. SkLeftShift moved out of SkTypes.h and into SkMath.h, as that seemed like a better fit. U8CPU and U16CPU moved into their own file, SkCPUTypes.h while we decide where their future lies. 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: Icce0d0c445863c6908b63ec31b9595de400988dc Bug: skia:13983 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/629317 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com> Owners-Override: Kevin Lubick <kjlubick@google.com> | 3 年前 | |
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 个月前 | |
Remove misleading consts from function parameters We intentionally are passing these by value because they are small structs, so remove the const from the definitions which are not adding any value. https://quuxplusone.github.io/blog/2019/01/03/const-is-a-contract Change-Id: I24aadd4e19876903a9d251cee2aef569af000edc Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1083058 Commit-Queue: Kaylee Lubick <kjlubick@google.com> Reviewed-by: Florin Malita <fmalita@google.com> | 8 个月前 | |
Add explicit keyword to many public single argument constructors This is considered good practice by the style guide. https://google.github.io/styleguide/cppguide.html#Implicit_Conversions 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. This could break clients if they were relying on the auto-conversion. Change-Id: I25f9b294d34c2c967504c59f0389fddc27237dea Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1075696 Reviewed-by: Michael Ludwig <michaelludwig@google.com> | 8 个月前 | |
2026.03.30 arkweb_144代码蓝黄同步 Signed-off-by: jiujiaoxiaogula <sujiahao10@huawei.com> Change-Id: Id6b8f8e08796118f0ec7d7f82b8f2430ef3448e1 | 3 个月前 | |
Expose min and max contrast and gamma values publicly I'm working on a change in Chromium that sets contrast and gamma in Skia. As part of this, I would like to clamp values to Skia's range. I initially set this up with hard-coded matching values, but it will be much cleaner to export them in SkTypes. I also updated the SkAsssert code to use the publicly exposed values instead of hard-coded values. Bug: chromium:1160653 Change-Id: Ib172a68d9546a183c7cc0e443f34f21fb2bd33d7 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/820436 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Ben Wagner <bungeman@google.com> Auto-Submit: Kurt Catti-Schmidt <kschmi@microsoft.com> | 2 年前 | |
Enforce IWYU on src/core/Sk[ST].* The changes to the public API files should be fine since they are only adding #includes, not removing them (with the exception of SkTypes, which is so prevalently included, it would be surprising if a client was missing it). Change-Id: I5719123bd616e0fbb7d81bd3863821f422933107 Bug: b/40044159 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/816003 Commit-Queue: Kevin Lubick <kjlubick@google.com> Reviewed-by: Nicolette Prevost <nicolettep@google.com> Owners-Override: Kevin Lubick <kjlubick@google.com> | 2 年前 | |
Use SkSpan in SkTextBlob API Change-Id: I14de986a9f4a0ed0fc8a229f5e0c935e787ad595 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1004298 Reviewed-by: Florin Malita <fmalita@google.com> Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Mike Reed <mike@reedtribe.org> | 1 年前 | |
Rename SkImage::CompressionType -> SkTextureCompressionType This appears to be in a few contexts outside of SkImages and this will help with upcoming refactoring around the SkImage factories. I inlined the one use of kCompressionTypeCount and decided to share the value of kETC2_RGB8_UNORM with kETC1_RGB8 instead of making a static constant variable. go/skia-client-search showed no usage of the old SkImage::CompressionType, only a few uses of SkImage::kETC1_SkCompressionType. Thus we only need an alias for that static class variable until Chromium is migrated. All other changes (the #include fixes) were a result of SkImage.h not being included from GrTypesPriv.h. To assist with this, I enforced IWYU on a few new files that gave me trouble as well as having SkiaVulkan.h properly export the vulkan_core.h and friends so IWYU doesn't try to make us directly include those. Change-Id: I844372368478e3538fd4e8e01fdfefd988438e91 Bug: skia:13983 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/656237 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com> | 3 年前 | |
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 年前 | |
Add cache key value extraction for LazyPicture Images This should correctly generate a reuseable key for the 3 calls Chrome makes to SkImages::DeferredFromPicture. Bug: chromium:1457525 Change-Id: I3c656d0082493ea733efdea1e3937338b434c901 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/745936 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Michael Ludwig <michaelludwig@google.com> | 2 年前 | |
[graphite] Add test to prove Vulkan shares renderpasses when expected * This change adds a unit test to prove that the Vulkan backend shares renderpasses between draws that do and do not perform dst texture reads as expected (an important optimization to avoid runtime pipeline compilations). * Adds a method to SkTraceMemoryDump to opt in to reporting resources with a gpu memory size of 0 (such as renderpasses). * Add implementation of SkTraceMemoryDump which counts the number of resources within the cache whose type field contains a given substring. Could easily be moved to a shared location and used by other tests if the need arises. Change-Id: Ic10e59a6508b15bf41f097fc032a6e4e97216170 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/959636 Commit-Queue: Nicolette Prevost <nicolettep@google.com> Reviewed-by: Michael Ludwig <michaelludwig@google.com> | 1 年前 | |
SkTypeface virtuals to take SkSpan The public methods have already been updated, this is just pushing the spans down to the virtuals. Change-Id: I22b6e4dea2bb9d935c29845cb8c9d75ecf0eeef9 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1013596 Reviewed-by: Ben Wagner <bungeman@google.com> Reviewed-by: Florin Malita <fmalita@google.com> Commit-Queue: Mike Reed <mike@reedtribe.org> | 1 年前 | |
Change patheffect's virtual to take pathbuilder - this rippled into pathmeasure and stroking Plenty more to do after this: - more sites (internal) that can change to take builders - we might start passing PathRaw as const src&, so that the builder itself can be an input, rather than first snapping off a path. Change-Id: I689da01f58d4829a6cde0c60d18b2deaafa5a6fd Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1012818 Reviewed-by: Florin Malita <fmalita@google.com> Commit-Queue: Mike Reed <mike@reedtribe.org> Reviewed-by: Daniel Dilan <danieldilan@google.com> | 1 年前 | |
Enforce IWYU on the rest of src/core These are all mechanical changes. The changes to include/core should be safe as they are just additive. Bug: b/40044159 Change-Id: I09a5cada90d23635adbfa70dc1232c7cdb41a5b2 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/817217 Reviewed-by: Nicolette Prevost <nicolettep@google.com> Owners-Override: Kevin Lubick <kjlubick@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com> | 2 年前 | |
Enforce IWYU on the rest of src/core These are all mechanical changes. The changes to include/core should be safe as they are just additive. Bug: b/40044159 Change-Id: I09a5cada90d23635adbfa70dc1232c7cdb41a5b2 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/817217 Reviewed-by: Nicolette Prevost <nicolettep@google.com> Owners-Override: Kevin Lubick <kjlubick@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com> | 2 年前 | |
Add predefined encoded origin inverse function Updates GMs and tests to use the inverse. Adds a unit test to ensure it matches the actual computed inverse from SkEncodedOriginToMatrix. Updates Ganesh/Graphite's YUV image shaders to use the direct inverse instead of recomputing the inverse from the original origin matrix. Change-Id: I803f77be44e0985ddfb7d7df004d861dad0fc206 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1091176 Reviewed-by: Florin Malita <fmalita@google.com> Commit-Queue: Michael Ludwig <michaelludwig@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> | 8 个月前 | |
Remove SkYUVAPixmapInfo::SupportedDataTypes(const GrImageContext&) This has been moved to private because it is unused externally (AFAIK) and we want to decouple src/core and the GPU backend. Change-Id: I00fa395c95cf7379093703d1ca5ebe428e3cbd98 Bug: skia:14317 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/710901 Owners-Override: Kevin Lubick <kjlubick@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com> | 3 年前 |