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

Side by Side Diff: content/renderer/gpu/render_widget_compositor.cc

Issue 12334041: Enable accelerated animations for orphaned layers (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Also test LTH with no registrar Created 7 years, 9 months 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 unified diff | Download patch
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/gpu/render_widget_compositor.h" 5 #include "content/renderer/gpu/render_widget_compositor.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 base::TimeTicks frame_begin_time = 328 base::TimeTicks frame_begin_time =
329 base::TimeTicks::FromInternalValue(frame_begin_time_sec * 329 base::TimeTicks::FromInternalValue(frame_begin_time_sec *
330 base::Time::kMicrosecondsPerSecond); 330 base::Time::kMicrosecondsPerSecond);
331 layer_tree_host_->updateAnimations(frame_begin_time); 331 layer_tree_host_->updateAnimations(frame_begin_time);
332 } 332 }
333 333
334 void RenderWidgetCompositor::didStopFlinging() { 334 void RenderWidgetCompositor::didStopFlinging() {
335 layer_tree_host_->didStopFlinging(); 335 layer_tree_host_->didStopFlinging();
336 } 336 }
337 337
338 void RenderWidgetCompositor::registerForAnimations(WebKit::WebLayer* layer) {
339 cc::Layer* cc_layer = static_cast<WebKit::WebLayerImpl*>(layer)->layer();
340 cc_layer->layerAnimationController()->setAnimationRegistrar(
341 layer_tree_host_->animationRegistrar());
342 }
343
338 bool RenderWidgetCompositor::compositeAndReadback(void *pixels, 344 bool RenderWidgetCompositor::compositeAndReadback(void *pixels,
339 const WebRect& rect) { 345 const WebRect& rect) {
340 return layer_tree_host_->compositeAndReadback(pixels, rect); 346 return layer_tree_host_->compositeAndReadback(pixels, rect);
341 } 347 }
342 348
343 void RenderWidgetCompositor::finishAllRendering() { 349 void RenderWidgetCompositor::finishAllRendering() {
344 layer_tree_host_->finishAllRendering(); 350 layer_tree_host_->finishAllRendering();
345 } 351 }
346 352
347 void RenderWidgetCompositor::setDeferCommits(bool defer_commits) { 353 void RenderWidgetCompositor::setDeferCommits(bool defer_commits) {
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 widget_->didCompleteSwapBuffers(); 440 widget_->didCompleteSwapBuffers();
435 } 441 }
436 442
437 // TODO(jamesr): This goes through WebViewImpl just to do suppression, refactor 443 // TODO(jamesr): This goes through WebViewImpl just to do suppression, refactor
438 // that piece out. 444 // that piece out.
439 void RenderWidgetCompositor::scheduleComposite() { 445 void RenderWidgetCompositor::scheduleComposite() {
440 client_->scheduleComposite(); 446 client_->scheduleComposite();
441 } 447 }
442 448
443 } // namespace content 449 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698