Summary: | [TexMap] Clean up TextureMapperAnimation, TextureMapperAnimations | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Zan Dobersek <zan> | ||||||||||
Component: | New Bugs | Assignee: | Zan Dobersek <zan> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | cmarcelo, commit-queue, kondapallykalyan, luiz, mrobinson, noam | ||||||||||
Priority: | P2 | ||||||||||||
Version: | WebKit Nightly Build | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Attachments: |
|
Description
Zan Dobersek
2015-12-10 01:46:47 PST
Created attachment 267081 [details]
Patch
Attachment 267081 [details] did not pass style-queue:
ERROR: Source/WebCore/platform/graphics/texmap/TextureMapperAnimation.cpp:378: More than one command on the same line [whitespace/newline] [4]
ERROR: Source/WebCore/platform/graphics/texmap/TextureMapperAnimation.cpp:384: More than one command on the same line [whitespace/newline] [4]
Total errors found: 2 in 6 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 267081 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=267081&action=review Need to fix EFL build. > Source/WebCore/platform/graphics/texmap/TextureMapperAnimation.cpp:186 > + operation->blend(nullptr, 1.0 - progress, true)->apply(matrix, boxSize); Could be just "1 - progress" instead of "1.0 - progress". > Source/WebCore/platform/graphics/texmap/TextureMapperAnimation.cpp:280 > +void TextureMapperAnimation::pause(double time) Would like to see this using std::chrono instead of double in the future. > Source/WebCore/platform/graphics/texmap/TextureMapperAnimation.cpp:323 > + default: > + ASSERT_NOT_REACHED(); Normally we’d put this assertion outside the switch statement so the compiler can warn if we don’t cover all the enum cases. Depends on the type of m_keyframes.property() and whether it has other values we intentionally do not handle. > Source/WebCore/platform/graphics/texmap/TextureMapperAnimation.cpp:378 > + [&type](const TextureMapperAnimation& animation) { return animation.isActive() && animation.keyframes().property() == type; }); Why [&type] instead of [type]? Comment on attachment 267081 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=267081&action=review >> Source/WebCore/platform/graphics/texmap/TextureMapperAnimation.cpp:323 >> + ASSERT_NOT_REACHED(); > > Normally we’d put this assertion outside the switch statement so the compiler can warn if we don’t cover all the enum cases. Depends on the type of m_keyframes.property() and whether it has other values we intentionally do not handle. This intentionally handles only 3 of 6 possible values for AnimationPropertyID. >> Source/WebCore/platform/graphics/texmap/TextureMapperAnimation.cpp:378 >> + [&type](const TextureMapperAnimation& animation) { return animation.isActive() && animation.keyframes().property() == type; }); > > Why [&type] instead of [type]? It makes it clear that the intent is to reference the argument, instead of copying its value. I don't think there's any difference in the code that's generated though. Created attachment 267362 [details]
Patch for landing
Running through the EWS again.
Attachment 267362 [details] did not pass style-queue:
ERROR: Source/WebCore/platform/graphics/texmap/TextureMapperAnimation.cpp:378: More than one command on the same line [whitespace/newline] [4]
ERROR: Source/WebCore/platform/graphics/texmap/TextureMapperAnimation.cpp:384: More than one command on the same line [whitespace/newline] [4]
Total errors found: 2 in 7 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 267559 [details]
Patch for landing
Another run through EWS.
Attachment 267559 [details] did not pass style-queue:
ERROR: Source/WebCore/platform/graphics/texmap/TextureMapperAnimation.cpp:378: More than one command on the same line [whitespace/newline] [4]
ERROR: Source/WebCore/platform/graphics/texmap/TextureMapperAnimation.cpp:384: More than one command on the same line [whitespace/newline] [4]
Total errors found: 2 in 8 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 268002 [details]
Patch for landing
Attachment 268002 [details] did not pass style-queue:
ERROR: Source/WebCore/platform/graphics/texmap/TextureMapperAnimation.cpp:378: More than one command on the same line [whitespace/newline] [4]
ERROR: Source/WebCore/platform/graphics/texmap/TextureMapperAnimation.cpp:384: More than one command on the same line [whitespace/newline] [4]
Total errors found: 2 in 8 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Committed r194445: <http://trac.webkit.org/changeset/194445> |