blob: fbb8b6048f3a127c8df8782a716b1753abb15837 [file] [log] [blame]
Heather Miller118a4072019-07-25 11:33:30 -04001Skia Graphics Release Notes
2
3This file includes a list of high level updates for each milestone release.
4
Hal Canary9e514a12019-10-01 15:15:36 -04005* * *
Mike Reed430470d2019-09-12 17:09:12 -04006
Heather Millere4bcbf82020-04-03 12:01:51 -04007Milestone 84
8
9 * <insert new release note here>
10
Xianzhu Wanga91e4782020-05-01 09:34:57 -070011 * Add back SkCanvas::kPreserveLCDText_SaveLayerFlag to indicate that saveLayer()
12 will preserve LCD-text. All text in the layer must be drawn on opaque background
13 to ensure correct rendering.
14
Leon Scroggins III63cfb362020-04-24 13:00:48 -040015 * Add the new directory client_utils/ for code that is specific to a single client and
16 should be considered separate from Skia proper. Move SkFrontBufferedStream into the
17 subdir android/.
18
Mike Kleind5cba9d2020-04-24 07:44:50 -050019 * SkBitmap and SkPixmap's erase() methods now treat their color parameters
20 consistently with the rest of Skia, with all SkColors and any untagged
21 SkColor4fs interpreted as sRGB, not as a color in the bitmap's color space.
22 SkPixmap::erase(SkColor4f) now takes an SkColorSpace, so you can pass
23 pixmap.colorSpace() if you want the old behavior.
24
Mike Reedd276e3f2020-04-14 15:44:21 -040025 * SkCamera.h and SkMatrix44.h are DEPRECATED.
Mike Reed14f62de2020-04-14 11:35:40 -040026 Use SkM44 if you want to have 3d transformations.
27
Ben Wagnercc81e202020-04-09 13:00:44 -040028 * Changed Dilate and Erode image filters to take SkScalar for radius instead of int. While
29 the image filters themselves are defined in terms of discrete pixels, the radii provided by
30 the user are mapped through the CTM so taking ints forced over discretization. After mapping
31 through the CTM the radii are now rounded to pixels.
32 https://review.skia.org/281731
33 https://review.skia.org/282636
34
Greg Daniel8561fc22020-04-08 12:52:51 -040035 * Updated the contract of GrContext and SkSurface flush calls in regards to semaphores. Made it
36 clear that the caller is responsible for deleting any initialized semaphores after the flush
37 call regardless if we were able to submit them or not. Also, allows skia to only submit a
38 subset of the requested semaphores if we failed to create some.
39 https://review.skia.org/282265
40
41
Brian Osman62a0fb22020-04-07 13:48:15 -040042 * SkCanvas::drawVertices will now always fill the triangles specified by the vertices. Previously,
43 vertices with no colors and no (texture coordinates or shader) would be drawn in wireframe.
44 https://review.skia.org/282043
45
Heather Millere4bcbf82020-04-03 12:01:51 -040046* * *
47
Heather Miller6c138712020-03-16 10:50:49 -040048Milestone 83
Heather Millerd5153bb2019-10-17 00:03:36 -040049
Kevin Lubick988ce042020-03-25 13:13:20 -040050 * Remove localmatrix option from SkShaders::[Blend, Lerp]
51
Jim Van Verth05d09192020-03-20 11:23:39 -040052 * Fill out Direct3D parameters for backend textures and backend rendertargets.
53
Brian Salomonbc074a62020-03-18 10:06:13 -040054 * SkImage::makeTextureImage() takes an optional SkBudgeted param
Michael Ludwigb0cee9b2020-03-12 10:52:15 -040055
Brian Salomonf4ba4ec2020-03-19 15:54:28 -040056 * Made non-GL builds of GPU backend more robust.
57 https://review.skia.org/277456
58
59 * MoltenVK support removed. Use Metal backend instead.
60 https://review.skia.org/277612
Heather Miller6c138712020-03-16 10:50:49 -040061
62* * *
63
64Milestone 82
65
Michael Ludwigb0cee9b2020-03-12 10:52:15 -040066 * Removed drawBitmap and related functions from SkDevice; all public drawBitmap functions on
67 SkCanvas automatically wrap the bitmap in an SkImage and call the equivalent drawImage function.
68 Drawing mutable SkBitmaps will now incur a mandatory copy. Switch to using SkImage directly or
69 mark the bitmap as immutable before drawing.
70
Brian Osmandafbf122020-03-11 12:26:56 -040071 * Removed "volatile" flag from SkVertices. All SkVertices objects are assumed to be
72 volatile (the previous default behavior).
73
Michael Ludwigb0cee9b2020-03-12 10:52:15 -040074 * Removed exotic legacy bitmap functions from SkCanvas (drawBitmapLattic, drawBitmapNine); the
75 exotic SkImage functions still exist.
76
Leon Scroggins IIIa77f30c2020-03-09 14:23:30 -040077 * Make it possible to selectively turn on/off individual encoders/decoders,
78 using skia_use_(libpng/libjpeg_turbo/libwebp)(decode/encode).
79
Greg Daniel456f9b52020-03-05 19:14:18 +000080 * Removed GrGpuResource, GrSurface, and GrTexture from public api. These were not
Greg Daniel7c902112020-03-06 13:07:10 -050081 meant to be public, and we now can move them into src. Also removed getTexture
82 function from SkImage.h
Greg Daniel456f9b52020-03-05 19:14:18 +000083
Mike Reed5caf9352020-03-02 14:57:09 -050084 * Removed Bones from SkVertices
85
Brian Salomond8575452020-02-25 12:13:29 -050086 * Added a field to GrContextOptions that controls whether GL errors are checked after
87 GL calls that allocate textures, etc. It also controls checking for shader compile
88 success, and program linking success.
89
Robert Phillips1cec4d52020-02-24 08:38:34 -050090 * Made SkDeferredDisplayList.h officially part of the public API (i.e., moved it to
91 include/core). Also added a ProgramIterator to SkDeferredDisplayList which allows
92 clients to pre-compile some of the shaders the DDL requires.
93
Robert Phillipsb3c061a2020-02-13 13:24:47 -050094 * Added two new helper methods to SkSurfaceCharacterization: createBackendFormat and
95 createFBO0. These make it easier for clients to create new surface characterizations that
96 differ only a little from an existing surface characterization.
97
Brian Osman788b9162020-02-07 10:36:46 -050098 * Removed SkTMax and SkTMin.
Brian Osman5f3d9f72020-02-06 14:51:46 -050099 * Removed SkTClamp and SkClampMax.
Brian Osmanaba642c2020-02-06 12:52:25 -0500100 * Removed SkScalarClampMax and SkScalarPin.
Brian Osman7f364052020-02-06 11:25:43 -0500101 * Removed SkMax32 and SkMin32.
Brian Osman116b33e2020-02-05 13:34:09 -0500102 * Removed SkMaxScalar and SkMinScalar.
103
Allen Bauera428c7b2020-02-04 14:27:22 -0800104 * SkColorSetA now warns if the result is unused.
105
Leon Scroggins III196f3192020-02-03 12:39:54 -0500106 * An SkImageInfo with a null SkColorSpace passed to SkCodec::getPixels() and
107 related calls is treated as a request to do no color correction at decode
108 time.
Dominik Röttschesc9b06ca2020-01-31 18:13:37 +0200109
Dominic Mazzoni7dfb46e2020-02-19 10:59:29 -0800110 * Add new APIs to add attributes to document structure node when
111 creating a tagged PDF.
112
Dominik Röttschesc9b06ca2020-01-31 18:13:37 +0200113 * Remove CGFontRef parameter from SkCreateTypefaceFromCTFont.
114 Use CTFontManagerCreateFontDescriptorFromData instead of
115 CGFontCreateWithDataProvider to create CTFonts to avoid memory use issues.
116
Leon Scroggins III42a604f2020-02-06 15:47:58 -0500117 * Added SkCodec:: and SkAndroidCodec::getICCProfile for reporting the native
118 ICC profile of an encoded image, even if it doesn't map to an SkColorSpace.
Heather Millerebc4d622020-01-30 13:57:13 -0500119
Yi Xu55bca412020-02-14 18:10:40 -0500120 * SkSurface::ReplaceBackendTexture takes ContentChangeMode as a parameter,
121 which allow callers to specify whether retain a copy of the current content.
Michael Ludwigb0cee9b2020-03-12 10:52:15 -0400122
123 * Enforce the existing documentation in SkCanvas::saveLayer that it ignores
124 any mask filter on the restore SkPaint. The 'coverage' of a layer is
Michael Ludwigeced98b2020-03-03 10:39:41 -0500125 ill-defined, and masking should be handled by pre-clipping or using the
126 auxiliary clip mask image of the SaveLayerRec.
Yi Xu55bca412020-02-14 18:10:40 -0500127
Heather Millerebc4d622020-01-30 13:57:13 -0500128* * *
129
130Milestone 81
131
Brian Salomon87c31422020-01-22 09:59:56 -0500132 * Added support for GL_NV_fence extension.
Heather Miller2e046a22019-12-05 15:27:42 -0500133
Leon Scroggins III3eedc972020-01-22 10:44:00 -0500134 * Make SkImageInfo::validRowBytes require rowBytes to be pixel aligned. This
135 makes SkBitmap match the behavior of raster SkSurfaces in rejecting
136 non-aligned rowBytes.
137
Robert Phillips99dead92020-01-27 16:11:57 -0500138 * Added an SkImage::MakeRasterFromCompressed entry point. Also updated
139 SkImage::MakeFromCompressed to decompress the compressed image data if
140 the GPU doesn't support the specified compression type (i.e., macOS Metal
141 doesn't support BC1_RGB8_UNORM so such compressed images will always be
142 decompressed on that platform).
143
Robert Phillipsb0855272020-01-15 12:56:52 -0500144 * Added support for BC1 RGBA compressed textures
145
Brian Osmana88cab12020-01-09 10:21:44 -0500146 * Added CachingHint to SkImage::makeRasterImage
147
Kevin Lubickf5bc8fb2020-01-08 13:29:31 -0500148 * Added SkAnimatedImage::getCurrentFrame()
149
Jim Van Verthe2767012020-01-08 12:15:44 -0500150 * Add support to create an SkSurface from an MTKView, with delayed acquisition of
151 the MTLDrawable.
152 Entry point: SkSurface::MakeFromMTKView
153
Brian Salomon44207f32020-01-06 15:20:18 -0500154 * Removed SkIRect::EmptyIRect(). Use SkIRect::MakeEmpty() instead.
155 https://review.skia.org/262382/
156
Heather Millerebc4d622020-01-30 13:57:13 -0500157 * Moved SkRuntimeEffect to public API. This is the new (experimental) interface to custom SkSL
158 shaders and color filters.
Brian Osmanee426f22020-01-02 11:55:24 -0500159
Heather Millerebc4d622020-01-30 13:57:13 -0500160 * Added BC1 compressed format support. Metal and Vulkan seem to only support the BC
161 formats on desktop machines.
Robert Phillips8f259a02019-12-20 11:32:27 -0500162
Heather Millerebc4d622020-01-30 13:57:13 -0500163 * Added compressed format support for backend texture creation API.
164 This adds the following new entry points:
165 GrContext::compressedBackendFormat
166 GrContext::createCompressedBackendTexture
167 The latter method comes in variants that allow color-initialized and
168 compressed texture data initialized.
Robert Phillipsb915c942019-12-17 14:44:37 -0500169
Brian Salomona6069a12019-12-13 10:48:33 -0500170 * Added SkMatrix::MakeTrans(SkIVector)
171 https://review.skia.org/259804
Heather Miller2e046a22019-12-05 15:27:42 -0500172
Heather Millerebc4d622020-01-30 13:57:13 -0500173* * *
174
Heather Miller2e046a22019-12-05 15:27:42 -0500175Milestone 80
176
Greg Danielf0e04f02019-12-04 15:17:54 -0500177 * For Vulkan backend, we now require that the VkDevice, Queue, and Instance outlive
178 either the destruction or abandoning of the GrContext. Additionally, all
179 GrBackendTextures created via GrContext::createBackendTexture calls must be deleted
180 before destroying or abandoning the GrContext.
181 https://review.skia.org/257921
182
Brian Salomon4e1066f2019-12-04 10:33:52 -0500183 * Removed SkSize& SkSize::operator=(const SkISize&)
184 https://review.skia.org/257880
185
Brian Salomon8a99a412019-12-04 11:05:35 -0500186 * SkISize width() and height() now constexpr
187 https://review.skia.org/257680
188
Brian Salomone21af502019-11-22 16:56:36 -0500189 * Added SkMatrix::MakeTrans(SkVector) and SkRect::makeOffset(SkVector).
190 https://review.skia.org/255782
191
Brian Salomonc75bc032019-11-11 13:47:25 -0500192 * Added SkImageInfo::MakeA8(SkISize) and added optional color space parameter to
193 SkImageInfo::MakeN32Premul(SkISize).
Heather Millercc13acb2019-10-22 15:45:45 -0400194
Kevin Lubick47bd9f12019-11-08 06:55:15 -0800195 * Added dimensions() and getFrameCount() to SkAnimatedImage
196 https://review.skia.org/253542
197
Brian Osman09ee1122019-11-05 11:41:16 -0500198 * Removed SkMatrix44 version of toXYZD50 from SkColorSpace. Switched to skcms types in
199 transferFn, invTrasnferFn, and gamutTransformTo functions.
200 https://review.skia.org/252596
201
Brian Osmane36d0302019-11-01 17:10:28 -0400202 * Removed rotation and YUV support from SkColorMatrix
203 https://review.skia.org/252188
204
Brian Osman2b73e662019-11-01 10:02:24 -0400205 * Added kBT2020_SkYUVColorSpace. This is BT.2020's YCbCr conversion (non-constant-luminance).
206 https://review.skia.org/252160
207
Brian Salomon3683a4f2019-10-28 09:16:47 -0400208 * Remove old async read pixels APIs
209 https://review.skia.org/251198
210
Michael Ludwigcc836872019-11-04 15:01:52 -0500211 * Expose SkBlendModeCoeff and SkBlendMode_AsCoeff for Porter-Duff blend modes.
212 https://review.skia.org/252600
213
Heather Millercc13acb2019-10-22 15:45:45 -0400214* * *
215
216Milestone 79
Heather Millerd5153bb2019-10-17 00:03:36 -0400217
Mike Reeda32654c2019-10-04 10:18:34 -0400218 * SkTextBlob::Iter to discover the glyph indices and typefaces in each run
219 https://skia-review.googlesource.com/246296
220
Brian Osman11e6aa82019-10-16 13:58:42 -0400221 * Added support for PQ and HLG transfer functions to SkColorSpace.
Heather Millerd5153bb2019-10-17 00:03:36 -0400222 https://skia-review.googlesource.com/c/skia/+/249000
Brian Osman11e6aa82019-10-16 13:58:42 -0400223
Greg Daniel8b666172019-10-09 12:38:22 -0400224 * Added new api on GrContext ComputeImageSize. This replaces the hold static helper
225 ComputeTextureSize.
Heather Millerd5153bb2019-10-17 00:03:36 -0400226 https://skia-review.googlesource.com/c/skia/+/247337
Hal Canary9e514a12019-10-01 15:15:36 -0400227
Brian Salomon9241a6d2019-10-03 13:26:54 -0400228 * New versions of SkSurface async-rescale-and read APIs that allow client to extend
229 the lifetime of the result data. Old versions are deprecated.
230 https://review.skia.org/245457
231
Hal Canary9e514a12019-10-01 15:15:36 -0400232 * Add SkColorInfo. It's dimensionless SkImageInfo.
233 https://review.skia.org/245261
234
235 * Added SkPixmap-based createBackendTexture method to GrContext. This allows clients to create
236 backend resources (initialized with texture data) that Skia/Ganesh doesn't know about/track.
237 https://review.skia.org/244676
238
239 * Add explicit src and dst colorspace parameters to SkColorFilter::filterColor4f()
240 https://review.skia.org/244882
241
242 * Remove Vulkan/Metal float32 RGBA texture support
243 https://review.skia.org/244881
244
245 * Add SkSurface::MakeFromCAMetalLayer
246 https://review.skia.org/242563
247
248 * Added kAlpha_F16_SkColorType, kRG_F16_SkColorType and kRGBA_16161616_SkColorType.
249 This is intended to help support HDR YUV uses case (e.g., P010 and P016). As such,
250 the addition is focused on allowing creation of SkPixmaps and SkImages and not
251 SkSurfaces (i.e., who wants to render to render to these?)
252 https://review.skia.org/241357
253
254 * Start to move nested SkPath types (e.g. Direction, Verb) up to root level in SkPathTypes.h
255 https://review.skia.org/241079
256
257 * Remove isRectContour and ksNestedFillRects from public
258 https://review.skia.org/241078
259
260 * Added kRG_88_SkColorType. This is intended to help support YUV uses case (e.g., NV12).
261 As such, the addition is focused on allowing creation of SkPixmaps and SkImages and not
262 SkSurfaces (i.e., who wants to render to RG?)
263 https://review.skia.org/239930
264 https://review.skia.org/235797
265
Brian Osman172bb442019-09-06 10:16:02 -0400266 * Make the size of program/pipeline caches configurable via
267 GrContextOptions::fRuntimeProgramCacheSize
268 https://review.skia.org/239756
269
Hal Canary9e514a12019-10-01 15:15:36 -0400270 * Added kAlpha_16_SkColorType and kRG_1616_SkColorType. This is intended to help support HDR YUV
271 uses case (e.g., P010 and P016). As such, the addition is focused on allowing creation of
272 SkPixmaps and SkImages and not SkSurfaces (i.e., who wants to render to render to these?)
273 https://review.skia.org/239930
274
275 * Add GrContext::precompileShader to allow up-front compilation of previously-cached shaders.
276 https://review.skia.org/239438
277
278* * *
279
Heather Miller118a4072019-07-25 11:33:30 -0400280Milestone 78
281
Hal Canary2af5db72019-08-20 11:28:37 -0400282 * SkDrawLooper is no longer supported in SkPaint or SkCanvas.
Hal Canary3b0e7f62019-08-20 14:52:02 -0400283 https://review.skia.org/230579
284 https://review.skia.org/231736
Mike Reed9dc0b9e2019-07-29 17:52:48 -0400285
Hal Canary3b0e7f62019-08-20 14:52:02 -0400286 * SkPath::Iter::next() now ignores its consumDegenerates bools. Those will so
287 go away entirely
288 https://review.skia.org/235104
Mike Reedba7e9a62019-08-16 13:30:34 -0400289
Hal Canary2af5db72019-08-20 11:28:37 -0400290 * SkImage: new factories: DecodeToRaster, DecodeToTexture
Hal Canary3b0e7f62019-08-20 14:52:02 -0400291 https://review.skia.org/234476
Mike Reeda5acbf92019-08-14 11:08:41 -0400292
Hal Canary2af5db72019-08-20 11:28:37 -0400293 * SkImageFilter API refactor started:
294 - Provide new factory API in include/effects/SkImageFilters
295 - Consolidated enum types to use SkTileMode and SkColorChannel
296 - Hide filter implementation classes
Hal Canary3b0e7f62019-08-20 14:52:02 -0400297 - Hide previously public functions on SkImageFilter that were intended for
298 internal use only
299 https://review.skia.org/230198
300 https://review.skia.org/230876
301 https://review.skia.org/231256
Florin Malita48009492019-08-01 17:20:19 -0400302
Hal Canary3b0e7f62019-08-20 14:52:02 -0400303 * SkColorFilters::HSLAMatrix - new matrix color filter operating in HSLA
304 space.
305 https://review.skia.org/231736
Brian Salomond4764a12019-08-08 12:08:24 -0400306
Hal Canary3b0e7f62019-08-20 14:52:02 -0400307 * Modify GrBackendFormat getters to not return internal pointers. Use an enum
308 class for GL formats.
309 https://review.skia.org/233160
Brian Salomonec22b1a2019-08-09 09:41:48 -0400310
Hal Canary2af5db72019-08-20 11:28:37 -0400311 * Expose GrContext::dump() when SK_ENABLE_DUMP_GPU is defined.
Hal Canary3b0e7f62019-08-20 14:52:02 -0400312 https://review.skia.org/233557
Sergey Ulanov2739fd22019-08-11 22:46:33 -0700313
Hal Canary3b0e7f62019-08-20 14:52:02 -0400314 * Vulkan backend now supports YCbCr sampler for I420 Vulkan images that are
315 not backed by external images.
316 https://review.skia.org/233776
Leon Scroggins III6154ac42019-08-14 11:29:29 -0400317
Hal Canary3b0e7f62019-08-20 14:52:02 -0400318 * Add SkCodec::SelectionPolicy for distinguishing between decoding a still
319 image or an image sequence for a container format that has both (e.g. HEIF).
320 https://review.skia.org/232839
Brian Osmand566e2e2019-08-14 13:19:04 -0400321
Hal Canary3b0e7f62019-08-20 14:52:02 -0400322 * SkImage::makeTextureImage and SkImage::MakeCrossContextFromPixmap no longer
323 take an SkColorSpace parameter. It was unused.
324 https://review.skia.org/234579
325 https://review.skia.org/234912
Brian Osmand5148372019-08-14 16:14:51 -0400326
Hal Canary3b0e7f62019-08-20 14:52:02 -0400327 * SkImage::reinterpretColorSpace - to reinterpret image contents in a new
328 color space.
329 https://review.skia.org/234328
Brian Osman4c3fd342019-08-15 12:13:53 -0400330
Hal Canary2af5db72019-08-20 11:28:37 -0400331 * Removed SkImage::MakeCrossContextFromEncoded.
Hal Canary3b0e7f62019-08-20 14:52:02 -0400332 https://review.skia.org/234912
Hal Canary2af5db72019-08-20 11:28:37 -0400333
Jim Van Verth066ceb12019-08-28 14:35:55 -0400334 * Add Metal support for GrFence, GrSemaphore, and GrBackendSemaphore
335 https://review.skia.org/233416
336
Hal Canary2af5db72019-08-20 11:28:37 -0400337 * SkMallocPixelRef: remove MakeDirect and MakeWithProc from API.
338 https://review.skia.org/234660
Mike Klein334a6422019-08-27 08:12:15 -0500339
Michael Ludwiga595f862019-08-27 15:25:49 -0400340 * Remove 4-parameter variant of SkRect::join() and intersect(), and
341 noemptycheck variants of intersect().
342 https://review.skia.org/235832
343 https://review.skia.org/237142
344
Mike Klein334a6422019-08-27 08:12:15 -0500345 * Remove unused sk_sp comparison operators.
346 https://review.skia.org/236942
Michael Ludwiga595f862019-08-27 15:25:49 -0400347
348 * Add SkColor4f variant to experimental_DrawEdgeAAQuad for SkiaRenderer.
349 https://review.skia.org/237492
Robert Phillipscf39f372019-09-03 10:29:20 -0400350
351 * Deprecated maxCount resource cache limit for Ganesh.
352 This hasn't been relevant for a long time.
353
Brian Osmana66081d2019-09-03 14:59:26 -0400354 * Changed GrContextOptions' fDisallowGLSLBinaryCaching to fShaderCacheStrategy,
355 and allow caching SkSL.
356 https://review.skia.org/238856
Chris Dalton38f0a492019-10-07 11:51:07 -0600357
358 * Use GL_QCOM_TILED_RENDERING to explicitly discard stencil
Heather Millercc13acb2019-10-22 15:45:45 -0400359
360 * Added RELEASE_NOTES.txt file
361 https://review.skia.org/229760
Chris Dalton5a2f9622019-12-27 14:56:38 -0700362
363 * Implemented internal support for OpenGL tessellation.