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

Side by Side Diff: cc/layer_tree_host.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, 10 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 | « cc/layer_animation_controller.h ('k') | cc/layer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 "cc/layer_tree_host.h" 5 #include "cc/layer_tree_host.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 , m_debugState(settings.initialDebugState) 83 , m_debugState(settings.initialDebugState)
84 , m_deviceScaleFactor(1) 84 , m_deviceScaleFactor(1)
85 , m_visible(true) 85 , m_visible(true)
86 , m_pageScaleFactor(1) 86 , m_pageScaleFactor(1)
87 , m_minPageScaleFactor(1) 87 , m_minPageScaleFactor(1)
88 , m_maxPageScaleFactor(1) 88 , m_maxPageScaleFactor(1)
89 , m_triggerIdleUpdates(true) 89 , m_triggerIdleUpdates(true)
90 , m_backgroundColor(SK_ColorWHITE) 90 , m_backgroundColor(SK_ColorWHITE)
91 , m_hasTransparentBackground(false) 91 , m_hasTransparentBackground(false)
92 , m_partialTextureUpdateRequests(0) 92 , m_partialTextureUpdateRequests(0)
93 , m_animationRegistrar(AnimationRegistrar::create())
94 { 93 {
94 if (m_settings.acceleratedAnimationEnabled)
95 m_animationRegistrar = AnimationRegistrar::create();
95 numLayerTreeInstances++; 96 numLayerTreeInstances++;
96 } 97 }
97 98
98 bool LayerTreeHost::initialize(scoped_ptr<Thread> implThread) 99 bool LayerTreeHost::initialize(scoped_ptr<Thread> implThread)
99 { 100 {
100 if (implThread) 101 if (implThread)
101 return initializeProxy(ThreadProxy::create(this, implThread.Pass())); 102 return initializeProxy(ThreadProxy::create(this, implThread.Pass()));
102 else 103 else
103 return initializeProxy(SingleThreadProxy::create(this)); 104 return initializeProxy(SingleThreadProxy::create(this));
104 } 105 }
(...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn dex) 879 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn dex)
879 setAnimationEventsRecursive(events, layer->children()[childIndex].get(), wallClockTime); 880 setAnimationEventsRecursive(events, layer->children()[childIndex].get(), wallClockTime);
880 } 881 }
881 882
882 skia::RefPtr<SkPicture> LayerTreeHost::capturePicture() 883 skia::RefPtr<SkPicture> LayerTreeHost::capturePicture()
883 { 884 {
884 return m_proxy->capturePicture(); 885 return m_proxy->capturePicture();
885 } 886 }
886 887
887 } // namespace cc 888 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layer_animation_controller.h ('k') | cc/layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698