Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Unified Diff: components/html_viewer/global_state.cc

Issue 1481343002: CC Animations: Make sure that HtmlViewer uses compositor-animation-timelines (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to pick up a fix. Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/html_viewer/web_layer_tree_view_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/html_viewer/global_state.cc
diff --git a/components/html_viewer/global_state.cc b/components/html_viewer/global_state.cc
index 4bbf4db554b37cdd70b401aa10c6f36b80b781de..2a2261b78ebfc23b3aa453ceb67dcc79172a2ac6 100644
--- a/components/html_viewer/global_state.cc
+++ b/components/html_viewer/global_state.cc
@@ -9,6 +9,8 @@
#include "base/bind.h"
#include "base/command_line.h"
#include "base/logging.h"
+#include "cc/blink/web_layer_impl.h"
+#include "cc/layers/layer_settings.h"
#include "components/html_viewer/blink_platform_impl.h"
#include "components/html_viewer/blink_settings_impl.h"
#include "components/html_viewer/media_factory.h"
@@ -128,6 +130,12 @@ void GlobalState::InitIfNecessary(const gfx::Size& screen_size_in_pixels,
gpu_service_->GetGpuInfo(base::Bind(&GlobalState::GetGpuInfoCallback,
base::Unretained(this)));
+ // Use new animation system (cc::AnimationHost).
+ cc::LayerSettings layer_settings;
+ layer_settings.use_compositor_animation_timelines = true;
+ cc_blink::WebLayerImpl::SetLayerSettings(layer_settings);
+ blink::WebRuntimeFeatures::enableCompositorAnimationTimelines(true);
+
renderer_scheduler_ = scheduler::RendererScheduler::Create();
blink_platform_.reset(
new BlinkPlatformImpl(this, app_, renderer_scheduler_.get()));
« no previous file with comments | « no previous file | components/html_viewer/web_layer_tree_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698