Use std::min and std::max everywhere.
SkTPin still exists. We can't use std::clamp yet, and even when
we can, it has undefined behavior with NaN. SkTPin is written
to ensure that we return a value in the [lo, hi] range.
Change-Id: I506852a36e024ae405358d5078a872e2c77fa71e
Docs-Preview: https://skia.org/?cl=269357
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269357
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@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 updates viewer to show the full frametime including getting new buffers
and presenting buffers to the screen. This is more useful information than
simply the sum the flush and paint.
In a follow up CL we'll enable disabling vsync so we can truly measure how
long it takes us to draw.
Bug: skia:
Change-Id: Ibdbf16b37b44309fca6e771272ce38fd31a0e95c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/202708
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
SkCanvas::flush is problematic and we wish to deprecate it. As a first step, this CL begins to remove Skia's internal usage of it.
Ideally clients would use SkSurface::flush and/or GrContext::flush.
Change-Id: I39bb0702f8230134a97961a4ee70833fd5bd0dcc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/196641
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Still need to connect this to ImGui, but this is already useful
Bug: skia:
Change-Id: I925c7a9d6236cb2d865d45d6a68a5709bf2e3df7
Reviewed-on: https://skia-review.googlesource.com/143158
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
The reason we push Json updates for every frame is to support the
Android FPS meter - which happens to require the native FPS meter for
updates.
Instead of supporting two meters:
1) scale up the native FPS widget on Android (1.5x)
2) remove the Android widget
3) stop calling updateUIState() from onPaint()
Change-Id: Ica8109869035b2f885743a7e38b50688b69fa5e4
Reviewed-on: https://skia-review.googlesource.com/126621
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Bug: skia:
Change-Id: I3ca5c8c7047309983018339ec7b71b9aea5ee786
Reviewed-on: https://skia-review.googlesource.com/86921
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>