aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-04-04Add code OWNERSHEADmastermainandroidx-work-releaseandroidx-window-releaseandroidx-window-extensions-releaseandroidx-window-extensions-core-releaseandroidx-webkit-releaseandroidx-wear-wear-tooling-preview-releaseandroidx-wear-tiles-releaseandroidx-wear-releaseandroidx-wear-platform-releaseandroidx-wear-compose-releaseandroidx-viewpager2-releaseandroidx-versionedparcelable-releaseandroidx-vectordrawable-releaseandroidx-tv-material-releaseandroidx-transition-releaseandroidx-tracing-releaseandroidx-test-uiautomator-releaseandroidx-sqlite-releaseandroidx-sharetarget-releaseandroidx-savedstate-releaseandroidx-room-releaseandroidx-recyclerview-releaseandroidx-profileinstaller-releaseandroidx-privacysandbox-ads-releaseandroidx-platform-releaseandroidx-paging-releaseandroidx-navigation-releaseandroidx-mediarouter-releaseandroidx-media2-releaseandroidx-media-releaseandroidx-main-releaseandroidx-lifecycle-releaseandroidx-hilt-releaseandroidx-health-releaseandroidx-graphics-releaseandroidx-graphics-core-releaseandroidx-glance-releaseandroidx-g3-releaseandroidx-fragment-releaseandroidx-emoji2-releaseandroidx-drawerlayout-releaseandroidx-datastore-releaseandroidx-customview-customview-poolingcontainer-releaseandroidx-credential-releaseandroidx-core-remoteviews-releaseandroidx-core-releaseandroidx-core-performance-releaseandroidx-core-core-splashscreen-releaseandroidx-core-core-google-shortcuts-releaseandroidx-core-animation-releaseandroidx-compose-releaseandroidx-compose-material3-releaseandroidx-compose-integration-releaseandroidx-compose-g3-releaseandroidx-compose-compiler-releaseandroidx-compose-beta-releaseandroidx-collection-releaseandroidx-car-app-releaseandroidx-camera-releaseandroidx-browser-releaseandroidx-benchmark-releaseandroidx-arch-core-releaseandroidx-appcompat-releaseandroidx-annotation-releaseandroidx-annotation-annotation-experimental-releaseandroidx-activity-releaseSamuel Freilich
Change-Id: I39ff6476316e15776db2dbf9e48c777b3e6201af
2022-03-31Fix license metadataandroidx-draganddrop-releaseSamuel Freilich
BUG: 226647693 Change-Id: I951f1611770db77fb3440844d7ad320f9a2461b8
2022-03-28Sync external/ink-stroke-modeler to upstream headSamuel Freilich
Change-Id: I4fa402384d71c1dc0d9f000057c0ebec7542011b
2022-03-25Initial empty repositoryRoman Yepishev
2022-03-24Handle start==end correctly in NormalizeSamuel Freilich
In particular, Clamp01(Normalize(x, x, y)) should be 1 if y > x and 0 if y < x. (The real ambiguous case is where start == end == value, in which case we're still having Clamp01(Normalize(x, x, x)) be 0 arbitrarily.) Instead, rename Normalize to Normalize01, clamp the results to the range [0, 1], and return 0 if value < start and 1 if value > end. This allows us to pick the correct (none or all) amount of interpolation in WobbleSmoother when WobbleSmootherParams.speed_floor == WobbleSmootherParams.speed_ceiling, which is permitted. PiperOrigin-RevId: 437017353
2022-03-24Validate inputs in StrokeModel.Update are not inf/NaNSamuel Freilich
So far not checking more specific bounds for pressure/orientation/direction to not disturb existing uses. PiperOrigin-RevId: 437007881
2022-03-24Remove some unnecessary static_castsSamuel Freilich
`float = float / static_cast<float>(size_t)` should be equivalent to `float = float / size_t`, implicit conversion does the same thing. `float = float / double` is not quite equivalent to `float = float / static_cast<float>(double)`. In the former case, the first operand is converted to a double and divided before the result is converted to float. PiperOrigin-RevId: 437007538
2022-03-23Don't use GMock unnecessarilySamuel Freilich
Just use gtest_main when not using mocking or matchers specifically. PiperOrigin-RevId: 436805253
2022-03-23Add a little more detail about the structure of inputs to READMESamuel Freilich
In particular, note that StrokeModeler doesn't do palm rejection or separate inputs into multiple simultaneous strokes. PiperOrigin-RevId: 436788494
2022-03-22Factor out validation utility functions into separate targetSamuel Freilich
And add unit tests. PiperOrigin-RevId: 436519937
2022-03-16Use BUILD.bazel instead of BUILDSamuel Freilich
Bazel accepts either, but this avoids conflicts with build/ subdirs on Mac OS. And it seems to be standard practice for other projects like Abseil. PiperOrigin-RevId: 435095006
2022-03-15Add configuration to CMake build for using existing depsSamuel Freilich
Also tweaks the names used in FetchContent_* for consistency. PiperOrigin-RevId: 434836209
2022-03-08Add MacOS test CISamuel Freilich
This requires more care in how header-only libraries are defined, since the Mac version of ar is more finicky about that. PiperOrigin-RevId: 433229538
2022-03-08Add GitHub Actions CI status badgesSamuel Freilich
PiperOrigin-RevId: 433213721
2022-03-07Use MathJax rendering on GitHub pagesSamuel Freilich
PiperOrigin-RevId: 433078561
2022-03-07Fix CMake build structure and add usage docsSamuel Freilich
Focus on consumers using submodules + add_subdirectory, pruning logic related to local installation for now. Targets are now namespaced properly in `InkStrokeModeler::`. Adds usage documentation for consuming the library from Bazel and CMake projects. PiperOrigin-RevId: 433015667
2022-03-07Delete _config.ymlSamuel Freilich
2022-03-07Set theme jekyll-theme-minimalSamuel Freilich
2022-03-04Factor out dependency setup into workspace.bzl so that can be used by consumersSamuel Freilich
PiperOrigin-RevId: 432522663
2022-03-04Fix some build warnings and some errors under GCCSamuel Freilich
This involved fixing three types of issues: 1. warning: control reaches end of non-void function These were instances of exhaustive switch statements with nothing following to handle invalid values. Even if your switch is exhaustive, it's possible for an enum type to have a value that's not one of the specific enum values and thus not hit any of the cases in the switch statement. If that causes execution to hit the end of a non-void function without a return statement, that's undefined behavior. See https://abseil.io/tips/147. This was a real (though hopefully irrelevant) bug in our handling of invalid input in `StrokeModeler::Update` and the output operator for `Input::EventType`. 2. warning: comparison of integer expressions of different signedness Comparing unsigned and signed integer types does not work as you'd expect numeric comparisons between the two numbers in question to work, since the unsigned value gets naively cast to signed. Most of the cases of the warning cropping up were due to looping from zero to the size of a container, where the container size type is unsigned. In those cases, I use the container size type I'm comparing against, replacing: `for(int i = 0; i < container.size(); i++)` With: `for(decltype(container.size()) i = 0; i < container.size(); i++)` In a few cases, we're comparing an unsigned container size type with a user-provided int, which seems like a real bug. In those cases, I changed the logic to explicitly check for negative values, replacing: `if (x < container.size())` With: `if (x < 0 || (uint) x < container.size())` 3. error: converting to 'ink::stroke_model::Duration' from initializer list would use explicit constructor (Similar for Time.) This is showing up in GCC in cases like: ``` const KalmanPredictorParams params{ ... .prediction_interval{1}} ``` Here we have a struct being initialized with aggregate initialization using designated initializers: https://en.cppreference.com/w/cpp/language/aggregate_initialization "Each direct non-static data member named by the designated initializer is initialized from the corresponding brace-or-equals initializer that follows the designator. Narrowing conversions are prohibited." So here we should be initializing from the brace initializer. This is a class type and there's no equals sign, so it's direct list initialization: https://en.cppreference.com/w/cpp/language/list_initialization And that should allow explicit constructors. This is a known bug in GCC: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91319 But that can be worked around by being explicit about those types in the aggregate initialization, replacing something like: `{.time{1}}` With something like: `{.time{Time(1)}}` (Sometimes changing that to the copy-list-initializer form with the equals for readability.) PiperOrigin-RevId: 432492904
2022-03-03Add a GitHub Action for CMake/CTest CISamuel Freilich
Remove running on pull_request events for existing workflow, that's redundant with running on push. (Currently it's running twice on the same code when a change is pushed and a PR created.) Set CMAKE_CXX_STANDARD _before_ compiling Abseil. Stop setting CMAKE_CXX_COMPILER (apparently inconsistently). PiperOrigin-RevId: 432278083
2022-03-03Run Bazel CI on all branches, and allow triggering runs manuallySamuel Freilich
PiperOrigin-RevId: 432250242
2022-03-03Internal changeSamuel Freilich
PiperOrigin-RevId: 432241952
2022-03-03Add Bazel CI with GitHub actionsSamuel Freilich
Runs bazel test on PR creation / merge. PiperOrigin-RevId: 432236222
2022-03-03Internal changeSamuel Freilich
PiperOrigin-RevId: 432057901
2022-03-02Merge pull request #4 from google:sfreilich-patch-1Copybara-Service
PiperOrigin-RevId: 432012667
2022-03-02Revert incorrect merge of work in progress in 9e7296e2Samuel Freilich
PiperOrigin-RevId: 432010951
2022-03-02Merge pull request #5 from google:test_431979296Copybara-Service
PiperOrigin-RevId: 432008956
2022-03-02Merge pull request #5 from google/test_431979296Jonathan Feinberg
Use an alias for a dependency which uses a different target upstream
2022-03-02Use an alias for a dependency which uses a different target upstreamSamuel Freilich
PiperOrigin-RevId: 431979296
2022-03-02Improve some links in README.mdSamuel Freilich
2022-02-11Move .bazelignore up one levelSamuel Freilich
PiperOrigin-RevId: 428055624
2022-02-11Add CMake build/testSamuel Freilich
PiperOrigin-RevId: 428039385
2022-02-11Remove MathJax script tags from README.mdSamuel Freilich
I thought the GitHub site would strip these, but it escapes them instead. Will have to see if those can be added to a GitHub pages index page which includes the content of the README.md. PiperOrigin-RevId: 427810654
2022-02-10Remove [TOC] markup (not supported by GitHub) and add MathJax rendering scriptSamuel Freilich
The latter will only work on GitHub Pages, since the rendering on the github domain scrubs JS. Will add a link to that once it's set up. PiperOrigin-RevId: 427742617
2022-02-08Initial export of Ink Stroke ModelerInk Open Source
PiperOrigin-RevId: 427187157
2022-01-07Create READMEJonathan Feinberg