skia2/include/utils
Michael Ludwig b0cee9bf9a Remove drawBitmap et al. from SkDevice
SkCanvas keeps its non-exotic drawBitmap calls for now but they
immediately wrap the bitmap in SkImage::MakeFromBitmap. This will
add a copy for mutable bitmaps, but this can be worked around by using
images directly (preferred), or marking the bitmap as immutable. In
practice, mutable bitmaps do not seem to be widely used so this is
deemed acceptable for now.

Several GMs are updated to mark the bitmaps as immutable in order to
avoid pixel churn in how CPU vs. GPU mipmaps are generated. As we move
towards explicit mipmap generation, this distinction will become less
critical, so I'm just avoiding it for now. See skbug.com/9337 for mipmap
proposal. The image diffs encountered in this CL directly related to
generating mipmaps for bitmaps already cached on the GPU vs. not on the
GPU yet.

It was decided to copy if mutable vs. never copying the bitmap because
it preserves the image guarantees the devices and canvas' rely on,
and imposing the need to inspect an image for mutability is undesired.

Bug: skia:10037, skia:9337
Change-Id: If152e6cae1e155ccf6bd2cd755895f3c7a0135a5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276004
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-03-12 15:28:00 +00:00
..
mac Reland "Replace CGFontCreate with CTFontManagerCreate." 2019-11-27 19:42:13 +00:00
SkAnimCodecPlayer.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkBase64.h [skottie] Add DataURI image support in utils/tools 2019-10-21 18:02:39 +00:00
SkCamera.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkCanvasStateUtils.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkEventTracer.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkFrontBufferedStream.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkInterpolator.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkLua.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkLuaCanvas.h Remove drawBitmap et al. from SkDevice 2020-03-12 15:28:00 +00:00
SkNoDrawCanvas.h Remove drawBitmap et al. from SkDevice 2020-03-12 15:28:00 +00:00
SkNullCanvas.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkNWayCanvas.h Remove drawBitmap et al. from SkDevice 2020-03-12 15:28:00 +00:00
SkPaintFilterCanvas.h Remove drawBitmap et al. from SkDevice 2020-03-12 15:28:00 +00:00
SkParse.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkParsePath.h Revert "Revert "Shuffle SkSL sources around so compiler and bytecode can be used w/o GPU"" 2019-06-18 14:47:12 +00:00
SkRandom.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkShadowUtils.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkTextUtils.h Use SkTextEncoding enum instead of macros. 2019-05-07 20:54:16 +00:00
SkTraceEventPhase.h make includes available for flutter 2018-06-21 18:12:47 +00:00