| | Remove use of DeprecatedAtOrEmptyValue in animations |
| | |
| | kevers@ removed the usage of DeprecatedAtOrEmptyValue in the animations code base. |
<td><td><td>Here is the <a
href="https://docs.google.com/document/d/18JIiajErikZaBzCtZvl-wwAJShqZsg0jT9wVyPBhSdU/edit">design
doc</a> for WTF::HashMap<>::at() refactor.</td></td></td>
| | Cleanup of CompositorKeyframeModel constructors |
| | kevers@ cleaned up the CompositorKeyframeModel constructors. |
| | The issues are: |
<td><td><td>3 public and 1 private constructor. All public versions end up
calling the private constructor</td></td></td>
<td><td><td>Unnecessary if-else construct</td></td></td>
<td><td><td>Opportunity to improve efficiency with move-value
semantics</td></td></td>
| | Resolution: |
<td><td><td>Single constructor that takes a KeyframeModel::PropertyId
argument</td></td></td>
<td><td><td>Add move constructor and move assignment operator to
TargetPropertyId</td></td></td>
<td><td><td><a
href="https://chromium-review.googlesource.com/c/chromium/src/+/3060658">Negative
line count CL</a>.</td></td></td>
| | Refactor Native PaintWorklet |
| | xidachen@ refactor the native paintworklet code. |
<td><td><td>Detailed design <a
href="https://docs.google.com/document/d/12g1OLIxZk9ayLNbOI87ru_yoUUWdxcKewDLRR4tqzi8/edit#">doc</a>
here.</td></td></td>
<td><td><td>The refactor reduced a middle layer, and made the entire
workflow simpler.</td></td></td>
<td><td><td>Landed 3 CLs. (<a
href="https://chromium-review.googlesource.com/c/chromium/src/+/3016115">Part1</a>,
<a
href="https://chromium-review.googlesource.com/c/chromium/src/+/3044499">Part2</a>,
<a
href="https://chromium-review.googlesource.com/c/chromium/src/+/3067315">Part3</a>)</td></td></td>
| | Magic behind move-value |
| | kevers@ learned something about std::move. |
| | Move constructor |
<td><td><td>Foo::Foo(Foo&& other): other is a temporary object that may have
its contents reset as a result of the move. Note the r-value ref cannot be
const.</td></td></td>
| | Move assignment: |
<td><td><td>Foo::operator=(Foo&& other): same thing. Other is temporary and
may be reset.</td></td></td>
| | Foo foo = CreateExpensiveObject(...) |
| | In this case, no std::move is required since RHS is already an r-value. |
| | Foo expensive_foo_instance = TakeOwnership(std::move(expensive_foo_instance)); |
| | std::move is required to take advantage of move-value semantics since expensive_foo_instance is an l-value. Adding std::move converts to an R-value reference. |
| | Useful instead of const & when not able to share an instance but can pass ownership. Further reading. See also pkastings C++ 201 talks. |
| |