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

Unified Diff: components/html_viewer/html_widget.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: Created 5 years, 1 month 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/html_widget.cc
diff --git a/components/html_viewer/html_widget.cc b/components/html_viewer/html_widget.cc
index a7515cec0b7f9989af310b0d1b1e3d5d7360ca55..38ffba4f9888db8e9e881acad2c9924e43fc68ca 100644
--- a/components/html_viewer/html_widget.cc
+++ b/components/html_viewer/html_widget.cc
@@ -5,6 +5,8 @@
#include "components/html_viewer/html_widget.h"
#include "base/command_line.h"
+#include "cc/blink/web_layer_impl.h"
+#include "cc/layers/layer_settings.h"
#include "components/html_viewer/blink_settings.h"
#include "components/html_viewer/global_state.h"
#include "components/html_viewer/ime_controller.h"
@@ -15,6 +17,7 @@
#include "mojo/application/public/cpp/application_impl.h"
#include "mojo/services/tracing/public/interfaces/tracing.mojom.h"
#include "third_party/WebKit/public/web/WebFrameWidget.h"
+#include "third_party/WebKit/public/web/WebRuntimeFeatures.h"
#include "third_party/WebKit/public/web/WebSettings.h"
#include "third_party/WebKit/public/web/WebView.h"
#include "ui/gfx/geometry/dip_util.h"
@@ -91,6 +94,12 @@ HTMLWidgetRootLocal::HTMLWidgetRootLocal(CreateParams* create_params)
global_state_(create_params->global_state),
window_(create_params->window),
web_view_(nullptr) {
+ // Use new animation system (cc::AnimationHost).
sky 2015/11/30 17:45:29 This state looks like it's global state, and not p
loyso (OOO) 2015/12/02 03:58:27 Done.
+ cc::LayerSettings layer_settings;
+ layer_settings.use_compositor_animation_timelines = true;
+ cc_blink::WebLayerImpl::SetLayerSettings(layer_settings);
+ blink::WebRuntimeFeatures::enableCompositorAnimationTimelines(true);
+
web_view_ = blink::WebView::create(this);
ime_controller_.reset(new ImeController(window_, web_view_));
// Creating the widget calls initializeLayerTreeView() to create the
« 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