Commit ad628a46 authored by yosin@chromium.org's avatar yosin@chromium.org

Revert of Animations: Disable compositor when timeline playback rate is set...

Revert of Animations: Disable compositor when timeline playback rate is set (patchset #2 id:20001 of https://codereview.chromium.org/722203004/)

Reason for revert:
Compilation failed on Mac and Linux:

FAILED: /Volumes/data/b/build/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/third_party/WebKit/Source/core/animation/webcore_remaining.AnimationTimeline.o.d -DV8_DEPRECATION_WARNINGS -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0 -DCHROMIUM_BUILD -DCR_CLANG_REVISION=218707 -DUSE_LIBJPEG_TURBO=1 -DENABLE_ONE_CLICK_SIGNIN -DENABLE_PRE_SYNC_BACKUP -DENABLE_REMOTING=1 -DENABLE_WEBRTC=1 -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS -DENABLE_HIDPI=1 -DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY -DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE -DDONT_EMBED_BUILD_METADATA -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PLUGIN_INSTALLATION=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_BACKGROUND=1 -DENABLE_GOOGLE_NOW=1 -DCLD_VERSION=2 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_MANAGED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1 -DENABLE_WIFI_BOOTSTRAPPING=1 -DENABLE_LOAD_COMPLETION_HACKS=1 -DBLINK_IMPLEMENTATION=1 -DINSIDE_BLINK -DWebCoreTextFieldCell=ChromiumWebCoreObjCWebCoreTextFieldCell -DWebCoreRenderThemeNotificationObserver=ChromiumWebCoreObjCWebCoreRenderThemeNotificationObserver -DENABLE_OPENTYPE_VERTICAL=1 -DENABLE_LAYOUT_UNIT_IN_INLINE_BOXES=0 -DWTF_USE_CONCATENATED_IMPULSE_RESPONSES=1 -DENABLE_INPUT_MULTIPLE_FIELDS_UI=1 -DENABLE_WEB_AUDIO=1 -DENABLE_OILPAN=1 -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_STATIC_IMPLEMENTATION -DSK_ENABLE_INST_COUNT=0 -DSK_SUPPORT_GPU=1 '-DGR_GL_CUSTOM_SETUP_HEADER="GrGLConfig_chrome.h"' -DSK_ENABLE_LEGACY_API_ALIASING=1 -DSK_ATTR_DEPRECATED=SK_NOTHING_ARG1 -DGR_GL_IGNORE_ES3_MSAA=0 -DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT -DSK_SUPPORT_LEGACY_TEXTRENDERMODE -DSK_IGNORE_GPU_LAYER_HOISTING -DSK_USE_POSIX_THREADS -DCHROME_PNG_WRITE_SUPPORT -DPNG_USER_CONFIG -DLIBXML_STATIC -DLIBXSLT_STATIC -DUSE_LIBPCI=1 -DUSE_OPENSSL=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -D_FORTIFY_SOURCE=2 -Igen -I../../third_party/WebKit/Source -I../.. -I../../skia/config -I../../third_party/khronos -I../../gpu -Igen/blink -I../../third_party/angle/include -I../../third_party/icu/source/i18n -I../../third_party/icu/source/common -I../../third_party/WebKit -I../../third_party/skia/src/core -I../../third_party/skia/include/core -I../../third_party/skia/include/effects -I../../third_party/skia/include/pdf -I../../third_party/skia/include/gpu -I../../third_party/skia/include/lazy -I../../third_party/skia/include/pathops -I../../third_party/skia/include/pipe -I../../third_party/skia/include/ports -I../../third_party/skia/include/utils -I../../third_party/skia/include/utils/mac -I../../skia/ext -I../../third_party/iccjpeg -I../../third_party/libpng -I../../third_party/libwebp -I../../third_party/libxml/mac/include -I../../third_party/libxml/src/include -I../../third_party/libxslt -I../../third_party/npapi -I../../third_party/npapi/bindings -I../../third_party/ots/include -I../../third_party/qcms/src -I../../third_party/sqlite -I../../third_party/zlib -I../../v8/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk -O2 -fvisibility=hidden -Werror -Wnewline-eof -mmacosx-version-min=10.6 -arch i386 -Wall -Wendif-labels -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-selector-type-mismatch -Wheader-hygiene -Wno-char-subscripts -Wno-unneeded-internal-declaration -Wno-covered-switch-default -Wstring-conversion -Wno-c++11-narrowing -Wno-deprecated-register -Wglobal-constructors -Wexit-time-destructors -std=c++11 -fno-rtti -fno-exceptions -fvisibility-inlines-hidden -fno-threadsafe-statics -Xclang -load -Xclang /Volumes/data/b/build/slave/WebKit_Mac_Oilpan/build/src/third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib -Xclang -add-plugin -Xclang find-bad-constructs -fcolor-diagnostics -fno-strict-aliasing -Xclang -load -Xclang /Volumes/data/b/build/slave/WebKit_Mac_Oilpan/build/src/third_party/llvm-build/Release+Asserts/lib/libBlinkGCPlugin_12.dylib -Xclang -add-plugin -Xclang blink-gc-plugin -Xclang -plugin-arg-blink-gc-plugin -Xclang enable-oilpan -include ../../third_party/WebKit/Source/build/mac/Prefix.h -c ../../third_party/WebKit/Source/core/animation/AnimationTimeline.cpp -o obj/third_party/WebKit/Source/core/animation/webcore_remaining.AnimationTimeline.o
../../third_party/WebKit/Source/core/animation/AnimationTimeline.cpp:242:16: error: non-const lvalue reference to type 'blink::AnimationPlayer *' cannot bind to a temporary of type 'blink::AnimationPlayer *'
    for (auto& player : m_players) {
               ^      ~
../../third_party/WebKit/Source/wtf/HashSet.h:73:18: note: selected 'begin' function with iterator type 'iterator' (aka 'HashTableConstIteratorAdapter<HashTableType, ValueTraits>')
        iterator begin() const;
                 ^
1 error generated.


Original issue's description:
> Animations: Disable compositor when timeline playback rate is set
> 
> This change invalidates all compositor animations when the animation
> timeline playback rate is modified. If the timeline playback rate is not
> 1, then animations are no longer composited.
> 
> BUG=432368
> 
> Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=185424

TBR=dstockwell@chromium.org,samli@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=432368

Review URL: https://codereview.chromium.org/734003002

git-svn-id: svn://svn.chromium.org/blink/trunk@185427 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent e918177d
......@@ -599,8 +599,7 @@ void AnimationPlayer::setOutdated()
bool AnimationPlayer::canStartAnimationOnCompositor()
{
// FIXME: Timeline playback rates should be compositable
if (m_playbackRate == 0 || (std::isinf(sourceEnd()) && m_playbackRate < 0) || (timeline() && timeline()->playbackRate() != 1))
if (m_playbackRate == 0 || (std::isinf(sourceEnd()) && m_playbackRate < 0))
return false;
return m_timeline && m_content && m_content->isAnimation() && playing();
......
......@@ -236,12 +236,10 @@ void AnimationTimeline::setOutdatedAnimationPlayer(AnimationPlayer* player)
void AnimationTimeline::setPlaybackRate(double playbackRate)
{
// FIXME: need to invalidate compositor animations
m_currentTimeSnapshot = currentTimeInternal();
m_rawCurrentTimeSnapshot = m_document->animationClock().currentTime() - zeroTime();
m_playbackRate = playbackRate;
for (auto& player : m_players) {
player->setCompositorPending(true);
}
}
double AnimationTimeline::playbackRate() const
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment