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

Side by Side Diff: cc/layer_tree_host_impl.cc

Issue 11344004: Remove WebKit::Platform dependencies from cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix webkit_compositor_bindings_unittests Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/gl_renderer_unittest.cc ('k') | cc/layer_tree_host_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 "config.h" 5 #include "config.h"
6 6
7 #include "cc/layer_tree_host_impl.h" 7 #include "cc/layer_tree_host_impl.h"
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 return make_scoped_ptr(new LayerTreeHostImplTimeSourceAdapter(layerTreeH ostImpl, timeSource)); 162 return make_scoped_ptr(new LayerTreeHostImplTimeSourceAdapter(layerTreeH ostImpl, timeSource));
163 } 163 }
164 virtual ~LayerTreeHostImplTimeSourceAdapter() 164 virtual ~LayerTreeHostImplTimeSourceAdapter()
165 { 165 {
166 m_timeSource->setClient(0); 166 m_timeSource->setClient(0);
167 m_timeSource->setActive(false); 167 m_timeSource->setActive(false);
168 } 168 }
169 169
170 virtual void onTimerTick() OVERRIDE 170 virtual void onTimerTick() OVERRIDE
171 { 171 {
172 // FIXME: We require that animate be called on the impl thread. This
173 // avoids asserts in single threaded mode. Ideally background ticking
174 // would be handled by the proxy/scheduler and this could be removed.
175 DebugScopedSetImplThread impl;
176
177 m_layerTreeHostImpl->animate(base::TimeTicks::Now(), base::Time::Now()); 172 m_layerTreeHostImpl->animate(base::TimeTicks::Now(), base::Time::Now());
178 } 173 }
179 174
180 void setActive(bool active) 175 void setActive(bool active)
181 { 176 {
182 if (active != m_timeSource->active()) 177 if (active != m_timeSource->active())
183 m_timeSource->setActive(active); 178 m_timeSource->setActive(active);
184 } 179 }
185 180
186 private: 181 private:
(...skipping 1302 matching lines...) Expand 10 before | Expand all | Expand 10 after
1489 ScrollbarAnimationController* scrollbarController = layer->scrollbarAnimatio nController(); 1484 ScrollbarAnimationController* scrollbarController = layer->scrollbarAnimatio nController();
1490 double monotonicTime = (time - base::TimeTicks()).InSecondsF(); 1485 double monotonicTime = (time - base::TimeTicks()).InSecondsF();
1491 if (scrollbarController && scrollbarController->animate(monotonicTime)) 1486 if (scrollbarController && scrollbarController->animate(monotonicTime))
1492 m_client->setNeedsRedrawOnImplThread(); 1487 m_client->setNeedsRedrawOnImplThread();
1493 1488
1494 for (size_t i = 0; i < layer->children().size(); ++i) 1489 for (size_t i = 0; i < layer->children().size(); ++i)
1495 animateScrollbarsRecursive(layer->children()[i], time); 1490 animateScrollbarsRecursive(layer->children()[i], time);
1496 } 1491 }
1497 1492
1498 } // namespace cc 1493 } // namespace cc
OLDNEW
« no previous file with comments | « cc/gl_renderer_unittest.cc ('k') | cc/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698