Guard flag has been added to clients
Change-Id: Ib61a48781f5dbd52279c8f4257ba3e22fb2704e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/338596
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Mechanically updated via Xcode "Replace Regular Expression":
typedef (.*) INHERITED;
-->
using INHERITED = $1;
The ClangTidy approach generated an even larger CL which would have
required a significant amount of hand-tweaking to be usable.
Change-Id: I671dc9d9efdf6d60151325c8d4d13fad7e10a15b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/314999
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Change-Id: I65cec59749f0e7f5fb13675293720afecffa6a80
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/284321
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
SK_SUPPORT_LEGACY_DIDCONCAT44
Change-Id: Ie208c245d7121fddc693a7d3c5d6866441c27433
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281864
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
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>
1. pass shader+op down to device
2. bitmapdevice pass it down to rasterclip
3. rasterclip only ever stores at most one shader
- if there is a ctm, fold that into (another) shader
- if the op is difference, invert the sense of alpha
- if there was a previous shader, compose with it
4. pass through to rasterpipelineblitter
5. it prepends the colorPipeline with the clipShader, and stashes its
results in a buffer (fClipShaderBuffer)
6. in each blit, scale/lerp from the buffer before storing the result
Change-Id: I07c7a8a20b9ae95cdcc9954237d115e63819f7c1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/275798
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
This completes pushing through the new virtual didConcat44() to our
subclasses, and introduces didScale() for future optimizations. We
don't call didScale yet, until external subclasses are also updated.
This was derived from https://skia-review.googlesource.com/c/skia/+/263349
bug: skia: 9768
Change-Id: Ia26b48e76e323037082e8f2ee83673c26b99ebed
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263702
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
This reverts commit aac8e44d5c.
Reason for revert: Attempted fix didn't work, still producing red on tree.
Original change's description:
> Add vis of android device clip restriction, fix regular clip vis on gpu
>
> Change-Id: I103025f4a9955c46f34b02d4e3ef1626796029e1
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263521
> Commit-Queue: Nathaniel Nifong <nifong@google.com>
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
TBR=kjlubick@google.com,nifong@google.com
Change-Id: Ia1f3a53b829ceb15467da12a104d87d7b1e7dad9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263697
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
1. Feature: Clients need to override didConcat44() (new data)
2. Perf: Clients need to override didTranslate (and now didScale) so our
default impls can be empty.
Need SK_SUPPORT_LEGACY_CANVAS_MATRIX_VIRTUALS flag to stage this in
clients (anyone who subclasses SkCanvas)
Before (with flag)
120.87 canvas_matrix_4x4 8888
108.10 ? canvas_matrix_3x3 8888
108.13 ? canvas_matrix_2x3 8888
141.54 canvas_matrix_scale 8888
128.04 canvas_matrix_trans 8888
After (without the flag)
...
90.79 canvas_matrix_scale 8888
94.51 canvas_matrix_trans 8888
bug: skia:9768
Change-Id: I6f500138dd6b2b24754dc065c650d0bd3c341540
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263349
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
All caller were passing the maxium value, those that weren't still function if they are made to.
Change-Id: Id9b5d8dbbbdf10a02ea0f3b21d500059ec383e3a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/259808
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Bug: chromium:795132,chromium:985500
Change-Id: Idbb4d45b29d2c0d0fd54b05b807086ecf0b8cf26
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237492
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
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>
This is a variant of drawPaint but is automatically clipped
to the bounds of the most recent saveBehind buffer (axis-aligned bounds).
No public exposure.
Impl is pretty simple (its a variant of drawPaint)
- find the most recent saveBehind device bounds
- if there is none, draw nothing, else
- temporarily intersect the device's clip with that bounds
- drawPaint
- restore the clip
See https://buganizer.corp.google.com/issues/129117085
Change-Id: I7c532e63a80b118fb2416c572b8e0d2abf8cf59a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209166
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Change-Id: I489a54860139d1820471aa0330b29a8ae9eca31e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/202316
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>